一.设计要求
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间,正常1000M链路通信,故障时自动改为100M。
二.具体步骤
1.子网划分
192.168.1.0/24 划两个,借一位 一个分给主网段,一个分为环回
192.168.1.0/25 主网段 分为六个,借三位
192.168.1.0 000 0000 192.168.1.0/28 R1-R2
192.168.1.0 001 0000 192.168.1.16/28 R2-R4
192.168.1.0 010 0000 192.168.1.32/28 R1-R3
192.168.1.0 011 0000 192.168.1.48/28 R3-R4
192.168.1.0 100 0000 192.168.1.64/28 R4-R5 100M
192.168.1.0 101 0000 192.168.1.80/28 R4-R5 1000M
192.168.1.0 110 0000 192.168.1.96/28
192.168.1.0 111 0000 192.168.1.112/28
192.168.1.128/25 环回 八个环回,借三位
192.168.1.1 000 0000 192.168.1.128/28 R1
192.168.1.1 001 0000 192.168.1.144/28
192.168.1.1 010 0000 192.168.1.160/28 R2
192.168.1.1 011 0000 192.168.1.176/28
192.168.1.1 100 0000 192.168.1.192/28 R3
192.168.1.1 101 0000 192.168.1.208/28
192.168.1.1 110 0000 192.168.1.224/28 R4
192.168.1.1 111 0000 192.168.1.240/28
2.配置IP及环回
R1:
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 28
[R1-GigabitEthernet0/0/0]q
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.33 28
[R1-GigabitEthernet0/0/1]q
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 192.168.1.129 28
[R1-LoopBack0]q
[R1]interface LoopBack 1
[R1-LoopBack1]ip address 192.168.1.145 28
R2:
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 192.168.1.161 28
[R2-LoopBack0]q
[R2]interface LoopBack 1
[R2-LoopBack1]ip address 192.168.1.177 28
[R2-LoopBack1]q
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 28
[R2-GigabitEthernet0/0/0]q
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.17 28
[R2-GigabitEthernet0/0/1]q
R3:
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 192.168.1.193 28
[R3-LoopBack0]q
[R3]interface LoopBack 1
[R3-LoopBack1]ip address 192.168.1.209 28
[R3-LoopBack1]q
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.34 28
[R3-GigabitEthernet0/0/0]q
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.49 28
[R3-GigabitEthernet0/0/1]q
R4:
[R4]interface LoopBack 0
[R4-LoopBack0]ip address 192.168.1.225 28
[R4-LoopBack0]q
[R4]interface LoopBack 1
[R4-LoopBack1]ip address 192.168.1.241 28
[R4-LoopBack1]q
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.18 28
[R4-GigabitEthernet0/0/0]q
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.50 28
[R4-GigabitEthernet0/0/1]q
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.65 28
[R4-GigabitEthernet0/0/2]q
[R4]interface g4/0/0
[R4-GigabitEthernet4/0/0]ip address 192.168.1.81 28
[R4-GigabitEthernet4/0/0]q
R5:
[R5]interface LoopBack 0
[R5-LoopBack0]ip address 5.5.5.1 24
[R5-LoopBack0]q
[R5]interface g0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.1.66 28
[R5-GigabitEthernet0/0/0]q
[R5]interface g0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.1.82 28
[R5-GigabitEthernet0/0/1]q
3.R1-R4的静态路由配置
R1:
[R1]ip route-static 192.168.1.16 28 192.168.1.2
[R1]ip route-static 192.168.1.48 28 192.168.1.34
[R1]ip route-static 192.168.1.80 28 192.168.1.34
[R1]ip route-static 192.168.1.64 28 192.168.1.2
[R1]ip route-static 192.168.1.160 28 192.168.1.2
[R1]ip route-static 192.168.1.176 28 192.168.1.2
[R1]ip route-static 192.168.1.192 28 192.168.1.34
[R1]ip route-static 192.168.1.208 28 192.168.1.34
[R1]ip route-static 192.168.1.224 28 192.168.1.34
[R1]ip route-static 192.168.1.240 28 192.168.1.34
[R1]ip route-static 192.168.1.240 28 192.168.1.2
[R1]ip route-static 192.168.1.224 28 192.168.1.2
R2:
[R2]ip route-static 192.168.1.32 28 192.168.1.1
[R2]ip route-static 192.168.1.48 28 192.168.1.18
[R2]ip route-static 192.168.1.64 28 192.168.1.18
[R2]ip route-static 192.168.1.80 28 192.168.1.18
[R2]ip route-static 192.168.1.192 28 192.168.1.1
[R2]ip route-static 192.168.1.208 28 192.168.1.1
[R2]ip route-static 192.168.1.128 28 192.168.1.1
[R2]ip route-static 192.168.1.144 28 192.168.1.1
[R2]ip route-static 192.168.1.224 28 192.168.1.18
[R2]ip route-static 192.168.1.240 28 192.168.1.18
R3:
[R3]ip route-static 192.168.1.0 28 192.168.1.33
[R3]ip route-static 192.168.1.16 28 192.168.1.50
[R3]ip route-static 192.168.1.64 28 192.168.1.50
[R3]ip route-static 192.168.1.80 28 192.168.1.50
[R3]ip route-static 192.168.1.128 28 192.168.1.50
[R3]ip route-static 192.168.1.144 28 192.168.1.50
[R3]ip route-static 192.168.1.160 28 192.168.1.50
[R3]ip route-static 192.168.1.176 28 192.168.1.5
[R3]ip route-static 192.168.1.224 28 192.168.1.33
[R3]ip route-static 192.168.1.240 28 192.168.1.33
R4:
[R4]ip route-static 192.168.1.0 28 192.168.1.17
[R4]ip route-static 192.168.1.32 28 192.168.1.49
[R4]ip route-static 192.168.1.160 28 192.168.1.17
[R4]ip route-static 192.168.1.176 28 192.168.1.17
[R4]ip route-static 192.168.1.128 28 192.168.1.49
[R4]ip route-static 192.168.1.144 28 192.168.1.49
[R4]ip route-static 192.168.1.192 28 192.168.1.49
[R4]ip route-static 192.168.1.208 28 192.168.1.49
R5:
[R5]ip route-static 192.168.1.0 28 192.168.1.65
[R5]ip route-static 192.168.1.16 28 192.168.1.65
[R5]ip route-static 192.168.1.32 28 192.168.1.65
[R5]ip route-static 192.168.1.48 28 192.168.1.65
[R5]ip route-static 192.168.1.128 28 192.168.1.65
[R5]ip route-static 192.168.1.144 28 192.168.1.65
[R5]ip route-static 192.168.1.160 28 192.168.1.65
[R5]ip route-static 192.168.1.176 28 192.168.1.65
[R5]ip route-static 192.168.1.192 28 192.168.1.6
[R5]ip route-static 192.168.1.208 28 192.168.1.65
[R5]ip route-static 192.168.1.224 28 192.168.1.65
[R5]ip route-static 192.168.1.240 28 192.168.1.65
4.配置缺省路由
[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.34
[R2]ip route-static 0.0.0.0 0 192.168.1.18
[R3]ip route-static 0.0.0.0 0 192.168.1.50
[R4]ip route-static 0.0.0.0 0 192.168.1.66
[R4]ip route-static 0.0.0.0 0 192.168.1.82
5.浮动静态路由
[R4]ip route-static 5.5.5.0 24 192.168.1.66 preference 66