eNSP 华为浮动路由

R1:

<Huawei>system-view

Huaweisysname R1

R1int g0/0/0

R1-GigabitEthernet0/0/0ip add 172.16.1.1 24

R1-GigabitEthernet0/0/0int g0/0/1

R1-GigabitEthernet0/0/1ip add 10.10.1.1 24

R1-GigabitEthernet0/0/1quit

R1vlan 10 //e口是二层口,无法配置IP,需要用VLAN来配置IP

R1-vlan10int vlanif 10

R1-Vlanif10ip add 192.168.1.1 24

R1-Vlanif10quit

R1int e0/0/0

R1-Ethernet0/0/0port link-type access

R1-Ethernet0/0/0port default vlan 10

R1-Ethernet0/0/0quit

R1ip route-static 192.168.3.0 24 172.16.1.2 preference 60 //静态路由默认60优先级,数字越大,优先级越小

R1ip route-static 192.168.3.0 24 10.10.1.2 preference 70

R1ip route-static 192.168.2.0 24 10.10.1.2 preference 60

R1ip route-static 192.168.2.0 24 172.16.1.2 preference 70

R2:

<Huawei>sys

Huaweisys R2

R2int g0/0/0

R2-GigabitEthernet0/0/0ip add 172.16.1.2 24

R2-GigabitEthernet0/0/0int g0/0/1

R2-GigabitEthernet0/0/1ip add 1.1.1.1 24

R2-GigabitEthernet0/0/1vlan 10

R2-vlan10int vlan 10

R2-Vlanif10ip add 192.168.3.1 24

R2-Vlanif10int e0/0/0

R2-Ethernet0/0/0port link-t acc

R2-Ethernet0/0/0port def vlan 10

R2-Ethernet0/0/0quit

R2ip route-static 192.168.1.0 24 172.16.1.1 preference 60

R2ip route-static 192.168.1.0 24 1.1.1.2 preference 70

R2ip route-static 192.168.2.0 24 1.1.1.2 preference 60

R2ip route-static 192.168.2.0 24 172.16.1.1 preference 70

R3:

<Huawei>sys

Huaweisys R3

R3int g0/0/0

R3-GigabitEthernet0/0/0ip add 10.10.1.2 24

R3-GigabitEthernet0/0/0int g0/0/1

R3-GigabitEthernet0/0/1ip add 1.1.1.2 24

R3-GigabitEthernet0/0/1vlan 10

R3-vlan10int vlan 10

R3-Vlanif10ip add 192.168.2.1 24

R3-Vlanif10int e0/0/0

R3-Ethernet0/0/0port link-t acc

R3-Ethernet0/0/0port def vlan 10

R3-Ethernet0/0/0quit

R3ip route-static 192.168.1.0 24 10.10.1.1 preference 60

R3ip route-static 192.168.1.0 24 1.1.1.1 preference 70

R3ip route-static 192.168.3.0 24 1.1.1.1 preference 60

R3ip route-static 192.168.3.0 24 10.10.1.1 preference 70

修改R1路径优先级

R1ip route-static 192.168.2.0 24 10.10.1.2 preference 80

相关推荐
程序猿追1 天前
那个右下角的小数字怎么“卡”住我打字——我用 HarmonyOS 自己写了一个字数限制输入框
pytorch·华为·harmonyos
古德new1 天前
鸿蒙PC使用electron迁移:Joplin Electron 桌面适配全记录
华为·electron·harmonyos
世人万千丶1 天前
桌面便签小应用 - HarmonyOS ArkUI 开发实战-TextArea与Flex布局-PC版本
华为·harmonyos·鸿蒙·鸿蒙系统
慧海灵舟1 天前
AGenUI 鸿蒙端实战踩坑录:从 Column 布局消失到异步组件宽度为 0
华为·harmonyos
yuegu7771 天前
HarmonyOS应用<节气通>开发第33篇:状态管理实战
华为·harmonyos
YM52e1 天前
买菜计算器小应用 - HarmonyOS ArkUI 开发实战-PC版本
学习·华为·harmonyos·鸿蒙·鸿蒙系统
网络研究院1 天前
2026年网络安全
网络·安全·法律·法规·趋势·发展
阿捏利1 天前
系列总览-鸿蒙科普系列完全指南
华为·harmonyos
酣大智1 天前
ARP代理--工作原理
运维·网络·arp·arp代理
treesforest1 天前
AI安全系统如何识别异常访问?IP风险识别正在成为关键能力
网络·人工智能·tcp/ip·安全·web安全