静态路由的扩展配置

需求:

1.除R5的换回地址固定以外,整个其他所有的网段基于192.168.1.0/24进行合理的IP地址划分

2.R1-R4每个路由器存在两个环回接口,用于模拟连接PC的网段;地址也在192.168.1.0/2

4这个网络范围内

3.R1-R4上不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问

4.全网可达,经量减少每台路由器,路由表条目的数量,避免环路出现

5.R4与R5间,正常1000M链路通信,故障时自动改为100M

 拓扑结构如下:

分析:

1.一共有14个广播域,所以需要将192.168.1.0/24 划分为16个子网

2.为了使路由表条目经量少,将R1,R2,R3的两个环回进行汇总,将R4的环回和与R5直连的网段进行汇总

3.为了不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问,需要配置缺省路由

4.因为划分的16个子网,只有14个广播域,所以得在R4上设置空接口

5.为R4与R5间,正常1000M链路通信,故障时自动改为100M,需要设置浮动静态路由

 配置:

配置ip

R1:

[R1]:interface G0/0/0

[R1-GigabitEthernet0/0/0] :ip address 192.168.1.129 28

[R1]:interface G0/0/1

[R1-GigabitEthernet0/0/1] :ip address 192.168.1.178 28

[R1]:interface l1

[R1-LoopBack1]:ip address 192.168.1.1 28

[R1]:interface l2

[R1-LoopBack2]:ip address 192.168.1.17 28

R2:

[R2]:interface G0/0/0

[R2-GigabitEthernet0/0/0] :ip address 192.168.1.145 28

[R2]:interface G0/0/1

[R2-GigabitEthernet0/0/1] :ip address 192.168.1.130 28

[R2]:interface l1

[R2-LoopBack1]:ip address 192.168.1.33 28

[R2]:interface l2

[R2-LoopBack2]:ip address 192.168.1.49 28

R3:

[R3]:interface G0/0/0

[R3-GigabitEthernet0/0/0] :ip address 192.168.1.161 28

[R3]:interface G0/0/1

[R3-GigabitEthernet0/0/1] :ip address 192.168.1.146 28

[R3]:interface l1

[R3-LoopBack1]:ip address 192.168.1.65 28

[R3]:interface l2

[R3-LoopBack2]:ip address 192.168.1.81 28

R4:

[R4]:interface G0/0/0

[R4-GigabitEthernet0/0/0] :ip address 192.168.1.177 28

[R4]:interface G0/0/1

[R4-GigabitEthernet0/0/1] :ip address 192.168.1.162 28

[R4]:interface G0/0/2

[R4-GigabitEthernet0/0/2] :ip address 192.168.1.193 28

[R4]:interface G4/0/0

[R4-GigabitEthernet4/0/0] :ip address 192.168.1.209 28

[R4]:interface l1

[R4-LoopBack1]:ip address 192.168.1.225 28

[R4]:interface l2

[R4-LoopBack2]:ip address 192.168.1.241 28

​​​​​​​R5:

[R5]:interface G0/0/0

[R5-GigabitEthernet0/0/0] :ip address 192.168.1.194 28

[R5]:interface G0/0/1

[R5-GigabitEthernet0/0/1] :ip address 192.168.1.210 28

[R5]:interface l1

[R5-LoopBack1]:ip address 5.5.5.1 24

 

 配置路由

R1:

[R1]ip route-static 192.168.1.32 27 192.168.1.130
[R1]ip route-static 192.168.1.144 28 192.168.1.130
[R1]ip route-static 192.168.1.64 27 192.168.1.130 
[R1]ip route-static 192.168.1.160 28 192.168.1.177
[R1]ip route-static 192.168.1.192 26 192.168.1.177

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.177

R2:

[R2]ip route-static 192.168.1.0 27 192.168.1.129
[R2]ip route-static 192.168.1.176 28 192.168.1.129
[R2]ip route-static 192.168.1.64 27 192.168.1.146 
[R2]ip route-static 192.168.1.160 28 192.168.1.146
[R2]ip route-static 192.168.1.192 26 192.168.1.129

[R2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.129

 R3:

[R3]ip route-static 192.168.1.32 27 192.168.1.145
[R3]ip route-static 192.168.1.128 28 192.168.1.145
[R3]ip route-static 192.168.1.0 27 192.168.1.145 
[R3]ip route-static 192.168.1.176 28 192.168.1.162
[R3]ip route-static 192.168.1.192 26 192.168.1.162

[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.162

R4:

[R4]ip route-static 192.168.1.64 27 192.168.1.161   
[R4]ip route-static 192.168.1.144 28 192.168.1.161
[R4]ip route-static 192.168.1.0 27 192.168.1.178  
[R4]ip route-static 192.168.1.128 28 192.168.1.178
[R4]ip route-static 192.168.1.32 27 192.168.1.178 

[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.194 

[R4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.210 preference 61

R5

 [R5]ip route-static 192.168.1.0 24 192.168.1.193

[R5]ip route-static 192.168.1.0 24 192.168.1.209 preference 61

 设置空接口

[R4]ip route-static 192.168.1.0 24 NULL 0

验证:

全网可达

 

 

没有路由黑洞

浮动静态:

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值