要求:
1除R5的环回地址以固定外,整个其他所有的网段基于192. 168.1.0/24进行合理的IP地址划分
2 R1-R4每天路由器存在两个环回接口,用于模拟连接PC的网段;地址也在192.168.1.0/24这个网络范围内
3 R1-R4.上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问
4全网可达,尽量减少每台路由器,路由表条目的数量;避免环路出现
5 R4与R5间,正常10001链路通信,故障时自动改为100M
ip划分以及布局如图所示:
为AR1配环回接口和配置接口ip:
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.97 28
r1]interface LoopBack 2
[r1-LoopBack2]ip address 192.168.1.113 28
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 28
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.17 28
为AR2配环回接口和配置接口ip:
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.161 28
[r2]interface LoopBack 2
[r2-LoopBack2]ip address 192.168.1.177 28
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.18 28
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.49 28
为AR3配环回接口和配置接口ip:
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.129 28
[r3]interface LoopBack 2
[r3-LoopBack2]ip address 192.168.1.145 28
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 92.168.1.2 28
r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.33 28
为AR4配环回接口和配置接口ip:
[r4]interface LoopBack 1
[r4-LoopBack1]IP address 192.168.1.193 28
[r4]interface LoopBack 2
[r4-LoopBack2]ip address 192.168.1.209 28
r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.34 28
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.50 28
[r4]interface g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.65 28
[r4]interface g4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.81 28
为AR5配环回接口和配置接口ip:
[r5]interface LoopBack 1
[r5-LoopBack1]ip address 5.5.5.1 24
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.66 28
[r5]interface g0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.82 28
为各条线路配置静态路由但不配置5.5.5.0网段:
AR1
[r1]ip route-static 192.168.1.32 28 192.168.1.2
[r1]ip route-static 192.168.1.128 28 192.168.1.2
[r1]ip route-static 192.168.1.144 28 192.168.1.2
[r1]ip route-static 192.168.1.48 28 192.168.1.18
[r1]ip route-static 192.168.1.160 28 192.168.1.18
[r1]ip route-static 192.168.1.176 28 192.168.1.18
[r1]ip route-static 192.168.1.64 28 192.168.1.2
[r1]ip route-static 192.168.1.80 28 192.168.1.18
AR2
[r2]ip route-static 192.168.1.0 28 192.168.1.17
[r2]ip route-static 192.168.1.96 28 192.168.1.17
[r2]ip route-static 192.168.1.112 28 192.168.1.17
[r2]ip route-static 192.168.1.32 28 192.168.1.50
[r2]ip route-static 192.168.1.192 28 192.168.1.50
[r2]ip route-static 192.168.1.208 28 192.168.1.5
[r2]ip route-static 192.168.1.64 28 192.168.1.50
[r2]ip route-static 192.168.1.80 28 192.168.1.50
AR3
[r3]ip route-static 192.168.1.16 28 192.168.1.1
[r3]ip route-static 192.168.1.96 28 192.168.1.1
[r3]ip route-static 192.168.1.112 28 192.168.1.1
[r3]ip route-static 192.168.1.160 28 192.168.1.1
[r3]ip route-static 192.168.1.48 28 192.168.1.34
[r3]ip route-static 192.168.1.192 28 192.168.1.34
[r3]ip route-static 192.168.1.208 28 192.168.1.34
[r3]ip route-static 192.168.1.176 28 192.168.1.34
AR4
ip route-static 192.168.1.96 28 192.168.1.49
[r4]ip route-static 192.168.1.0 28 192.168.1.33
[r4]ip route-static 192.168.1.128 28 192.168.1.33
[r4]ip route-static 192.168.1.144 28 192.168.1.33
[r4]ip route-static 192.168.1.196 28 192.168.1.33
[r4]ip route-static 192.168.1.16 28 192.168.1.49
[r4]ip route-static 192.168.1.160 28 192.168.1.49
[r4]ip route-static 192.168.1.176 28 192.168.1.49
[r4]ip route-static 192.168.1.112 28 192.168.1.49
结果:
每个路由器都进行缺省路由:
r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
[r2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.50
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.66
更改接口的优先级
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.82 preference 62
[r4-GigabitEthernet0/0/2]shutdown