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