拓扑图:
需求分析:
不同网段内部署三台路由器,每台路由器之间的网段以标出,路由器接口的ip地址根据网段自定义,用静态路由协议实现全互联互通,PC1和PC2能够互通,PC1和PC2的ip地址采用DHCP方式获得
- 设置各个PC机获取IP方式为dhcp
设置三台路由器
R1:system-view undo info-center enable sysname R1 int g0/0/1 ip address 192.168.1.254 24 int g0/0/0 ip address 10.0.1.1 24 q dhcp enable int g0/0/1 dhcp select interface dhcp server dns-list 192.168.1.254 q
R2:
system-view
undo info-center enable
sysname R2
int g0/0/0
ip address 10.0.1.2 24
int g0/0/1
ip address 172.23.100.2 24
q
display ip interface brief
R3:
system-view
undo info-center enable
sysname R3
int g0/0/0
ip address 172.23.100.3 24
int g0/0/1
ip address 192.168.2.254 24
dhcp enable
dhcp select interface
dhcp server dns-list 192.168.2.254
- 三台路由器上设置静态路由
R1:
ip route-static 192.168.2.0 24 10.0.1.2
ip route-static 172.23.100.0 24 10.0.1.2
R2:
ip route-static 192.168.2.0 24 172.23.100.3
ip route-static 192.168.1.0 24 10.0.1.1
R3:
ip route-static 192.168.1.0 24 172.23.100.2
ip route-static 10.0.1.0 24 172.23.100.2
- 查看三台路由器的路由表
dis ip routing-table
- 验证两台PC是否获取IP以及互通
最后ping一下PC2的IP,查看
本实验基于华为ensp完成
路由器型号:AR1220
设备连线:auto
1 条评论
陈馨沤:文章真不错https://www.dfpump.cn/post/338.html