静态路由
华为不同路由的优先级
路由的优先级越小越优先。
浮动路由
AR1配置
interface GigabitEthernet0/0/0 ip address 12.12.12.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 13.13.13.1 255.255.255.0 # interface GigabitEthernet0/0/2 # interface NULL0 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # ip route-static 3.3.3.3 255.255.255.255 13.13.13.3 ip route-static 3.3.3.3 255.255.255.255 12.12.12.2 preference 80 ip route-static 23.23.23.0 255.255.255.0 13.13.13.3 ip route-static 23.23.23.0 255.255.255.0 12.12.12.2 preference 80
AR2配置
interface GigabitEthernet0/0/0 ip address 12.12.12.2 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 23.23.23.2 255.255.255.0 # interface GigabitEthernet0/0/2 # interface NULL0 # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # ip route-static 3.3.3.3 255.255.255.255 23.23.23.3 #
AR3配置
interface GigabitEthernet0/0/0 ip address 23.23.23.3 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 13.13.13.3 255.255.255.0 # interface GigabitEthernet0/0/2 # interface NULL0 # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # ip route-static 12.12.12.0 255.255.255.0 23.23.23.2 #
[Huawei]ping 3.3.3.3 PING 3.3.3.3: 56 data bytes, press CTRL_C to break Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=50 ms Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=10 ms Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=20 ms Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=10 ms --- 3.3.3.3 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 10/24/50 ms [Huawei]tra [Huawei]tracert 3.3.3.3 traceroute to 3.3.3.3(3.3.3.3), max hops: 30 ,packet length: 40,press CTRL_C t o break 1 13.13.13.3 20 ms 20 ms 20 ms [Huawei]
去往3.3.3.3,是从13.13.13.3过去的。
关闭AR3的G0/0/1口
[Huawei]interface GigabitEthernet 0/0/1 [Huawei-GigabitEthernet0/0/1]shutdown May 14 2020 17:32:14-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt hernet0/0/1 has turned into DOWN state. [Huawei-GigabitEthernet0/0/1] [Huawei-GigabitEthernet0/0/1] May 14 2020 17:32:14-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the DOWN state.
[Huawei]tracert 3.3.3.3 traceroute to 3.3.3.3(3.3.3.3), max hops: 30 ,packet length: 40,press CTRL_C t o break 1 12.12.12.2 540 ms 20 ms 20 ms 2 23.23.23.3 30 ms 30 ms 30 ms
去往3.3.3.3要先经过AR2。
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?