
Configure CORE1 as the active DHCP server to allocate IP addresses ranging from
192.168.10.1 to 192.168.10.127.
1
<CORE1>
system-view
[CORE1]
dhcp enable
[CORE1]
ip pool 10
[CORE1-ip-pool-10]
gateway-list 192.168.10.3
//Configure the
gateway address.
[CORE1-ip-pool-10]
network 192.168.10.0 mask 24
//Configure the range
of allocable IP addresses.
[CORE1-ip-pool-10]
excluded-ip-address 192.168.10.128 192.168.10.254
// Exclude IP addresses ranging from 192.168.10.128 to 192.168.10.254.
[CORE1-ip-pool-10]
lease day 0 hour 20 minute 0
//Configure the IP
address lease.
[CORE1-ip-pool-10]
dns-list 8.8.8.8
//Configure the DNS server address.
[CORE1-ip-pool-10]
quit
The administrator configures fixed IP addresses for user devices so that users can
access the Internet. As the network expands, it is difficult for the administrator to
manually configure a large number of IP addresses and manage them. In addition, if a
user changes the configured IP address, an IP address conflict occurs and the related
users cannot access the Internet. Therefore, the administrator decides to configure
fixed IP addresses for several user devices, and configure the other user devices to
automatically obtain IP addresses from the DHCP server.
In this section, a global address pool is configured. You can also
configure an interface-based address pool. For details on this
process, see the corresponding
Configuration Guide - IP Service
based on the version of the device.
To prevent IP address conflicts caused by an active/standby
switchover in VRRP networking, configure the active DHCP server
to allocate the first half of all IP addresses in the address pool and
the standby DHCP server to allocate the second half.
a. Configure the DHCP server.
Configure the DHCP server on CORE1 and CORE2 to dynamically allocate IP
addresses to user devices in all departments. CORE1 functions as the active DHCP
server. Department A is used in the example below.
Configuring DHCP
36