In the base router context, Ethernet ports and the WLAN station port can be configured with a router interface that supports a DHCP client. When the node operates as a DHCP client, it learns the IP address of the interface via dynamic IP address assignment. The DHCP client functionality is enabled by issuing the no shutdown command on the DHCP client in the config>router>interface>autoconfigure>dhcp-client context. The output below shows an example of a router interface enabled as a DHCP client.
*A:DUT# config# router interface "station-wlan-ifc"
port 1/4/4
autoconfigure dhcp-client
no shutdown
exit
exit
The 7705 SAR-Hm supports up to three DHCP clients per node, one on the WLAN station port and two on Ethernet ports. The 7705 SAR-Hmc supports up to three DHCP clients on Ethernet ports.
When the DHCP client is enabled, changes to the DHCP client configuration take effect when the shutdown command is issued followed by the no shutdown command.
If DHCP relay configurations exist on the node, the DHCP client cannot be enabled until the DHCP relay configurations are removed. Similarly, if DHCP client configurations exist on the node, DHCP relay cannot be enabled until the DHCP client configurations are removed.
The DHCP client only supports IPv4.
When the DHCP client first becomes operational, learns an IP address from a remote DHCP server using a DHCP DISCOVER message.
The node will only send a DHCP DISCOVER message if:
the DHCP client is enabled and the router interface is operationally up. Shutting down the DHCP client forces the release of the IP address.
a DHCP NAK message is received from the DHCP server that invalidates the previous DHCP DISCOVER message or any existing lease
When a DHCP client is shut down, all cached values (such as IP addresses and DHCP options) are cleared. They are rediscovered by issuing the no shutdown command.
If the port comes operationally up while the DHCP client is enabled and a DHCP discovery was not previously completed or a DHCP release was previously issued, then DHCP discovery is performed. If the port comes operationally up while the DHCP client is enabled and there was a previously completed DHCP discovery, then the DHCP client performs a DHCP REQUEST using the previously cached DHCP information from the discovery.
The operator can force a rediscovery procedure by executing the restart command in the tools>perform>router>autoconfigure>dhcp-client interface context.
The requested DHCP lease time can be configured using the CLI; however, the DHCP server can override this value. The node tracks the DHCP lease time and sends a DHCP REQUEST when half the lease time has elapsed. An IP address lease can be renewed manually using the tools>perform>router>autoconfigure>dhcp-client interface lease-renew command.
If the router interface goes down, the DHCP client parameters are cached for the interface. When the interface comes back up, if an IP address has been allocated and the lease time has not expired, the DHCP router interface will send a DHCP REQUEST to confirm that it can continue to use the IP address associated with the lease.
DHCP options must be configured in the CLI to make use of options received by the DHCP server. Any options received from the DHCP server are ignored if the corresponding options are not specified in the CLI. The DHCP client options are router, static-route, and dns-server. They are configured in the config>router> interface>autoconfigure>dhcp-client>request-options context.
The operator can use the show>router>route-table protocol dhcp-client command to view the active routes in the routing table that have been learned by the DHCP client. If the same route is received from more than one DHCP client, the route received from the DHCP server with the lowest ID (option 54) is installed in the route table.
The operator can use the show>router>dns command to view whether the DNS server has been configured to send request messages to the DHCP server. The node supports up to six DNS server entries learned by the DHCP clients. Only the first six DNS servers are stored by the node; any subsequent DNS servers that are learned will be ignored.
The CLI provides the option to use the router from the DHCP OFFER as the default gateway. In some scenarios, the router that is reachable via the WLAN port or an Ethernet port will be the default gateway. In other scenarios, the cellular interface will have reachability to the default gateway. The DHCP client router CLI option (under request-options) enables the router request option in the DHCP OFFER message. If the router option is enabled, the default gateway is assigned by the DHCP server.
The DHCP DISCOVER message sent from the node to the DHCP server contains the following options:
chaddr—the MAC address of the client, either the WLAN or Ethernet port
Option 51—the configured IP address lease time
Option 53—the DHCP message type (DISCOVER)
Option 60—a user-configurable vendor class identifier, either a hexadecimal string or an ASCII string
Option 61—a user-defined client identifier: a hexadecimal string, an ASCII string, an interface name, or the client MAC address
Option 55—the parameter request list:
Option 1—the subnet mask value
Option 3—the router option, a list of IP addresses for routers on the client subnet (unused if not enabled in the CLI)
Option 54—the DHCP server address
The DHCP OFFER message from the DHCP server must contain the following options at a minimum:
yiaddr—the DHCP router interface IP address
Option 1—the subnet mask value
Option 3—the router option, a list of IP addresses for routers on the client subnet
Option 51—the configured IP address lease time
Option 53—the DHCP message type (OFFER)
Option 54—the DHCP server address
When responding to the server DHCP OFFER or when extending the time of an existing lease, the DHCP REQUEST message sent from the node to the DHCP server contains the following options:
chaddr—the client MAC address
Option 50—the requested IP address; this address is the same as the address contained in the yiaddr field that was received in the DHCP OFFER message
Option 53—the DHCP message type (REQUEST)
Option 54—the DHCP server address; this address is the same as the address received in the OFFER message
Option 51—the IP address lease time; this value is the same as the lease time received in the OFFER message
Option 60—the vendor class identifier; this value is the same as the vendor class identifier in the DISCOVER message
Option 61—the client identifier; this value is the same as the client identifier in the DISCOVER message
Option 55—the parameter request list:
Option 1—the subnet mask value
Option 3—the router option, unused if not enabled in the CLI
Option 6—the DNS server option, unused if not enabled in the CLI
Option 54—the DHCP server address
Option 121—the static-route option, unused if not enabled in the CLI
When the DHCP client is shut down, a DHCP RELEASE message is sent to the DHCP server.
For BGP peers to other nodes behind the WLAN AP, the BGP local address can be set using the router interface name where the DHCP client is configured so that changes in the interface address because of DHCP messages are reflected in the local address of BGP sessions using this interface as the local address. For information about configuring services over a router interface enabled as a DHCP client, see Services over Ethernet with DHCP client.