huawei DHCP configuration

Common DHCP networking methods can be divided into two categories: one is that the DHCP server and the client are in the same subnet, and
the DHCP protocol is directly interacted; the second is that the DHCP server and the client are in different subnets
. , the IP address assignment must be achieved through the DHCP relay agent. In either case, the DHCP
configuration is the same.
1. Networking requirements
The DHCP server dynamically assigns IP addresses to clients in the same network segment. The address pool network segment 10.1.1.0/24
is divided into two network segments: 10.1.1.0/25 and 10.1.1.128/25. The two Ethernet interface addresses of the DHCP server
are 10.1.1.1/25 and 10.1.1.129/25 respectively.
The address lease period in the network segment 10.1.1.0/25 is 10 days and 12 hours, the domain name is h3c.com, the DNS address
is 10.1.1.2, no NetBIOS address, and the egress firewall address is 10.1.1.126; the network segment is 10.1.1.128/25
The address lease period in the network segment is 5 days, the DNS address is 10.1.1.2, the NetBIOS address is 10.1.1.4, and
the address of the egress firewall is 10.1.1.254

# Start the DHCP service.
[H3C] dhcp enable
# Configure IP addresses (DNS, NetBIOS, and egress gateway addresses) that do not participate in automatic allocation.
[H3C] dhcp server forbidden-ip 10.1.1.2 10.1.1.4 //Exclude 3 addresses from DHCP 234  
[H3C] dhcp server forbidden-ip 10.1.1.126
[H3C] dhcp server forbidden-ip 10.1.1.254
# Configure the common attributes of DHCP address pool 0 (address pool range, DNS address).
[H3C] dhcp server ip-pool 0
[H3C-dhcp-0] network 10.1.1.0 mask 255.255.255.0
[H3C-dhcp-0] dns-list 10.1.1.2
# Configure the properties of DHCP address pool 1 (address pool range, domain name, egress gateway, address lease period).
[H3C] dhcp server ip-pool 1
[H3C-dhcp-1] network 10.1.1.0 mask 255.255.255.128
[H3C-dhcp-1] domain-name h3c.com
[H3C-dhcp-1] gateway-list 10.1.1.126
[H3C-dhcp-1] expired day 10 hour 12
# Configure the properties of DHCP address pool 2 (address pool range, egress gateway, NetBIOS address, address lease
period).
[H3C] dhcp server ip-pool 2
[H3C-dhcp-2] network 10.1.1.128 mask 255.255.255.128
[H3C-dhcp-2] gateway-list 10.1.1.254
[H3C-dhcp-2] nbns-list 10.1.1.4
[H3C-dhcp-2] expired day 5

Another 

dhcp select interface //Define DHCP to work in interface mode
dhcp select global //Interface work in global address pool mode 

[H3C] dhcp server ip-pool 1 、、Define DHCP name

[H3C-dhcp-1] network 192.168.1.0 mask 255.255.255.0 //Define a DHCP range

dhcp server forbidden-ip 192.168.1.1 192.168.1.99 //Exclude DHCP range
dhcp server forbidden-ip 192.168.1.131 192.168.1.254 // Exclude DHCP scope
 
dhcp server excluded-ip-address 192.168.10.2 192.168.10.150 //Some devices use this command to exclude the DHCP range 

dhcp server dns-list 61.166.150.123 222.172.200.68 //Define the DNS of DHCP
dhcp server lease day 0 hour 2 minute 30 //Define the lease period to 

view the DHCP status
dis cu sta

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324844217&siteId=291194637