R21xx-HP FlexFabric 11900 Layer 3 IP Services Configuration Guide
50
[SwitchA-Vlan-interface20] quit
# Exclude IP addresses (addresses of the DNS server, WINS server, and gateways).
[SwitchA] dhcp server forbidden-ip 10.1.1.2
[SwitchA] dhcp server forbidden-ip 10.1.1.4
[SwitchA] dhcp server forbidden-ip 10.1.1.126
[SwitchA] dhcp server forbidden-ip 10.1.1.254
# Configure DHCP address pool 1 to assign IP addresses and other configuration parameters to
clients in subnet 10.1.1.0/25.
[SwitchA] dhcp server ip-pool 1
[SwitchA-dhcp-pool-1] network 10.1.1.0 mask 255.255.255.128
[SwitchA-dhcp-pool-1] expired day 10 hour 12
[SwitchA-dhcp-pool-1] domain-name aabbcc.com
[SwitchA-dhcp-pool-1] dns-list 10.1.1.2
[SwitchA-dhcp-pool-1] gateway-list 10.1.1.126
[SwitchA-dhcp-pool-1] nbns-list 10.1.1.4
[SwitchA-dhcp-pool-1] quit
# Configure DHCP address pool 2 to assign IP addresses and other configuration parameters to
clients in subnet 10.1.1.128/25.
[SwitchA] dhcp server ip-pool 2
[SwitchA-dhcp-pool-2] network 10.1.1.128 mask 255.255.255.128
[SwitchA-dhcp-pool-2] expired day 5
[SwitchA-dhcp-pool-2] domain-name aabbcc.com
[SwitchA-dhcp-pool-2] dns-list 10.1.1.2
[SwitchA-dhcp-pool-2] gateway-list 10.1.1.254
Verifying the configuration
A f t e r t h e p r e c e d i n g c o n f i g u r a t i o n i s c o m p l e t e , c l i e n t s o n n e t w o r k s 10 .1.1. 0 / 2 5 a n d 10 .1.1.12 8 / 2 5 c a n
obtain correct IP addresses and other network parameters from Switch A. You can use the display dhcp
server ip-in-use command on the DHCP server to view the IP addresses assigned to the clients.
DHCP user class configuration example
Network requirement
• The DHCP relay agent (Switch A) forwards the packets from DHCP clients to the DHCP server.
Enable switch A to support Option 82 so that switch A can add Option 82 in the DHCP requests
sent by the DHCP clients.
• The DHCP server (Switch B) assigns IP addresses and other configuration parameters to the DHCP
clients. If the DHCP requests the DHCP server receives contain Option 82, the server assigns IP
addresses in the range of 10.10.1.2 to 10.10.1.10 to the clients.
• For clients in subnet 10.10.1.0/24, the DNS server address is 10.10.1.20/24 and the gateway
address is 10.10.1.255/24.










