不同网段dhcp配置

拓扑图如下:

先是给主机1配置ip地址,掩码和网关,主机1用于测试

路由器R1:
sys
sysname R1
interface gi 0/0
ip add 192.168.1.254 24
interface gi 0/1
ip add 192.168.100.254 24
qu
interface gi 0/0
dhcp select relay
dhcp relay server-add 192.168.100.10
路由器R2:
sys
sysname DHCP server
interface gi 0/0
ip add 192.168.100.10 24
ip router-static 0.0.0.0 0.0.0.0 192.168.100.254
dhcp enable
dhcp server ip-pool 1
network 192.168.1.0 mask 255.255.255.0
gateway-list 192.168.1.254
forbidden-ip 192.168.1.254

测试:

主机1测试

主机2ping通

posted @ 2019-05-21 13:38  Umazhale  阅读(416)  评论(0编辑  收藏  举报