![H3C SR8800-F Скачать руководство пользователя страница 141](http://html2.mh-extra.com/html/h3c/sr8800-f/sr8800-f_configuration-manual_4025863141.webp)
125
# 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 user class
tt
.
[RouterB-dhcp-pool-aa] class tt range 10.10.1.2 10.10.1.10
# Specify the address range for user class
ss
.
[RouterB-dhcp-pool-aa] class ss range 10.10.1.11 10.10.1.26
# Specify the gateway address and the DNS server address.
[RouterB-dhcp-pool-aa] gateway-list 10.10.1.254
[RouterB-dhcp-pool-aa] dns-list 10.10.1.20
[RouterB-dhcp-pool-aa] quit
Verifying the configuration
# Verify that clients matching the DHCP user classes can obtain IP addresses in the specified ranges
and all other configuration parameters from the DHCP server. (Details not shown.)
# On the DHCP server, display the IP addresses assigned to the clients.
[RouterB] display dhcp server ip-in-use
IP address Client identifier/ Lease expiration Type
Hardware address
10.10.1.2 0031-3865-392e-6262- Jan 14 22:25:03 2015 Auto(C)
3363-2e30-3230-352d-
4745-302f-30
10.10.1.11 aabb-aabb-aab1 Jan 14 22:25:03 2015 Auto(C)
Example: Configuring DHCP user class whitelist
Network configuration
As shown in
, configure the DHCP user class whitelist to allow the DHCP server to assign
IP addresses to clients whose hardware addresses are six bytes long and begin with
aabb-aabb
.
Figure 35 Network diagram
Procedure
1.
Specify IP addresses for the interfaces on the DHCP server. (Details not shown.)
2.
Configure DHCP:
# Enable DHCP.
<RouterB> system-view
[RouterB] dhcp enable
# Enable the DHCP server on GigabitEthernet 1/0/1.
[RouterB] interface gigabitethernet 1/0/1
[RouterB-GigabitEthernet1/0/1] dhcp select server
[RouterB-GigabitEthernet1/0/1] quit
# Create DHCP user class
ss
and configure a match rule to match DHCP requests in which the
hardware address is six bytes long and begins with
aabb-aabb
.
[RouterB] dhcp class ss