题目:
![](https://img-blog.csdnimg.cn/img_convert/acf8b88d13cf7caa8b210f5fee1c5efd.jpeg)
步骤一:IP地址划分
分析:
图中直接观察到的有6个广播域(除了5.5.5.0/24,同下),又因为要求2中:R1-R4每个路由器存在两个环回接口,所以,共有14个广播域,即基于192.168.1.0/24需要划分14个子网段。
- 因为 14<2^4,所以网络位需要向主机位借四位:
192.168.1.00000000/28
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
- 划分出的14个子网以及对应的子网范围:
192.168.1.0/28 192.168.1.1-192.168.1.15
192.168.1.16/28 192.168.1.17-192.168.1.31
192.168.1.32/28 192.168.1.33-192.168.1.47
192.168.1.48/28 192.168.1.49-192.168.1.63
192.168.1.64/28 192.168.1.65-192.168.1.79
192.168.1.80/28 192.168.1.81-192.168.1.95
192.168.1.96/28 192.168.1.97-192.168.1.111
192.168.1.112/28 192.168.1.113-192.168.1.127
192.168.1.128/28 192.168.1.129-192.168.1.143
192.168.1.144/28 192.168.1.145-192.168.1.159
192.168.1.160/28 192.168.1.161-192.168.1.175
192.168.1.176/28 192.168.1.177-192.168.1.191
192.168.1.192/28 192.168.1.193-192.168.1.207
192.168.1.208/28 192.168.1.209-192.168.1.223
3.分配IP地址
![](https://img-blog.csdnimg.cn/img_convert/1d7ff29f4abf71837a4c3f08367556ac.png)
- 配置路由器接口IP地址
![](https://img-blog.csdnimg.cn/img_convert/f1828ac61bd22cc209e87e93e1302266.png)
步骤二:配置环回地址
1.R1
[R1-LoopBack0]ip address 192.168.1.1
[R1-LoopBack1]ip address 192.168.1.20
![](https://img-blog.csdnimg.cn/img_convert/b350145dded2405dc3a0e5b04bd26337.png)
2.R2
[R2-LoopBack0]ip address 192.168.1.50
[R2-LoopBack1]ip address 192.168.1.65
![](https://img-blog.csdnimg.cn/img_convert/289e60024c845dcff2856146a39ce13d.png)
3.R3
[R3-LoopBack0]ip address 192.168.1.97
[R3-LoopBack1]ip address 192.168.1.113
![](https://img-blog.csdnimg.cn/img_convert/c852012d64ee3f81cf38143d8f65e65c.png)
4.R4
[R4-LoopBack0]ip address 192.168.1.165
[R4-LoopBack1]ip address 192.168.1.177
![](https://img-blog.csdnimg.cn/img_convert/2f4fa4340384d0bdd8728e4943cea5f2.png)
5.R5
[R5-LoopBack0]ip address 5.5.5.1
![](https://img-blog.csdnimg.cn/img_convert/43e90130a4e5535f088b638465a54a99.png)
![](https://img-blog.csdnimg.cn/img_convert/7554015f909fc085d11a8651f66222af.png)
步骤三:配置缺省路由
将缺省路由引向5.5.5.0/24网段
- R1——下一跳R2或R3
[R1]ip route-static 0.0.0.0 0 192.168.1.40
[R1]ip route-static 0.0.0.0 0 192.168.1.80
- R2——下一跳R4
[R2]ip route-static 0.0.0.0 0 192.168.1.150
- R3——下一跳R4
[R3]ip route-static 0.0.0.0 0 192.168.1.130
- R4——下一跳R5
[R4]ip route-static 0.0.0.0 0 192.168.1.200
[R4]ip route-static 0.0.0.0 0 192.168.1.211
步骤四:避免环路出现
- 手工汇总——各个路由器的环回地址
① R1:
192.168.1.0/28
192.168.1.16/28
汇总:192.168.1.27
②R2
192.168.1.48/28
192.168.1.64/28
汇总:192.168.1.0/25
③R3
192.168.1.96/28
192.168.1.112/28
汇总:192.168.1.96/27
④R4
192.168.1.160/28
192.168.1.176/28
汇总:192.168.1.160/27
⑤R5
R5配置的所有静态路由都可汇总为一个网段:192.168.1.0/24
- 配置空接口
为了防止缺省路由与黑洞路由器相遇而出现环路,在每个路由器上设置一个空接口,结合汇总结果,空接口连接的路由条目设置为:192.168.0.0/23
[HUAWEI]ip route-static 192.168.0.0 23 NULLO 0
结果:
192.168.0.0/23 Static 60 0 D 0.0.0.0 NULL0
步骤五:全网可达
配置静态路由:
- R1——共6个路由条目(除缺省和空接口对应条目,同下)
![](https://img-blog.csdnimg.cn/img_convert/2304ba622214db5e25dcbc9457ab0874.png)
- R2——共6个路由条目
![](https://img-blog.csdnimg.cn/img_convert/f8c8dbd21318b432a62ee5f5acb0671e.png)
- R3——共6个路由条目
![](https://img-blog.csdnimg.cn/img_convert/9daf4f67a20b8269193ae80fede23375.png)
4.R4——共5个路由条目
![](https://img-blog.csdnimg.cn/img_convert/b349c38ee9730fa18cdf479ff90316fd.png)
5.R5——1个路由条目
![](https://img-blog.csdnimg.cn/img_convert/3e643703e66e3e7adc2ba38f21b99646.png)
步骤六:配置浮动静态路由
已知:R4从192.168.1.192/28网段的下一跳接口到R5的带宽是1000M
R4从192.168.1.208/28网段的下一跳接口到R5的带宽是100M
为了R4和R5之间,正常1000M链路通信,故障时自动100M链路通信,需要降低100M链路的优先值
R4——R5
[R4]ip route-static 0.0.0.0 0 192.168.1.211 preference 65
![](https://img-blog.csdnimg.cn/img_convert/e0443c024b9c4faf21c166e77fe1ef45.png)
![](https://img-blog.csdnimg.cn/img_convert/674f084b8ea31737788bebbd364a9f5b.png)
R5-R4
[R5]ip route-static 192.168.1.0 24 192.168.1.210 preference 65
![](https://img-blog.csdnimg.cn/img_convert/d4bb2678be96f44a4792ee65b865d5d1.png)
![](https://img-blog.csdnimg.cn/img_convert/5635752244b7a361996ffe5d9e01144c.png)
步骤七:检验
经检验,结果皆符合要求。