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

相关推荐
%小农8 分钟前
在cursor中使用server
网络·网络协议·http
ivy159868377151 小时前
芯锦科技 HP9117 多协议USB Type-A快充识别芯片
网络·科技·网络协议·5g·信号处理·p2p
西红市杰出青年2 小时前
MCP 的三种数据传输模式教程(stdio / SSE / Streamable HTTP)
网络·网络协议·http·ai
小白学鸿蒙2 小时前
串口通信发送后无响应|极简排查步骤(实战总结)
华为·harmonyos
Filotimo_2 小时前
内网穿透概念
网络
minji...3 小时前
Linux 进程间通信(三)命名管道
linux·服务器·网络
kongba0074 小时前
OpenClaw v2026.3.23 安全配置复盘:从多处明文到集中受控存储《OpenClaw 安全部署 SOP(v2026.3.23)V2》
服务器·网络·安全
郭涤生5 小时前
CANopen 基础复习
服务器·网络·c++
normanhere5 小时前
H3C无线调优案例
网络
饿了吃洗衣凝珠6 小时前
hcip 作业
网络