一、路由器配置
[Huawei]undo info-center enable
Info: Information center is disabled.
[DHCP-SERVER]sysname DHCP-Server
[DHCP-Server]dis this
sysname DHCP-Server
undo info-center enable
return
[DHCP-Server]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP-Server]dis this
sysname DHCP-Server
undo info-center enable
dhcp enable
return
[DHCP-Server]int g0/0/0
[DHCP-Server-GigabitEthernet0/0/0]ip add 172.16.0.2 24
[DHCP-Server-GigabitEthernet0/0/0]dhcp select interface
[DHCP-Server-GigabitEthernet0/0/0]dhcp server dns-list 221.141.85.68
[DHCP-Server-GigabitEthernet0/0/0]dhcp server dns-list 8.8.8.8
[DHCP-Server-GigabitEthernet0/0/0]quit
[DHCP-Server]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
二、PC1和PC2自动获取IP 地址、网关和DNS
实验成功。