75
If DHCP server proxy is enabled, you must configure the sub-option 72 in Option 82 to carry the
index of the interface that processes the DHCP request. When receiving a DHCP response, the relay
agent forwards the response according to the interface index in sub-option 72.
To specify the source address and gateway address in DHCP requests:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Specify an IP address as the
source address and gateway
address in DHCP requests.
dhcp relay source-address
ip-address
By default, the IP address of the
interface is used as the source
address and gateway address in
DHCP requests.
Displaying and maintaining the DHCP relay agent
Execute display commands in any view and reset commands in user view.
Task Command
Display information about DHCP servers on an
interface.
display dhcp relay
server-address
[
interface
interface-type interface-number
]
Display Option 82 configuration information on the
DHCP relay agent.
display dhcp relay information
[
interface
interface-type interface-number ]
Display relay entries on the DHCP relay agent.
display dhcp relay client-information
[
interface
interface-type interface-number
|
ip
ip-address
[
vpn-instance
vpn-instance-name
] ]
Display packet statistics on the DHCP relay agent.
display dhcp relay statistics
[
interface
interface-type interface-number ]
Display MAC address check entries on the DHCP
relay agent.
display dhcp relay check mac-address
Clear relay entries on the DHCP relay agent.
reset dhcp relay client-information
[
interface
interface-type interface-number
|
ip
ip-address
[
vpn-instance
vpn-instance-name ] ]
Clear packet statistics on the DHCP relay agent.
reset dhcp relay statistics
[
interface
interface-type
interface-number ]
DHCP relay agent configuration examples
DHCP relay agent configuration example
Network requirements
As shown in Figure 32, configure the DHCP relay agent on Router A. The DHCP relay agent enables
DHCP clients to obtain IP addresses and other configuration parameters from the DHCP server on
another subnet.
Because the DHCP relay agent and server are on different subnets, you need to configure static or
dynamic routing to make them reachable to each other.