华三网络设备的路由重定向配置

知识点:

[SWA]rip 1

SWA-rip-1\]default-route originate ? cost Metric of the default route route-policy Specify the routing policy \ \[SWA-rip-1\]import-route ? bgp BGP routes direct Direct routes isis IS-IS routes ospf OSPF routes rip RIP routes static Static routes **\[SWA\]ospf 1** \[SWA-ospf-1\]default-route-advertise ? always Always advertise default route cost Cost of default route permit-calculate-other Calculate default route advertised by other route-policy Specify the routing policy summary Advertise a default route in a Type-3 LSA (only available in VPN) type Type of Type-5 LSA \ \[SWA-ospf-1\]default-route-advertise always \[SWA-ospf-1\]im \[SWA-ospf-1\]import-route ? bgp BGP routes direct Direct routes isis IS-IS routes ospf OSPF routes rip RIP routes static Static routes **\[R1\]rip 1** \[R1-rip-1\]default-route originate ? cost Metric of the default route route-policy Specify the routing policy \ \[R1-rip-1\]default-route originate \[R1-rip-1\]import-route ? bgp BGP routes direct Direct routes eigrp EIGRP routes isis IS-IS routes ospf OSPF routes rip RIP routes static Static routes **\[R1\]ospf 1** \[R1-ospf-1\]default-route-advertise ? always Always advertise default route cost Cost of default route permit-calculate-other Calculate default route advertised by other route-policy Specify the routing policy summary Advertise a default route in a Type-3 LSA (only available in VPN) type Type of Type-5 LSA \ \[R1-ospf-1\]default-route-advertise always \[R1-ospf-1\]im \[R1-ospf-1\]import-route ? bgp BGP routes direct Direct routes eigrp EIGRP routes guard Guard routes isis IS-IS routes ospf OSPF routes rip RIP routes static Static routes ![](https://i-blog.csdnimg.cn/direct/8dd1f899380a4a0cac859354dd7fd268.png)SWA: \[SWA\]ospf 1 \[SWA-ospf-1\]area 0 \[SWA-ospf-1-area-0.0.0.0\]net \[SWA-ospf-1-area-0.0.0.0\]network 192.168.10.254 0.0.0.255 \[SWA-ospf-1-area-0.0.0.0\]network 192.168.20.254 0.0.0.255 \[SWA-ospf-1-area-0.0.0.0\]network 192.168.1.1 0.0.0.255 R1: \[R1\]ospf 1 \[R1-ospf-1\]ar 0 \[R1-ospf-1-area-0.0.0.0\]network 192.168.1.2 0.0.0.255 \[R1-ospf-1-area-0.0.0.0\]exit **\[R1-ospf-1\]import-route rip 1** **\[R1-ospf-1\]import-route direct** \[R1-ospf-1\]exit \[R1\]rip 1 \[R1-rip-1\]ver 2 \[R1-rip-1\]undo summary \[R1-rip-1\]network 192.168.2.1 **\[R1-rip-1\]import-route ospf 1** **\[R1-rip-1\]import-route direct** \[R1-rip-1

R2:

R2\]rip 1 \[R2-rip-1\]ver 2 \[R2-rip-1\]undo summary \[R2-rip-1\]network 192.168.2.2 \[R2-rip-1\]network 192.168.30.254 \[R2-rip-1

验证:

SWA:配置同上。

R1:

R1\]ip route-static 192.168.30.254 24 192.168.2.2 \[R1\]ospf 1 \[R1-ospf-1\]ar 0 \[R1-ospf-1-area-0.0.0.0\]network 192.168.1.2 0.0.0.255 \[R1-ospf-1-area-0.0.0.0\]exit **\[R1-ospf-1\]import-route static** **\[R1-ospf-1\]import-route direct** R2: \[R2\]ip route 192.168.1.0 24 192.168.2.1 \[R2\]ip route 192.168.10.0 24 192.168.2.1 \[R2\]ip route 192.168.20.0 24 192.168.2.1 上面三条命令也可以用一条命令替换: \[R2\]ip route 0.0.0.0 0 192.168.2.1 验证: ![](https://i-blog.csdnimg.cn/direct/26ffd93fed66453090ee0dea9fda3aa4.png)![](https://i-blog.csdnimg.cn/direct/f41a57926c3d49d988d8d5f473db8812.png)![](https://i-blog.csdnimg.cn/direct/7ceee84049c546d2b32e74949c45f8e9.png)

相关推荐
Promise微笑25 分钟前
2026年国产替代油介损测试仪:油介损全场景解决方案与技术演进
大数据·网络·人工智能
^—app5668661 小时前
游戏运存小启动不起来临时解决方法
运维·服务器
Ujimatsu1 小时前
虚拟机安装Debian 13.x及其常用软件(2026.4)
linux·运维·ubuntu
志栋智能2 小时前
超自动化安全:构建智能安全运营的核心引擎
大数据·运维·服务器·数据库·安全·自动化·产品运营
AnalogElectronic3 小时前
linux 测试网络和端口是否连通的命令详解
linux·网络·php
Edward111111114 小时前
4月28日防火墙问题
linux·运维·服务器
想学后端的前端工程师4 小时前
【补充内外网突然不通的情况】
运维·服务器
Rust研习社4 小时前
使用 Axum 构建高性能异步 Web 服务
开发语言·前端·网络·后端·http·rust
面汤放盐4 小时前
何时使用以及何时不应使用微服务:没有银弹
java·运维·云计算
灰子学技术4 小时前
Envoy HTTP 流量层面的 Metric 指标分析
网络·网络协议·http