These features are available in ONOS 1.11.1
Indirect host support for V4
DHCP relay can support hosts which not directly connect to Trellis network. These hosts usually connected to another DHCP relay, the DHCP relay will forward DHCP packet to Trellis network with valid DHCP relay agent option (option 82).
DHCP Relay application checks relay agent option and determine the DHCP packet comes from direct or indirect host.
ONOS uses circuit id option in relay agent option with specific format if DHCP packet comes without relay agent option, the format of circuit will be: ConnectPoint:VlanId
For example, the DHCP request/discover packet comes from of:000000000000001/1 with vlan 100, the circuit ONOS put will be of:000000000000001/1:100 and send DHCP packet to DHCP server.
Indirect host won't put into host store, DHCP relay app will put IP address of indirect host to the route store, and use IP address of relay agent as next hop.
Indirect Host support for V6
A packet from Client side is checked against
DHCP relay store, CLI
New DHCP relay application will stores information from DHCP packet which processed by the app, administrator can use CLI to query these information.
The store provides these functionality:
- Latest state of DHCP client (e.g. client location, last seen time, DHCP type...), for debugging purpose
- For direct host, ONOS can find location and vlan from relay agent option, however, for indirect host, ONOS need to query last state from the store to find correct destination.
DHCPv6 configuration and Multi-Server Configuration for HA
New DHCP relay application supports different server for direct host and indirect host.
HA can be achieved by specifying addtional server configuration objects. Client initiated packets like SOLICIT or REBIND shall be replicated and sent to each server object, (Currently, dhcpv6 is implemented)
Below is an example of new configuration:
If indirect server configuration is not configured, the app will use default configuration for all cases.
For each server configuration, should contains dhcpServerConnectPoint, serverIps. gatewayIps is optional.
- dhcpServerConnectPoint: represent the location of DHCP server
- serverIps: IP address of the DHCP server, contains at least one IP address of DHCP server, IP address can be IPv4 or IPv6 for different version of DHCP. Will use first address if multiple IPv4 or IPv6 address configed
- gatewayIps: Optional config, should be configured if the DHCP server is not directly connected to the Trellis network, it tells which gateway we need to send to reach the server.
Relay agent address overwriting
The DHCP relay can overwrite the relay agent address (giaddr in DHCPv4, link-addr in DHCPv6) in DHCP message for different device.
Will not overwrite the relay agent address if not configured.
Users can add relayAgentIps to server config:
If relayAgentIps configed, the app will overwrite giaddr/Link address before it forward the DHCP message to the server.
Dhcp V6 Counters
There are two Dhcp V6 packet counters which are Host basis counters and Global counters. Host basis counters count and record dhcp v6 packets received on this host. It can be displayed by "dhcp-relay counter". These counters can be reset by typing "dhcp-relay counter reset".
Global counters counts and records all dhcp v6 packets received in onos. It can be displayed by "dhcp-relay-agg-counters". These counters can be reset by typing "dhcp-relay-agg-counters reset".
Dhcp V6 timer expiration cleans up Address and PD prefix
Dhcp v6 relay cleans up stale ip address and pd prefix based on timer whose default interval is 24 hours (24 * 3600 secs = 86400 secs). If the preferred life time of ip address or pd prefix exceeds 1/2 of poll interval, they will be removed from onos. The poll interval can be modified by "cfg set org.onosproject.dhcprelay.DhcpRelayManager dhcpPollInterval <newVal>".
Ignoring DHCP relay on a Particular VLAN
In some cases, it may be necessary to avoid punting DHCP packets to the controller, and letting them be forwarded normally through the data plane. In such cases, the DHCP-relay application can be configured to avoid punting DHCP packets on a particular VLAN on a particular switch.
In the example shown above, DHCP packets on vlan 24 are not punted to the controller from switches of:205 and of:206