单臂路由+浮动路由网络测试

单臂路由+浮动路由网络测试

● 测试目的

利用单臂路由和浮动路由实现全网互通;设置浮动路由时,默认走主路径12网段,当主路径失效时,备份的路径21网段生效

● 拓扑图

在这里插入图片描述

● 测试设备配置

配置三台路由器分别为:R1、R2、R3
配置两台二层交换机分别为:LSW1、LSW3
配置四台PC机分别为:
PC1:192.168.10.10
PC2:192.168.20.20
PC3:192.168.30.30
PC4:192.168.40.40

● 测试步骤

1、交换机LSW1配置

<Huawei>undo t 
<Huawei>undo terminal m
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname L2-LSW1
[L2-LSW1]USER-IN 
[L2-LSW1]user-interface ID 
[L2-LSW1]user-interface C 
[L2-LSW1]user-in 
[L2-LSW1]user-interface co 
[L2-LSW1]user-interface console 0
[L2-LSW1-ui-console0]id 
[L2-LSW1-ui-console0]idle-timeout 0 0
[L2-LSW1-ui-console0]q
[L2-LSW1]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[L2-LSW1]int e0/0/1
[L2-LSW1-Ethernet0/0/1]port hy 
[L2-LSW1-Ethernet0/0/1]port hybrid p 
[L2-LSW1-Ethernet0/0/1]port hybrid pvid vlan 10
[L2-LSW1-Ethernet0/0/1]port hy 
[L2-LSW1-Ethernet0/0/1]port hybrid un 
[L2-LSW1-Ethernet0/0/1]port hybrid untagged vlan all
[L2-LSW1-Ethernet0/0/1]int e0/0/2
[L2-LSW1-Ethernet0/0/2]port hu 
[L2-LSW1-Ethernet0/0/2]port hy 
[L2-LSW1-Ethernet0/0/2]port hybrid p 
[L2-LSW1-Ethernet0/0/2]port hybrid pvid vlan 20
[L2-LSW1-Ethernet0/0/2]port hy 
[L2-LSW1-Ethernet0/0/2]port hybrid un 
[L2-LSW1-Ethernet0/0/2]port hybrid untagged vlan all
[L2-LSW1-Ethernet0/0/2]int g0/0/1
[L2-LSW1-GigabitEthernet0/0/1]undo sh 
[L2-LSW1-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[L2-LSW1-GigabitEthernet0/0/1]port l 
[L2-LSW1-GigabitEthernet0/0/1]port link-t 
[L2-LSW1-GigabitEthernet0/0/1]port link-type t 
[L2-LSW1-GigabitEthernet0/0/1]port link-type trunk 
[L2-LSW1-GigabitEthernet0/0/1]
[L2-LSW1-GigabitEthernet0/0/1]port tr 
[L2-LSW1-GigabitEthernet0/0/1]port trunk a 
[L2-LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all


2、交换机LSW3配置

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname L2-LSW3
[L2-LSW3]user-in 
[L2-LSW3]user-interface co 
[L2-LSW3]user-interface console 0
[L2-LSW3-ui-console0]id 
[L2-LSW3-ui-console0]idle-timeout 0 0
[L2-LSW3-ui-console0]q
[L2-LSW3]vlan bat 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[L2-LSW3]int e0/0/1
[L2-LSW3-Ethernet0/0/1]port hy 
[L2-LSW3-Ethernet0/0/1]port hybrid p 
[L2-LSW3-Ethernet0/0/1]port hybrid pvid vlan 30
[L2-LSW3-Ethernet0/0/1]port hy 
[L2-LSW3-Ethernet0/0/1]port hybrid un 
[L2-LSW3-Ethernet0/0/1]port hybrid untagged vlan all
[L2-LSW3-Ethernet0/0/1]int e0/0/2
[L2-LSW3-Ethernet0/0/2]port hy 
[L2-LSW3-Ethernet0/0/2]port hybrid p 
[L2-LSW3-Ethernet0/0/2]port hybrid pvid vlan 40
[L2-LSW3-Ethernet0/0/2]port hy 
[L2-LSW3-Ethernet0/0/2]port hybrid un 
[L2-LSW3-Ethernet0/0/2]port hybrid untagged vlan all
[L2-LSW3-Ethernet0/0/2]int g0/0/1
[L2-LSW3-GigabitEthernet0/0/1]undo sh 
[L2-LSW3-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[L2-LSW3-GigabitEthernet0/0/1]port l 
[L2-LSW3-GigabitEthernet0/0/1]port link-t 
[L2-LSW3-GigabitEthernet0/0/1]port link-type t
[L2-LSW3-GigabitEthernet0/0/1]port link-type tr 
[L2-LSW3-GigabitEthernet0/0/1]port link-type trunk 
[L2-LSW3-GigabitEthernet0/0/1]port tr 
[L2-LSW3-GigabitEthernet0/0/1]port trunk a 
[L2-LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[L2-LSW3-GigabitEthernet0/0/1]q

3、路由器R1配置

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]user-in 
[R1]user-interface co 
[R1]user-interface console 0
[R1-ui-console0]id 
[R1-ui-console0]idle-timeout 0 0
[R1-ui-console0]int g0/0/0
[R1-GigabitEthernet0/0/0]undo sh 
[R1-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]vlan-t 
[R1-GigabitEthernet0/0/0.1]vlan-type d 
[R1-GigabitEthernet0/0/0.1]vlan-type dot1q 10
[R1-GigabitEthernet0/0/0.1]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]vlan- 
[R1-GigabitEthernet0/0/0.2]vlan-type d 
[R1-GigabitEthernet0/0/0.2]vlan-type dot1q 20
[R1-GigabitEthernet0/0/0.2]ip add 192.168.20.1 24
[R1-GigabitEthernet0/0/0.2]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]undo t 
[R1-GigabitEthernet0/0/1]undo sh 
[R1-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/1]q
[R1]int e0/0/0
[R1-Ethernet0/0/0]ip add 21.1.1.1 24
[R1-Ethernet0/0/0]q
[R1]ip rp 
[R1]ip ro 
[R1]ip route- 
[R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
[R1]ip r 
[R1]ip ro 
[R1]ip route-s 
[R1]ip route-static 0.0.0.0 0.0.0.0 21.1.1.2
[R1]
[R1]
[R1]
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]shutd 
[R1-GigabitEthernet0/0/1]shutdown 
[R1-GigabitEthernet0/0/1]ip ro 
[R1-GigabitEthernet0/0/1]q
[R1]ip ro 
[R1]ip route- 
[R1]ip route-static 0.0.0.0 0.0.0.0  21.1.1.2 p 
[R1]ip route-static 0.0.0.0 0.0.0.0  21.1.1.2 preference 61
Info: Succeeded in modifying route.

4、路由器R2配置

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]user-in 
[R2]user-interface co 
[R2]user-interface console 0
[R2-ui-console0]id 
[R2-ui-console0]idle-timeout 0 0
[R2-ui-console0]int g0/0/0
[R2-GigabitEthernet0/0/0]undo sh 
[R2-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]q
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip add 21.1.1.2 24
[R2-Ethernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]undo sh 
[R2-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[R2-GigabitEthernet0/0/1]q
[R2]ip ro 
[R2]ip route- 
[R2]ip route-static 192.168.10.0 255.255.255.0 12.1.1.1
[R2]ip r 
[R2]ip ro 
[R2]ip route- 
[R2]ip route-static 192.168.20.0 255.255.255.0 12.1.1.1
[R2]ip rou 
[R2]ip route- 
[R2]ip route-static 192.168.30.0 255.255.255.0 23.1.1.4
[R2]ip ro 
[R2]ip route- 
[R2]ip route-static 192.168.40.0 255.255.255.0 23.1.1.4
[R2]ip r 
[R2]ip relay- 
[R2]ip ro 
[R2]ip route- 
[R2]ip route-static 192.168.10.0 255.255.255.0 21.1.1.1
[R2]ip ro 
[R2]ip route- 
[R2]ip route-static 192.168.20.0 255.255.255.0 21.1.1.1
[R2]q

5、路由器R4配置

<Huawei>undo terminal monitor 
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]user-in 
[R4]user-interface co 
[R4]user-interface console 0
[R4-ui-console0]id 
[R4-ui-console0]idle-timeout 0 0
[R4-ui-console0]int g0/0/1
[R4-GigabitEthernet0/0/1]undo sh 
[R4-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R4-GigabitEthernet0/0/1]int g0/0/1.1
[R4-GigabitEthernet0/0/1.1]vlan- 
[R4-GigabitEthernet0/0/1.1]vlan-type d 
[R4-GigabitEthernet0/0/1.1]vlan-type dot1q 30
[R4-GigabitEthernet0/0/1.1]ip add 192.168.30.1 24
[R4-GigabitEthernet0/0/1.1]int g0/0/1.2
[R4-GigabitEthernet0/0/1.2]vlan-t 
[R4-GigabitEthernet0/0/1.2]vlan-type  do 
[R4-GigabitEthernet0/0/1.2]vlan-type  dot1q 40
[R4-GigabitEthernet0/0/1.2]ip add 192.168.40.1 24
[R4-GigabitEthernet0/0/1.2]int g0/0/0
[R4-GigabitEthernet0/0/0]undo sh 
[R4-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R4-GigabitEthernet0/0/0]ip add 23.1.1.4 24
[R4-GigabitEthernet0/0/0]ip r 
[R4-GigabitEthernet0/0/0]ip ro 
[R4-GigabitEthernet0/0/0]q
[R4]ip ro 
[R4]ip route-s 
[R4]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2

● 测试验证

PC1可以访问到PC3和PC4(如下图)
在这里插入图片描述

PC2可以访问PC3和PC4(如下图)
在这里插入图片描述
PC3可以访问PC4(如下图)
在这里插入图片描述
PC1可以访问PC2(如下图)
在这里插入图片描述
下面断开主路径12网段,测试浮动路由(如下图)
在这里插入图片描述
PC1可以访问PC3和PC4(如下图)
在这里插入图片描述

PC2可以访问PC3和PC4(如下图)
在这里插入图片描述
PC4可以访问PC3(如下图)
在这里插入图片描述

PC2可以访问PC1(如下图)
在这里插入图片描述

● 测试总结

本次测试先通过主路径12网段,测试全网互通,R1和R4上添加默认路由,R2上要添加4条静态路由,才能实现全网互通。
断开主路径12网段,因为有21网段的浮动路由,所以依然可以实现全网互通。

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值