R0106-HP MSR Router Series Layer 3 - IP Services Configuration Guide(V7)
48
[RouterB] dhcp class tt
[RouterB-dhcp-class-tt] if-match rule 1 option 82
[RouterB-dhcp-class-tt] quit
# Create DHCP address pool aa.
[RouterB] dhcp server ip-pool aa
# Specify the subnet for dynamic allocation.
[RouterB-dhcp-pool-aa] network 10.10.1.0 mask 255.255.255.0
# Specify the address range for dynamic allocation.
[RouterB-dhcp-pool-aa] address range 10.10.1.2 10.10.1.100
# Specify the address range for the user class tt.
[RouterB-dhcp-pool-aa] class tt range 10.10.1.2 10.10.1.10
# Specify the gateway and the DNS server.
[RouterB-dhcp-pool-aa] gateway-list 10.10.1.254
[RouterB-dhcp-pool-aa] dns-list 10.10.1.20
Verifying the configuration
Clients matching the DHCP user class can obtain IP addresses in the specified range and other network
configuration parameters from DHCP server (Router B). You can use the display dhcp server ip-in-use
command to display the IP addresses assigned to the clients.
Primary and secondary subnets configuration example
Network requirements
As shown in Figure 19, the DHCP server (Router A) assigns IP addresses to DHCP clients in the LAN.
Configure two subnets in the address pool on the DHCP server: 10.1.1.0/24 as the primary subnet and
10.1.2.0/24 as the secondary subnet. The DHCP server selects an IP address from the secondary subnet
when the primary subnet has no assignable addresses.
Router A assigns the following parameters:
• T h e d e f a u l t g a t e w a y 10 .1.1. 2 5 4 / 24 t o c l i e n t s o n s u b n e t 10 .1.1. 0 / 24 .
• The default gateway 10.1.2.254/24 to clients on subnet 10.1.2.0/24.
Figure 19 Network diagram
Configuration procedure
# Enable DHCP.
...
GatewayDHCP client DHCP client DHCP client
Router A
DHCP server
GE2/1/1
10.1.1.1/24
10.1.2.1/24 sub