Dhcp user class configuration example – H3C Technologies H3C S12500 Series Switches User Manual
Page 60
![background image](https://www.manualsdir.com/files/812677/content/doc060.png)
47
[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
336B
Verifying the configuration
After the preceding configuration is complete, clients on networks 10.1.1.0/25 and 10.1.1.128/25 can
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.
207B
DHCP user class configuration example
337B
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.
Figure 18 Network diagram
338B
Configuration procedure
1.
Specify IP addresses for interfaces on DHCP server and DHCP relay agent. (Details not shown.)
2.
Configure DHCP services:
# Enable DHCP and configure the DHCP server to handle Option 82.
[SwitchB] dhcp enable
[SwitchB] dhcp server relay information enable
# Enable DHCP server on VLAN-interface10.
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] dhcp select server
[SwitchB-Vlan-interface10] quit
# Create DHCP user class tt to match client requests with Option 82.
[SwitchB] dhcp class tt
- H3C SR8800 H3C SR6600-X H3C SR6600 H3C WX6000 Series Access Controllers H3C WX5000 Series Access Controllers H3C WX3000 Series Unified Switches H3C LSWM1WCM10 Access Controller Module H3C LSWM1WCM20 Access Controller Module H3C LSQM1WCMB0 Access Controller Module H3C LSRM1WCM2A1 Access Controller Module H3C LSBM1WCM2A0 Access Controller Module H3C S6800 Series Switches H3C S3100V2 Series Switches H3C S12500-X Series Switches H3C S9800 Series Switches