C
HAPTER
42
| DHCP Commands
DHCP Relay
– 981 –
COMMAND MODE
Interface Configuration (VLAN)
USAGE GUIDELINES
â—† You must specify the IP address for at least one DHCP server.
Otherwise, the switch’s DHCP relay agent will not forward client
requests to a DHCP server.
â—† To start DHCP relay service, enter the ip dhcp restart relay command.
EXAMPLE
Console(config)#interface vlan 1
Console(config-if)#ip dhcp relay server 10.1.0.99
Console(config-if)#
RELATED COMMANDS
ip dhcp restart relay (981)
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
sees 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(config)#ip dhcp restart relay
Console(config)#end
Console#show ip interface
Vlan 1 is up, addressing mode is Dhcp
Interface address is 10.1.0.254, mask is 255.255.255.0, Primary
MTU is 1500 bytes
Proxy ARP is disabled