3Com Switch 7750 Configuration Guide

616 CHAPTER 58: DHCP RELAY AGENT CONFIGURATION
address of the VLAN interface (connecting to the client) into the giaddr field of the
message.
The DHCP server will assign an IP address in the same network segment as the
gateway IP address to the client. Thus, clients connecting to different ports in a
VLAN may get IP addresses in different network segments.
Specifying a gateway in Ethernet port view
Use the following commands to specify a gateway for the DHCP clients, that is, to
bind a port in a VLAN to the VLAN interfaces IP address (primary or secondary).
n
If the Ethernet port belongs to a sub-VLAN, you need to specify the ip address
argument as the primary or secondary IP address of the corresponding super VLAN
interface, and specify the vlan-id argument as the VLAN ID of the super VLAN;
otherwise, the system prompts error information due to VLAN mismatch.
Specifying a gateway in VLAN interface view
Use the following commands to specify a gateway for the DHCP clients, that is, to
bind ports in a VLAN to the VLAN interfaces IP address (primary or secondary).
Removing all the gateways in system view
Specifying the Source IP
Address of Uplink
Packets
When a Switch 7750 Ethernet switch working as a DHCP relay agent forwards a
client’s packet to the DHCP server, the source IP address of the packet is the IP
address of the relay agent’s interface that connects to the DHCP server by default.
Table 485 Specify a gateway in Ethernet port view
Operation Command Description
Enter system view system-view -
Enter Ethernet port view interface interface-type
interface-number
-
Bind the port in the specified
VLAN to one of the VLAN
interface’s IP addresses
(gateway)
dhcp-relay gateway
ip-address vlan vlan-id
Required
Not configured by default.
Table 486 Specify a gateway in VLAN interface view
Operation Command Description
Enter system view system-view -
Enter VLAN interface view interface vlan-interface vlan-id -
Bind multiple ports in the
VLAN to one of the VLAN
interface’s IP addresses
(gateway)
dhcp-relay gateway ip-address
interface interface-type
interface-number [ to interface-type
interface-number ]
Required
Not configured by
default.
Table 487 Remove all the gateways in system view
Operation Command Description
Enter system view system-view -
Remove all the gateways undo dhcp-relay gateway all Required