75
By default, the DHCP relay agent uses the primary IP address of the interface that connects to
the DHCP server as the source IP address for relayed DHCP requests. If this interface does not
have an IP address, the DHCP relay agent uses an IP address that shares the same subnet
with the DHCP server.
You can specify only one source IP address for DHCP requests on an interface.
Display and maintenance commands for DHCP
relay agent
Execute display commands in any view and reset commands in user view.
Task Command
Display MAC address check entries on the
DHCP relay agent.
display dhcp relay check mac-address
Display relay entries on the DHCP relay
agent.
display dhcp relay client-information
[
interface
interface-type
interface-number
|
ip
ip-address
]
Display Option 82 configuration information
on the DHCP relay agent.
display dhcp relay information
[
interface
interface-type
interface-number
]
Display information about DHCP servers
on an interface.
display dhcp relay
server-address
[
interface
interface-type
interface-number
]
Display packet statistics on the DHCP relay
agent.
display dhcp relay statistics
[
interface
interface-type interface-number ]
Clear relay entries on the DHCP relay
agent.
reset dhcp relay client-information
[
interface
interface-type
interface-number
|
ip
ip-address
]
Clear packet statistics on the DHCP relay
agent.
reset dhcp relay statistics
[
interface
interface-type interface-number
]
DHCP relay agent configuration examples
Example: Configuring basic DHCP relay agent
Network configuration
As shown in Figure 25, configure the DHCP relay agent on Switch A. The DHCP relay agent enables
DHCP clients to obtain IP addresses and other configuration parameters from the DHCP server on
another subnet.
The DHCP relay agent and server are on different subnets. Configure static or dynamic routing to
make them reachable to each other.
Perform the configuration on the DHCP server to guarantee the client-server communication. For
DHCP server configuration information, see "DHCP server configuration examples."