CLI Reference Guide-R07

Table Of Contents
Chapter 26
| DHCP Commands (IPv4 and IPv6)
DHCP Relay (IPv4 and IPv6)
– 638 –
DHCP client's subnet, and sends a DHCP response back to the DHCP relay agent
(i.e., this switch). This switch then broadcasts the DHCP response received from
the server to the client.
You must specify the IP address for at least one active DHCP server. Otherwise,
the switch's DHCP relay agent will not be able to forward client requests to a
DHCP server.
DHCP relay configuration will be disabled if an active DHCP server is detected
on the same network segment.
Example
In the following example, the switch’s DHCP Relay Agent is configured to operate as
a Layer 3 Relay Agent.
Console(config)#ip dhcp l3 relay
Console(config)#
ip dhcp restart relay This command enables DHCP relay for the specified VLAN. Use the no form to
disable it.
Default Setting
Disabled
Command Mode
Privileged Exec
Command Usage
This command is used to configure DHCP relay functions for host devices attached
to the switch. If DHCP relay service is enabled, and this switch receives a DHCP
request broadcast, it inserts its own IP address into the request so the DHCP server
will know the subnet where the client is located. Then, the switch forwards the
packet to the DHCP server on another network. When the server receives the DHCP
request, it allocates a free IP address for the DHCP client from its defined scope for
the DHCP client’s subnet, and sends a DHCP response back to the DHCP relay agent
(i.e., this switch). This switch then broadcasts the DHCP response received from the
server to the client.
Example
In the following example, the device is reassigned the same address.
Console#ip dhcp restart relay
Console#show ip interface
VLAN 1 is Administrative Up - Link Up
Address is 00-00-E8-93-82-A0
Index: 1001, MTU: 1500
Address Mode is DHCP
IP Address: 10.1.0.254 Mask: 255.255.255.0