R0106-HP MSR Router Series Layer 3 - IP Services Configuration Guide(V7)

47
[RouterA-dhcp-pool-2] domain-name aabbcc.com
[RouterA-dhcp-pool-2] dns-list 10.1.1.2
[RouterA-dhcp-pool-2] gateway-list 10.1.1.254
Verifying the configuration
Clients on networks 10.1.1.0/25 and 10.1.1.128/25 can obtain correct IP addresses and other network
parameters from Router A. You can use the display dhcp server ip-in-use command on the DHCP server
to display the IP addresses assigned to the clients.
DHCP user class configuration example
Network requirements
As shown in Figure 18, the DHCP relay agent (Router A) forwards DHCP packets between DHCP clients
and the DHCP server. Enable Router A to handle Option 82 so that it can add Option 82 in the DHCP
requests from the DHCP clients and convey the packets to the DHCP server.
The DHCP server (Router B) assigns IP addresses and other configuration parameters to the DHCP clients.
If the DHCP requests contain Option 82, the server assigns IP addresses in the range of 10.10.1.2 to
10.10.1.10 to the clients.
Router B assigns the DNS server address 10.10.1.20/24 and the gateway address 10.10.1.254/24 to
clients on subnet 10.10.1.0/24.
Figure 18 Network diagram
Configuration procedure
1. Specify IP addresses for the interfaces on DHCP server. (Details not shown.)
2. Configure DHCP:
# Enable DHCP and configure the DHCP server to handle Option 82.
<RouterB> system-view
[RouterB] dhcp enable
[RouterB] dhcp server relay information enable
# Enable the DHCP server on the interface GigabitEthernet 2/1/1.
[RouterB] interface gigabitethernet 2/1/1
[RouterB-GigabitEthernet2/1/1] dhcp select server
[RouterB-GigabitEthernet2/1/1] quit
# Create DHCP user class tt and configure a match rule to match DHCP requests that contain
Option 82.