过程
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool aaa
//给一个pool起名aaa
Info: It’s successful to create an IP address pool.
[Huawei-ip-pool-aaa]network 192.168.1.0 mask 255.255.255.0
[Huawei-ip-pool-aaa]gateway-list 192.168.1.1
[Huawei-ip-pool-aaa]dns-list 114.114.114.114 8.8.8.8
[Huawei-ip-pool-aaa]quit
//给第一个aaa的pool设置一系列参数
[Huawei]ip pool bbb
//给第二个pool起名为bbb
Info: It’s successful to create an IP address pool.
[Huawei-ip-pool-bbb]network 192.168.2.0 mask 255.255.255.0
[Huawei-ip-pool-bbb]gateway-list 192.168.2.1
[Huawei-ip-pool-bbb]dns-list 114.114.114.114 8.8.8.8
[Huawei-ip-pool-bbb]quit
//给bbb设置一系列参数
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]
//在下放地址的接口上开启DHCP服务
PC1 192.168.1.254
PC2 192.168.1.253
PC3 192.168.2.254
PC4 192.168.2.253
//最终 四台电脑 自行分配的IP
最终用一台电脑ping 另外三台电脑都能ping通