Configure the DHCPv4 Relay Gateway Address

Consider the following when you configure the DHCPv4 relay gateway address.
  • If the relay gateway address is configured, but no IP address is configured on the interface, the DHCP relay agent does not relay the requests.
  • When the relay gateway address matches an IP address that is configured on the interface, it is used to stamp the request.
  • When the relay gateway address does not match the IP addresses configured on the interface, the DHCP relay agent uses the default value, which is the lowest-numbered IP address configured on the interface.
  • Virtual IP addresses or local subnet broadcast addresses must not be used as the relay gateway address.
  • Any primary or secondary IP address configured on the interface can be used as the relay gateway address.
  1. Access global configuration mode.
    device# configure terminal
  2. Access interface configuration mode.
    device(config)# interface ethernet 1/4
  3. Enter the IP address to be used in the Gateway Address field of Bootstrap Protocol or DHCP requests received on a Layer 3 interface.
    device(config-if-eth-1/4)# ip dhcp relay gateway 10.50.22.26
    The relay agent places the IP address 10.50.22.26 in the Gateway Address field of Bootstrap Protocol or DHCP requests that the router receives on port 1/4 and forwards to the BootP or DHCP server.