、实验拓扑图:
DHCP的配置方法
2、配置命令:
AR2:
<Huawei>system-view
[Huawei]dhcp enable #开启DHCP服务
[Huawei]interface GigabitEthernet 0/0/0 #进入配置接口
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24 #配置IP地址
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]ip pool cyz #建立IP地址池
[Huawei-ip-pool-cyz]network 192.168.1.0 mask 255.255.255.0 #设置IP
[Huawei-ip-pool-cyz]gateway-list 192.168.1.1 #设置网关
[Huawei-ip-pool-cyz]dns-list 202.106.0.20 #设置DNS
[Huawei-ip-pool-cyz]quit
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global #开启全局分配
[Huawei-GigabitEthernet0/0/0]quit