blob: 85681522d2859fda0ce7b3a6da9a7c36feadc25b [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001Address Assignment
2==================
3
4.. tip::
5 We strongly recommend you to setup DHCP relay and configure the hosts to **obtain address via DHCP**.
6
7DHCP Relay
8----------
9
10
11Static IP
12---------
13Although we strongly recommend to use `DHCP Relay`_ for IP assignment,
14it is also possible to statically configure the IP address and route on the host.
15
161. **Configure the IP address and subnet mask**
17
18 Make sure the IP address and the subnet mask on the fabric network interface of the host is consistent with
19 the information in the Network Configuration section. For example, you can run
20
21 .. code-block:: console
22
23 # ip addr add 10.0.0.1/24 dev mlx0
24
252. **Configure the default route**
26
27 Make sure you change the default route of the host to the interface IP of the leaf switch it connects to.
28 For example, you can run
29
30 .. code-block:: console
31
32 # ip route add default via 10.0.0.254
33
34 .. note::
35 In the case that you want to keep default route through the management network,
36 you need to add routes to all other subnets in the network one by one.
37
383. **Trigger host learning**
39
40 We need to let ONOS learn the host in order to program corresponding flows and groups.
41 This is automatically done as part of the DHCP process.
42 However, we need to manually triggers it by sending an ARP or ND packet if the host is configured to use static IP.
43
44 .. code-block:: console
45
46 # arping -c 1 ${GATEWAY_IP}
47
48 .. code-block:: console
49
50 # ndsend ${HOST_IP} ${INTF}