构建网络拓扑结构并启动
需要14个网段,划分子网段,如下图
进入系统视图进行改名
如更改r1:
[r1]interface GigabitEthernet0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.33 28
配置环回接口:
[r1]int l0
[r1-LoopBack0]ip address 192.168.1.1 28
查看接口IP地址的信息
然后重复上述操作配置其他路由
编写静态路由
[r1]ip route-static 192.168.1.80 28 192.168.1.34
编写缺省路由
[r1]ip route-static 0.0.0.0 0 192.168.1.34
[r4]ip route-static 0.0.0.0 0 192.168.1.210
实现r1能够ping通r5
进行路由汇总
[r1]ip route-static 192.168.1.0 24 192.168.1.34
[r2]ip route-static 192.168.1.0 24 192.168.1.82
[r4]ip route-static 192.168.1.0 24 192.168.1.145
[r3]ip route-static 192.168.1.0 24 192.168.1.97
实现全网可达
配置空接口
[r1]ip route-static 192.168.1.0 24 24 NULL 0
重复操作配置所有路由空接口
优先级修改
[r4]ip route-static 5.5.5.0 24 192.168.1.194 preference 61
ping 5.5.5.1时走千兆口
12.关闭千兆口
[r4-GigabitEthernet0/0/2]shutdown
[r4]display ip routing-table protocal static
此时走百兆口