Connectivity Guide

Table Of Contents
assign IP addresses according to the relay agent. This prevents generating DHCP offers in response to requests from an
unauthorized relay agent.
The server echoes the option back to the relay agent in its response, and the relay agent can use the information in the option
to forward a reply out the interface on which the request was received rather than flooding it on the entire VLAN.
The relay agent strips Option 82 from DHCP responses before forwarding them to the client.
By default, Option 82 is not inserted in DHCP packets.
To insert Option 82 into DHCP packets, follow this step.
Insert Option 82 into DHCP packets.
CONFIGURATION mode
ip dhcp relay information-option [trust-downstream]
For routers between the relay agent and the DHCP server, enter the trust-downstream option.
Manually reset the remote ID for Option 82.
CONFIGURATION mode
ip dhcp relay information-option remote-id
DHCPv6 relay agent options
By default, the DHCPv6 relay agent inserts Options 18 and 37 before forwarding DHCPv6 packets to the server.
Interface ID
(Option 18)
This is the interface on which the client-originated message is received.
Default values: The length of Interface ID is 12 bytes comprising of logical ifindex (VLAN, LAG,
or physical interface), received ifindex (LAG or physical interface), and physical ifindex. Each
ifindex value is 4 bytes long.
In the interface ID, each ifindex (4 bytes) is in hexadecimal. Convert hexadecimal values of each
ifindex separately to decimal and the derived decimal value can be used to get the actual interface
name. For more information about deriving the interface name from interface index, see the section
Example of deriving the interface index number.
Remote ID
(Option 37)
This identifies the host from which the message is received.
Default values: The default value of this option is the MAC address of the relay agent that adds Option
37.
DHCP Snooping
DHCP snooping is a feature that protects networks from spoofing. It acts as a firewall between the DHCP server and DHCP
clients.
DHCP snooping places the ports either in trusted or non-trusted mode. By default, all ports are set to the non-trusted mode.
An attacker can not connect to the DHCP server through trusted ports. While configuring DHCP snooping, manually configure
ports connected to legitimate servers and relay agents as trusted ports.
When you enable DHCP snooping, the relay agent builds a binding table using DHCPACK messages containing the client
MAC address, IP addresses, IP address lease time, port, VLAN ID, and binding type. Every time the relay agent receives a
DHCPACK on a trusted port, it adds an entry to the table.
The relay agent checks all subsequent DHCP client-originated IP traffic (DHCPRELEASE, DHCPNACK, and DHCPDECLINE)
against the binding table to ensure that the MAC-IP address pair is legitimate and that the packet arrived on the correct
port. Packets that do not pass this check are forwarded to the server for validation. This checkpoint prevents an attacker
from spoofing a client and declining or releasing the real clients address. Server-originated packets (DHCPOFFER, DHCPACK,
and DHCPNACK) that arrive on a not trusted port are also dropped. This checkpoint prevents an attacker from acting as an
imposter as a DHCP server to facilitate a man-in-the-middle attack.
Binding table entries are deleted when a lease expires, or the relay agent encounters a DHCPRELEASE, DHCPNACK, or
DHCPDECLINE.
DHCP snooping is supported on Layer 2 and Layer 3 traffic. DHCP snooping on Layer 2 interfaces does not require a relay
agent.
Dynamic Host Configuration Protocol (DHCP)
299