blob: a53c208888b9bd7d0f91d8290ff45c046d949ed4 [file] [log] [blame]
DHCP Relay
==========
.. tip::
We strongly recommend you to setup DHCP relay and configure the hosts to **obtain address via DHCP**.
See `Alternative: Configure static IP`_ if you want to statically configure IP address on each host.
Direct vs. Indirect hosts
-------------------------
Configure DHCP Relay
--------------------
Alternative: Configure static IP
--------------------------------
Although we strongly recommend to use `DHCP Relay`_ for IP assignment,
it is also possible to statically configure the IP address and route on the host.
1. **Configure the IP address and subnet mask**
Make sure the IP address and the subnet mask on the fabric network interface of the host is consistent with
the information in the Network Configuration section. For example, you can run
.. code-block:: console
# ip addr add 10.0.0.1/24 dev mlx0
2. **Configure the default route**
Make sure you change the default route of the host to the interface IP of the leaf switch it connects to.
For example, you can run
.. code-block:: console
# ip route add default via 10.0.0.254
.. note::
In the case that you want to keep default route through the management network,
you need to add routes to all other subnets in the network one by one.
3. **Trigger host learning**
We need to let ONOS learn the host in order to program corresponding flows and groups.
This is automatically done as part of the DHCP process.
However, we need to manually triggers it by sending an ARP or ND packet if the host is configured to use static IP.
.. code-block:: console
# arping -c 1 ${GATEWAY_IP}
.. code-block:: console
# ndsend ${HOST_IP} ${INTF}