一.实验拓扑
二.实验需求
1.除了R5的环回地址固定5.5.5.0/24,其他网段基于192.168.1.0/24进行合理划分;
2.R1-R4每个路由器存在两个环回接口,模拟PC,地址也在192.168.1.0/24网格内;
3.R1-R4不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问;
4.全网可达,尽量减少每台路由器路由条目数量,避免回路;
5.R4与R5间,正常1000M链路通信,故障时自动改为100M。
三.实验步骤
一、划分192.168.1.0/24网段,向主机位借三位,主干网络需要划分6个网段再借三位
192.168.1.0000 0000/27
(1)192.168.1.00000000/27--------骨干链路
192.168.1.0000 0000/30----192.168.1.0/30 可用网段为192.168.1.1和192.168.1.2
192.168.1.0000 0100/30----192.168.1.4/30 可用网段为192.168.1.5和192.168.1.6
192.168.1.0000 1000/30----192.168.1.8/30 可用网段为192.168.1.9和192.168.1.10
192.168.1.0000 1100/30----192.168.1.12/30 可用网段为192.168.1.13和192.168.1.14
192.168.1.0001 0000/30----192.168.1.16/30 可用网段为192.168.1.17和192.168.1.18
192.168.1.0001 0100/30----192.168.1.20/30 可用网段为192.168.1.21和192.168.1.22
(2)192.168.1.0010 0000/27----R1环回 192.168.1.32/27
192.168.1.0010 0000/28----192.168.1.32/28
192.168.1.0011 0000/28----192.168.1.48/28
(3)192.168.1.0100 0000/27----R2环回192.168.1.64/27
192.168.1.0100 0000/28----192.168.1.64/28
192.168.1.0101 0000/28----192.168.1.80/28
(4)192.168.1.0110 0000/27----R3环回192.168.1.96/27
192.168.1.0110 0000/28----192.168.1.96/28
192.168.1.0111 0000/28----192.168.1.112/28
(5)192.168.1.1000 0000/27----R4环回192.168.1.128/27
192.168.1.1000 0000/28----192.168.1.128/28
192.168.1.1001 0000/28----192.168.1.144/28
192.168.1.1010 0000/27
192.168.1.1100 0000/27
192.168.1.1110 0000/27
二、配置IP
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1-GigabitEthernet0/0/0]quit
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[R1-GigabitEthernet0/0/1]qu
[R1-GigabitEthernet0/0/1]quit
[R1]int LoopBack 0
[R1-LoopBack0]ip address 192.168.1.33 28
[R1-LoopBack0]quit
[R1]int LoopBack 1
[R1-LoopBack1]ip address 192.168.1.49 28
[R1-LoopBack1]quit
R1-R5操作方法一致
三、配置静态路由
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.6
[R1]ip route-static 192.168.1.16 30 192.168.1.2
[R1]ip route-static 192.168.1.16 30 192.168.1.6
[R1]ip route-static 192.168.1.20 30 192.168.1.2
[R1]ip route-static 192.168.1.20 30 192.168.1.6
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.96 27 192.168.1.6
R1-R5同R1配置一样 优先走最优路径 相同路径两边都走
四、测试
5.满足条件,用缺省路由到达5.5.5.5 24
[R1]ip route-static 0.0.0.0 0 192.168.1.2
[R1]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]iproute-static 0.0.0.0 0 192.168.1.18
[R4]iproute-static 0.0.0.0 0 192.168.1.22
6.环路避免
[R1]ip route-static 192.168.1.32 27 null0
[R2]ip route-static 192.168.1.64 27 null0
[R3]ip route-static 192.168.1.96 27 null0
[R4]ip route-static 192.168.1.128 27 null0
7.R4与R5间正常1000mb/s 故障时100mb/s
[R4]ip route-static 0.0.0.0 0 192.168.1.22preference 61
[R5]ip route-static 192.168.1.0 255.255.255.252192.168.1.21 preference 61
[R5]ip route-static 192.168.1.4 255.255.255.252192.168.1.21 preference 61
[R5]ip route-static 192.168.1.8 255.255.255.252192.168.1.21 preference 61
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61
用tracert追踪路由 ping通5.5.5.5