题目如图:![](https://i-blog.csdnimg.cn/blog_migrate/28946d5204f3990fcb054981a5c50445.jpeg)
1.IP规划:
192.168.1.0/24 划分为8个子网
子网1:192.168.1.0/27
子网2:192.168.1.32/27
子网3:192.168.1.64/27
子网4:192.168.1.96/27
子网5:192.168.1.128/27
子网6:192.168.1.160/27
子网7:192.168.1.192/27
子网8:192.168.1.224/27
其中3个作为冗余,其余供5个路由间
骨干线路有6个网段,192.168.1.0/27分配给6个骨干线路,借3位划分8个网段,剩余2个备用
192.168.1.0/27划分为8个子网
子网1:192.168.1.0/30
子网2:192.168.1.4/30
子网3:192.168.1.8/30
子网4:192.168.1.12/30
子网5:192.168.1.16/30
子网6:192.168.1.20/30
子网7:192.168.1.24/30
子网8:192.168.1.28/30
还有的路由1,2,3,4环回地址
2.IP配置(端口、环回)
依次为R1、R2、R3、R4、R5
3.配置静态路由和缺省路由
R1:
ip route-static 192.168.1.64 27 192.168.1.2
ip route-static 192.168.1.96 27 192.168.1.6
ip route-static 192.168.1.12 30 192.168.1.6
ip route-static 192.168.1.8 27 192.168.1.2
ip route-static 192.168.1.128 27 192.168.1.2
ip route-static 192.168.1.128 27 192.168.1.6
ip route-static 192.168.1.16 30 192.168.1.2
ip route-static 192.168.1.16 30 192.168.1.6
R2:
ip route-static 192.168.1.32 27 192.168.1.1
ip route-static 192.168.1.96 27 192.168.1.1
ip route-static 192.168.1.96 27 192.168.1.10
ip route-static 192.168.1.128 27 192.168.1.10
ip route-static 192.168.1.4 30 192.168.1.1
ip route-static 192.168.1.12 30 192.168.1.10
ip route-static 192.168.1.16 30 192.168.1.10
R3:
ip route-static 192.168.1.0 30 192.168.1.5
ip route-static 192.168.1.8 30 192.168.1.14
ip route-static 192.168.1.16 30 192.168.1.14
ip route-static 192.168.1.32 27 192.168.1.5
ip route-static 192.168.1.64 27 192.168.1.5
ip route-static 192.168.1.64 27 192.168.1.14
ip route-static 192.168.1.128 27 192.168.1.14
R4:
ip route-static 192.168.1.0 30 192.168.1.9
ip route-static 192.168.1.4 30 192.168.1.13
ip route-static 192.168.1.32 27 192.168.1.9
ip route-static 192.168.1.32 27 192.168.1.13
ip route-static 192.168.1.96 27 192.168.1.13
ip route-static 192.168.1.64 27 192.168.1.9
R5:
ip route-static 192.168.1.0 30 192.168.1.17
ip route-static 192.168.1.8 30 192.168.1.17
ip route-static 192.168.1.4 30 192.168.1.17
ip route-static 192.168.1.12 30 192.168.1.17
ip route-static 192.168.1.32 27 192.168.1.17
ip route-static 192.168.1.64 27 192.168.1.17
ip route-static 192.168.1.96 27 192.168.1.17
ip route-static 192.168.1.128 27 192.168.1.17
缺省:
R1: ip route-static 0.0.0.0 0 192.168.1.2
ip route-static 0.0.0.0 0 192.168.1.6
R2: ip route-static 0.0.0.0 0 192.168.1.10
R3: ip route-static 0.0.0.0 0 192.168.1.14
R4: ip route-static 0.0.0.0 0 192.168.1.18
4. 定义空接口,以防环路和路由黑洞
[R1]ip route-static 192.168.1.32 27 NULL 0
[R2]ip route-static 192.168.1.64 27 NULL 0
[R3]ip route-static 192.168.1.96 27 NULL 0
[R4]ip route-static 192.168.1.128 27 NULL 0
5.启用优先级策略
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
去掉千兆网线测试备用:
路由表:R1、R2、R3、R4、R5