华为设备浮动路由具体实验操作详情

浮动路由

是指配置两条静态路由,默认选取带宽大的为主线路,当链路发生问题时带宽小的备用链路顶替,保持网络的不中断。

在这里插入图片描述

实验步骤

1.所有设备必打命令R1为例:

undo terminal monitor ——关闭弹屏
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1——修改名字
r1]user-interface console 0
[r1-ui-console0]id
[r1-ui-console0]idle-timeout 0 0——启用永不超时
[r1-ui-console0]quit

2.配置端口设备IP地址

R1
[r1]int g0/0/0——进入端口
[r1-GigabitEthernet0/0/0]ip add 10.1.1.1 24——端口地址
[r1-GigabitEthernet0/0/0]undo shutdown ——开启
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[r1-GigabitEthernet0/0/0]int loop0
[r1-LoopBack0]ip add 1.1.1.1 32——环回地址
[r1-LoopBack0]quit
[r1]int e0/0/0
[r1-Ethernet0/0/0]ip add 10.1.3.1 24
r1-Ethernet0/0/0]undo shutdown

R2
undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]user-interface console 0
[r2-ui-console0]id
[r2-ui-console0]idle-timeout 0 0
[r2-ui-console0]quit
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip add 10.1.1.2 24
[r2-GigabitEthernet0/0/0]int g0/0/1
r2-GigabitEthernet0/0/1]ip add 10.1.2.2 24
[r2-GigabitEthernet0/0/1]quit
[r2]int e0/0/0
[r2-Ethernet0/0/0]ip add 10.1.3.2 24
[r2-Ethernet0/0/0]undo shutdown
Info: Interface Ethernet0/0/0 is not shutdown.
[r2-Ethernet0/0/0]quit

R3
undo te
undo terminal mo
undo terminal monitor
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]user
[r3]user-in
[r3]user-interface co
[r3]user-interface console 0
[r3-ui-console0]id
[r3-ui-console0]idle-timeout 0 0
[r3-ui-console0]quit
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 10.1.2.3 24
[r3-GigabitEthernet0/0/0]int loop0
[r3-LoopBack0]ip add 3.3.3.3 32
[r3-LoopBack0]quit

测试直连网段联通性
在R2做测试

[r2]ping 10.1.2.3——同网段端口
PING 10.1.2.3: 56 data bytes, press CTRL_C to break
Reply from 10.1.2.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 10.1.2.3: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 10.1.2.3: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.1.2.3: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 10.1.2.3: bytes=56 Sequence=5 ttl=255 time=40 ms

联通性无异常后配置静态路由
R1

[r1]ip rou
[r1]ip route
[r1]ip route-static 0.0.0.0 0.0.0.0 10.1.1.2——默认路由所有网段
[r1]ip route-static 0.0.0.0 0.0.0.0 10.1.3.2 pre
[r1]ip route-static 0.0.0.0 0.0.0.0 10.1.3.2 preference 61——默认60
Error: The route already exists.

R2
[r2]ip rou
[r2]ip route
[r2]ip route-static 1.1.1.1 32 10.1.1.1
[r2]ip route-static 3.3.3.3 32 10.1.2.3
r2]ip route
[r2]ip route-static 1.1.1.1 32 10.1.3.1 pr
[r2]ip route-static 1.1.1.1 32 10.1.3.1 preference 61
[r2]

R3

[r3]ip rou
[r3]ip route
[r3]ip route-static 0.0.0.0 0.0.0.0 10.1.2.2——R3只有一条线路只需一条默认路由

关闭线路G0/0/0C测试线路E0/0/0
[r1-GigabitEthernet0/0/0]shutdown
R3测试

[r3]ping 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=254 time=60 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=254 time=60 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=254 time=80 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=254 time=50 ms

查看路由ID
[r1]display ip routing-table
0.0.0.0/0 Static 61 0 RD 10.1.3.2 Ethernet0/0/0——61说明浮动可以使用
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.1.3.0/24 Direct 0 0 D 10.1.3.1 Ethernet0/0/0
10.1.3.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

猜你喜欢

转载自blog.csdn.net/weixin_49228721/article/details/107593065