基于不浪费且减少路由条目的情况下划分网段
为减少路由条目使用汇总
分析条件第五条应使用缺省路由,注意不能使缺省相对形成环路
要更改优先级,做浮动静态路由
划分图
R1: Ethernet0/0/0 ip address 192.168.1.1 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.5 255.255.255.252
LoopBack1 ip address 192.168.1.33 255.255.255.240
LoopBack2 ip address 192.168.1.49 255.255.255.240
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6
R2: Ethernet0/0/0 ip address 192.168.1.2 255.255.255.252#
Ethernet0/0/1 ip address 192.168.1.9 255.255.255.252
LoopBack1 ip address 192.168.1.65 255.255.255.240
LoopBack2 ip address 192.168.1.81 255.255.255.240
ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.128 255.255.255.224 192.168.1.1
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10
R3: Ethernet0/0/0 ip ddress 192.168.1.10 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.14 255.255.255.252
GigabitEthernet0/0/0 ip address 192.168.1.21 255.255.255.252
GigabitEthernet0/0/1 ip address 192.168.1.17 255.255.255.252
interface LoopBack1 ip address 192.168.1.97 255.255.255.240
interface LoopBack2 ip address 192.168.1.113 255.255.255.240
ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.128 255.255.255.224 192.168.1.13
R4: Ethernet0/0/0 ip address 192.168.1.13 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.6 255.255.255.252
LoopBack1 ip address 192.168.1.129 255.255.255.240
LoopBack2 ip address 192.168.1.145 255.255.255.240
ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
ip route-static 192.168.1.96 255.255.255.224 192.168.1.14
R5: Ethernet0/0/0 ip address 192.168.1.22 255.255.255.252
Ethernet0/0/1 ip address 192.168.1.18 255.255.255.252
LoopBack1 ip address 5.5.5.5 255.255.255.0
ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
避免路由黑洞建立空端口
[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
做浮动静态路由使在两条线路都能通信时选择较快的线路注意回环也需配置优先级
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 88
[R5]ip route-static 192.168.1.32 27 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.64 27 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.96 27 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.128 27 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.0 30 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.4 30 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.8 30 192.168.1.21 preference 88
[R5]ip route-static 192.168.1.12 30 192.168.1.21 preference 88
最后进行检查
当两路都通时走1000M线路
当1000M不连通时接入100M