CLI Reference Guide-R02

Table Of Contents
Chapter 27
| DHCP Commands
DHCP Relay
– 783 –
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#ip dhcp restart relay
Console#show ip interface
VLAN 1 is Administrative Up - Link Up
Address is CC-37-AB-BC-4F-FA
Index: 1001, MTU: 1500
Address Mode is User specified
IP Address: 192.168.2.98 Mask: 255.255.255.0
Proxy ARP is disabled
DHCP Relay Server: 192.168.2.1
Console#
Related Commands
ip dhcp relay server (781)
DHCP Relay for IPv6
ipv6 dhcp relay
destination
This command specifies a DHCPv6 server or the VLAN to which client requests are
forwarded, and also enables DHCPv6 relay service on this interface. Use the no
form to disable this service.
Syntax
ipv6 dhcp relay destination {ipv6-address | multicast {all | vlan vlan-id}}
no ipv6 dhcp relay destination [ipv6-address | multicast {all |
vlan vlan-id}]
ipv6-address - A full IPv6 address including the network prefix and host
address bits. This address may designate another relay server or a DHCPv6
server.
multicast - All DHCP server multicast address (FF:05::1:3).
all - Specifies all local VLAN interfaces.
vlan-id - ID of configured VLAN. (Range: 1-4094)
Default Setting
None