IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Configure and enable the DHCP relay agent with MAC address verification

Want to summarize with AI?

Log in

This topic describes how to configure and enable the DHCP relay agent with DHCP MAC address verification on the Cisco 8000 Series Router.


Enable MAC address verification so that if the MAC address in the DHCPv4 protocol header does not match the L2 header source MAC address in the DHCPv4 relay profile, the frame is dropped.

Procedure

  1. Enter the global configuration mode and the DHCPv4 configuration submode, and enable the DHCP relay profile.

    Example:

    Router# configure
    Router(config)# dhcp ipv4
    Router(config-dhcpv4)# profile client relay
  2. Enable MAC address verification.

    Example:

    Router(config-dhcpv4)# client-mac-mismatch action drop
  3. Insert the DHCP relay agent information option (option-82 field) in forwarded BOOTREQUEST messages to a DHCP server.

    Example:

    Router(config-dhcpv4-relay-profile)# relay information option
  4. (Optional) Configure DHCP to check the validity of the relay agent information option in forwarded BOOTREPLY messages.

    Example:

    Router(config-dhcpv4-relay-profile)# relay information check
  5. (Optional) Configure the reforwarding policy for the DHCP relay agent. This example drops the relay information; use the keep keyword to keep it.

    Example:

    Router(config-dhcpv4-relay-profile)# relay information policy drop
  6. (Optional) Configure the DHCP IPv4 relay agent not to discard BOOTREQUEST packets that have an existing relay information option and the giaddr set to zero.

    Example:

    Router(config-dhcpv4-relay-profile)# relay information option allow-untrusted
  7. Drop the packet that has an existing nonzero giaddr value. Use the replace keyword to replace the existing giaddr value with a generated value (the default behavior).

    Example:

    Router(config-dhcpv4-relay-profile)# giaddr policy drop
  8. Forward UDP broadcasts, including DHCP, to the helper address for the VRF.

    Example:

    Router(config-dhcpv4-relay-profile)# helper-address vrf vrf1 10.1.1.1
    Router(config-dhcpv4-relay-profile)# commit
    Router(config-dhcpv4-relay-profile)# exit
  9. Configure DHCP relay on a VRF and commit the entire configuration.

    Example:

    Router(config-dhcpv4)# vrf vrf1 relay profile client
    Router(config-dhcpv4)# commit

    Use show dhcp ipv4 relay statistics raw all command to verify that DHCP MAC addresses are verified on the router.

    Router# show dhcp ipv4 relay statistics raw all
    packet_drop_mac_mismatch                      :         0