要求:
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、2,将192.168.1.0/24划分成16个范围,并选择其中的14个范围配置在各路由器和环回接口上
第二步: 进行基础配置
R1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ad 192.168.1.1 28
[r1-GigabitEthernet0/0/0]q
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip ad 192.168.1.17 28
[r1]int l0
[r1-LoopBack0]ip ad 192.168.1.97 28
[r1-LoopBack0]q
[r1]int l1
[r1-LoopBack1]ip ad 192.168.1.113 28
R2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip ad 192.168.1.2 28
[r2-GigabitEthernet0/0/0]q
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip ad 192.168.1.33 28
[r2]int l0
[r2-LoopBack0]ip ad 192.168.1.129 28
[r2-LoopBack0]q
[r2]int l1
[r2-LoopBack1]ip ad 192.168.1.145 28
R3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip ad 192.168.1.49 28
[r3-GigabitEthernet0/0/0]q
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip ad 192.168.1.18 28
[r3]int l0
[r3-LoopBack0]ip ad 192.168.1.161 28
[r3-LoopBack0]q
[r3]int l1
[r3-LoopBack1]ip ad 192.168.1.177 28
R4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip ad 192.168.1.34 28
[r4-GigabitEthernet0/0/0]q
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip ad 192.168.1.50 28
[r4-GigabitEthernet0/0/1]
[r4-GigabitEthernet0/0/1]q
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip ad 192.168.1.65 28
[r4]int Ethernet 4/0/0
[r4-Ethernet4/0/0]ip ad 192.168.1.81 28
[r4]int l0
[r4-LoopBack0]ip ad 192.168.1.193 28
[r4-LoopBack0]q
[r4]int l1
[r4-LoopBack1]ip ad 192.168.1.209 28
R5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip ad 192.168.1.66 28
[r5-GigabitEthernet0/0/0]q
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip ad 192.168.1.82 28
[r5]int l0
[r5-LoopBack0]ip ad 5.5.5.1 24
第三步:为了实现要求3、要求5,在R1-R4上配置缺省路由,在R5上配置静态路由和浮动路由,并使R1-R4之间能够互通
R1
[r1]ip route-static 192.168.1.32 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.64 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.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.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.192 28 192.168.1.2
[r1]ip route-static 192.168.1.192 28 192.168.1.18
[r1]ip route-static 192.168.1.208 28 192.168.1.2
[r1]ip route-static 192.168.1.208 28 192.168.1.18
[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.18
R2
[r2]ip route-static 0.0.0.0 0 192.168.1.34
[r2]ip route-static 192.168.1.16 28 192.168.1.1
[r2]ip route-static 192.168.1.48 28 192.168.1.34
[r2]ip route-static 192.168.1.64 28 192.168.1.34
[r2]ip route-static 192.168.1.96 28 192.168.1.1
[r2]ip route-static 192.168.1.112 28 192.168.1.1
[r2]ip route-static 192.168.1.160 28 192.168.1.1
[r2]ip route-static 192.168.1.160 28 192.168.1.34
[r2]ip route-static 192.168.1.176 28 192.168.1.1
[r2]ip route-static 192.168.1.176 28 192.168.1.34
[r2]ip route-static 192.168.1.192 28 192.168.1.34
[r2]ip route-static 192.168.1.208 28 192.168.1.34
R3
[r3]ip route-static 0.0.0.0 0 192.168.1.50
[r3]ip route-static 192.168.1.0 28 192.168.1.17
[r3]ip route-static 192.168.1.32 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.96 28 192.168.1.17
[r3]ip route-static 192.168.1.112 28 192.168.1.17
[r3]ip route-static 192.168.1.128 28 192.168.1.17
[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.17
[r3]ip route-static 192.168.1.144 28 192.168.1.50
[r3]ip route-static 192.168.1.192 28 192.168.1.50
[r3]ip route-static 192.168.1.208 28 192.168.1.50
R4
[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 preference 61
[r4]ip route-static 192.168.1.0 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.96 28 192.168.1.33
[r4]ip route-static 192.168.1.96 28 192.168.1.49
[r4]ip route-static 192.168.1.112 28 192.168.1.33
[r4]ip route-static 192.168.1.112 28 192.168.1.49
[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.160 28 192.168.1.49
[r4]ip route-static 192.168.1.176 28 192.168.1.49
R5
[r5]ip route-static 0.0.0.0 0 192.168.1.65
[r5]ip route-static 0.0.0.0 0 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.0 28 192.168.1.65
[r5]ip route-static 192.168.1.0 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.16 28 192.168.1.65
[r5]ip route-static 192.168.1.16 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.97 28 192.168.1.65
[r5]ip route-static 192.168.1.97 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.113 28 192.168.1.65
[r5]ip route-static 192.168.1.113 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.128 28 192.168.1.65
[r5]ip route-static 192.168.1.128 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.144 28 192.168.1.65
[r5]ip route-static 192.168.1.144 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.160 28 192.168.1.65
[r5]ip route-static 192.168.1.160 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.176 28 192.168.1.65
[r5]ip route-static 192.168.1.176 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.192 28 192.168.1.65
[r5]ip route-static 192.168.1.192 28 192.168.1.81 pre 61
[r5]ip route-static 192.168.1.208 28 192.168.1.65
[r5]ip route-static 192.168.1.208 28 192.168.1.81 pre 61
第四步:为了实现要求四,可以在R1上设置空接口
R1
[r1]ip route-static 192.168.1.0 24 NULL 0
结果:
1.正常1000M链路通信时
2.故障自动改为100M时
文章来源地址https://www.toymoban.com/news/detail-508727.html文章来源:https://www.toymoban.com/news/detail-508727.html
到了这里,关于配置静态路由实现全网互通的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!