You can configure the DHCPv4 relay
feature on any Layer 3 interface, such as a switch front-end Ethernet interface (VE port) or
a physical interface.
About this task
The DHCPv4 relay feature allows forwarding of
requests and replies between DHCP servers and clients connected to the switch when
these servers and clients are not on the same subnet.
Consider the following when you configure the IP
DHCP relay agent:
- You can configure up to 16 DHCP
server IP addresses per interface. When multiple addresses are configured,
the relay agent relays the packets to all server addresses. The total number
of addresses configurable on the router is 4000.
- The DHCP server and the clients it
communicates with can be attached to different VRF instances. For more
information, see VRF Support in DHCPv4.
Procedure
-
Access global configuration
mode.
-
Access interface configuration
mode.
device(config)# interface ethernet 1/18
-
Identify the DHCP server to which DHCP client requests are to be
forwarded.
-
If the DHCP server and its clients are attached to the same VRF
instance, use the following syntax.
device(config-if-eth-1/18)# ip dhcp relay address 100.1.1.2
-
If the DHCP server and its clients are on different VRF instances, use
the following syntax.
(config)# int ve 100
device(config-ve-100)# ip dhcp relay 100.1.1.2 use-vrf blue
Example
This example removes a relay address.
device(config-if)# no ip dhcp relay address 200.1.1.2
Example
This example removes a relay address when the
DHCP server is on a different VRF instance.
device(config-ve-103)# no ip dhcp relay address 10.1.2.255 use-vrf blue