ensp 中 DHCP配置和静态路由的配置
测试所用拓扑图:
ip配置命令
ip配置:
sys
[huawei]sys nameR1 //改名
[R1-Ethernet0/0/0]int e0/0/0 [int g0/0/0] //进入想配置的接口
[R1-Ethernet0/0/0]ip address 192.168.1.254 24 //配置此接口的ip和子网掩码
[R1]q//退出
save //保存
DHCP配置命令
sys
[Huawei]sysname R1 //改路由器名
[R1]inter eth0/0/0
[R1-Ethernet0/0/0]dhcp enable
[R1-Ethernet0/0/0]dhcp select global
[R1-Ethernet0/0/0]ip pool R1 //创建ip池
[R1-ip-pool-R1]network 192.168.1.0 mask 24 //配置所连接的pc网段和子网掩码
[R1-ip-pool-R1]gateway-list 192.168.1.254 //配置所连接pc的网关
配置完成后 去每一个pc 选择DHCP,再在命令行进行 ipconfig 查看 dhcp配置的ip,mask,gateway 若有则配置成功