DHCP Relay Agent Configuration Example
Network requirements
VLAN-interface 1 on the DHCP relay agent (Switch A) connects to the network where DHCP clients
reside. The IP address of VLAN-interface 1 is 10.10.1.1/24 and IP address of VLAN-interface 2 is
10.1.1.2/24 that communicates with the DHCP server 10.1.1.1/24. As shown in the figure below, Switch
A forwards messages between DHCP clients and the DHCP server to assign IP addresses in subnet
10.10.1.0/24 to the clients.
Network diagram
Figure 3-4 Network diagram for DHCP relay agent
Configuration procedure
# Create DHCP server group 1 and configure an IP address of 10.1.1.1 for it.
<SwitchA> system-view
[SwitchA] dhcp-server 1 ip 10.1.1.1
# Map VLAN-interface 1 to DHCP server group 1.
[SwitchA] interface Vlan-interface 1
[SwitchA-Vlan-interface1] dhcp-server 1
You need to perform corresponding configurations on the DHCP server to enable the DHCP clients
to obtain IP addresses from the DHCP server. The DHCP server configurations vary with different
DHCP server devices, so the configurations are omitted.
The DHCP relay agent and DHCP server must be reachable to each other.
Troubleshooting DHCP Relay Agent Configuration
Symptom
A client fails to obtain configuration information through a DHCP relay agent.
3-10