Huawei emulator eNSP configures DHCP to automatically assign IP addresses
1. Configure the address of the interface connected to the user
system-view #Enter system view
[Huawei]sysname R1 #Rename to R1
[R1]interface gi 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24 #Configure interface IP address
Two, configure the address pool
[R1]dhcp enable #Enable DHCP to assign IP address function
[R1]ip pool qq #Configure an address pool named qq
[R1-ip-pool-qq]network 192.168.1.0 mask 255.255.255.0 #Configure 192.168.1.0 network Section
[R1-ip-pool-qq]gateway-list 192.168.1.1 #Configure gateway
[R1-ip-pool-qq]dns-list 192.168.1.1 8.8.8.8 #Configure primary DNS and backup DNS
[R1-ip-pool -qq]display this #View DHCP configuration
[R1]interface gi 0/0/0 #Enter the configuration of the interface connected to the user
[R1-GigabitEthernet0/0/0]dhcp select global #Use the
local globally configured address pool to assign an IP address
save #Save the configuration
3. The PC automatically obtains an IP address