<Huawei>system-view
[Huawei]sysname dhcp
[dhcp]interface g0/0/0
[dhcp-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[dhcp-GigabitEthernet0/0/0]
Nov 14 2022 15:37:18-08:00 dhcp %%01IFNET/4/LINK_STATE(l)[1]:The line protocol I
P on the interface GigabitEthernet0/0/0 has entered the UP state.
[dhcp-GigabitEthernet0/0/0]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
<dhcp>display ip interface
GigabitEthernet0/0/0 current state : UP
Line protocol current state : UP
The Maximum Transmit Unit : 1500 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
Directed-broadcast packets:
received packets: 0, sent packets: 0
forwarded packets: 0, dropped packets: 0
ARP packet input number: 0
Request packet: 0
Reply packet: 0
Unknown packet: 0
Internet Address is 192.168.1.1/24
Broadcast address : 192.168.1.255
TTL being 1 packet number: 0
TTL invalid packet number: 0
ICMP packet input number: 0
Echo reply: 0
Unreachable: 0
Source quench: 0
Routing redirect: 0
Echo request: 0
Router advert: 0
Router solicit: 0
---- More ----
[dhcp]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[dhcp]ip pool sxh
[dhcp-ip-pool-sxh]network 192.168.1.0 mask 255.255.255.0
[dhcp-ip-pool-sxh]gateway-list 192.168.1.1
[dhcp-ip-pool-sxh]dns-list 8.8.8.8 114.114.114.114
[dhcp-ip-pool-sxh]quit
[dhcp]int
[dhcp]interface g0/0/0
[dhcp-GigabitEthernet0/0/0]dhcp select global
[dhcp-GigabitEthernet0/0/0]
再点击pc端,点击dhcp,点击应用,两台pc一样的操作,然后看命令行查IP