eNSP 华为浮动路由

R1:

<Huawei>system-view

[Huawei]sysname R1

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 172.16.1.1 24

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

[R1-GigabitEthernet0/0/1]ip add 10.10.1.1 24

[R1-GigabitEthernet0/0/1]quit

[R1]vlan 10 //e口是二层口,无法配置IP,需要用VLAN来配置IP

[R1-vlan10]int vlanif 10

[R1-Vlanif10]ip add 192.168.1.1 24

[R1-Vlanif10]quit

[R1]int e0/0/0

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

[R1-Ethernet0/0/0]port default vlan 10

[R1-Ethernet0/0/0]quit

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

[R1]ip route-static 192.168.3.0 24 10.10.1.2 preference 70

[R1]ip route-static 192.168.2.0 24 10.10.1.2 preference 60

[R1]ip route-static 192.168.2.0 24 172.16.1.2 preference 70

R2:

<Huawei>sys

[Huawei]sys R2

[R2]int g0/0/0

[R2-GigabitEthernet0/0/0]ip add 172.16.1.2 24

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

[R2-GigabitEthernet0/0/1]ip add 1.1.1.1 24

[R2-GigabitEthernet0/0/1]vlan 10

[R2-vlan10]int vlan 10

[R2-Vlanif10]ip add 192.168.3.1 24

[R2-Vlanif10]int e0/0/0

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

[R2-Ethernet0/0/0]port def vlan 10

[R2-Ethernet0/0/0]quit

[R2]ip route-static 192.168.1.0 24 172.16.1.1 preference 60

[R2]ip route-static 192.168.1.0 24 1.1.1.2 preference 70

[R2]ip route-static 192.168.2.0 24 1.1.1.2 preference 60

[R2]ip route-static 192.168.2.0 24 172.16.1.1 preference 70

R3:

<Huawei>sys

[Huawei]sys R3

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ip add 10.10.1.2 24

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

[R3-GigabitEthernet0/0/1]ip add 1.1.1.2 24

[R3-GigabitEthernet0/0/1]vlan 10

[R3-vlan10]int vlan 10

[R3-Vlanif10]ip add 192.168.2.1 24

[R3-Vlanif10]int e0/0/0

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

[R3-Ethernet0/0/0]port def vlan 10

[R3-Ethernet0/0/0]quit

[R3]ip route-static 192.168.1.0 24 10.10.1.1 preference 60

[R3]ip route-static 192.168.1.0 24 1.1.1.1 preference 70

[R3]ip route-static 192.168.3.0 24 1.1.1.1 preference 60

[R3]ip route-static 192.168.3.0 24 10.10.1.1 preference 70

修改R1路径优先级

[R1]ip route-static 192.168.2.0 24 10.10.1.2 preference 80

相关推荐
MarkHD5 分钟前
第十八天 WebView深度优化指南
华为·harmonyos
shimly1234561 小时前
tcpdump 用法示例
网络·测试工具·tcpdump
feiniao86512 小时前
2025年华为手机解锁BL的方法
华为·智能手机
xmweisi3 小时前
【华为】报文统计的技术NetStream
运维·服务器·网络·华为认证
VVVVWeiYee3 小时前
BGP配置华为——路径优选验证
运维·网络·华为·信息与通信
yourkin6664 小时前
TCP...
服务器·网络·tcp/ip
余多多_zZ5 小时前
鸿蒙初学者学习手册(HarmonyOSNext_API14)_组件截图(@ohos.arkui.componentSnapshot (组件截图) )
学习·华为·harmonyos·鸿蒙·鸿蒙系统
ktkiko116 小时前
Websocket——心跳检测
网络·websocket·网络协议
GGGGGGGGGGGGGG.7 小时前
hapxory-ACL基础介绍及案例
运维·服务器·网络
一个处女座的程序猿O(∩_∩)O7 小时前
鸿蒙开发技术指南:从入门到精通
华为·harmonyos