Verifying the configuration, Dhcp user class configuration example, Network requirement – H3C Technologies H3C S12500-X Series Switches User Manual

Page 58

Advertising
background image

47

# 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

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 display 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.

Figure 18 Network diagram

Advertising
This manual is related to the following products: