全网可达

该配置案例展示了如何在四个路由器(R1-R4)上基于192.168.1.0/24子网进行IP地址分配,并通过静态路由实现全网可达,同时满足不直接配置到达5.5.5.0/24网段路由的要求。每个路由器还配置了默认路由以确保通信,并调整接口优先级以实现链路故障切换。
摘要由CSDN通过智能技术生成

要求:

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 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值