Specifying the source IP address for relayed DHCP requests
This task is required if multiple relay interfaces share the same IP address or if a relay interface does not have routes to DHCP servers. You can perform this task to specify the IP address of another interface, typically the loopback interface, on the DHCP relay agent as the source IP address for DHCP requests. The relay interface inserts the source IP address in the source IP address field as well as the giaddr field in DHCP requests.
If multiple relay interfaces share the same IP address, you must also configure the relay interface to support Option 82. Upon receiving a DHCP request, the relay interface inserts the subnet information in sub-option 5 in Option 82. The DHCP server assigns an IP address according to sub-option 5. The DHCP relay agent looks up the output interface in the MAC address table to forward the DHCP reply.
To specify the source IP address for relayed 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 the source IP address for relayed DHCP requests. | dhcp relay source-address { ip-address | interface interface-type interface-number } | By default, the DHCP relay agent uses the IP address of the interface that connects to the DHCP server as the source IP address for relayed DHCP requests. You can specify only one source IP address for DHCP requests on an interface. |