Network requirements, Configuration procedure – H3C Technologies H3C S5560 Series Switches User Manual
Page 66

51
[SwitchB] display dhcp server ip-in-use
Primary and secondary subnets configuration example
Network requirements
As shown in
, the DHCP server (Switch A) dynamically assigns IP addresses to 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 IP addresses in the secondary subnet
when the primary subnet has no assignable addresses.
Switch A assigns the following parameters:
•
The default gateway 10.1.1.254/24 to clients on subnet 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
[SwitchA] dhcp enable
# Configure the primary and secondary IP addresses of VLAN-interface 10.
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ip address 10.1.1.1 24
[SwitchA-Vlan-interface10] ip address 10.1.2.1 24 sub
# Enable the DHCP server on VLAN-interface 10.
[SwitchA-Vlan-interface10] dhcp select server
[SwitchA-Vlan-interface10] quit
# Create DHCP address pool aa, specify the address range of the primary and secondary subnets,
specify the gateway address.
[SwitchA] dhcp server ip-pool aa
[SwitchA-dhcp-pool-aa] network 10.1.1.0 mask 255.255.255.0
[SwitchA-dhcp-pool-aa] gateway-list 10.1.1.254
[SwitchA-dhcp-pool-aa] network 10.1.2.0 mask 255.255.255.0 secondary
[SwitchA-dhcp-pool-aa-secondary] gateway-list 10.1.2.254
[SwitchA-dhcp-pool-aa-secondary] quit
...
Gateway
DHCP client
DHCP client
DHCP client
Switch A
DHCP server
Vlan-int10
10.1.1.1/24
10.1.2.1/24 sub