• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

路由备份

2023-04-21提问
  • 0关注
  • 0收藏,625浏览
粉丝:0人 关注:1人

问题描述:

一台路由器连接有线另外通过4G拨号无线上网,有线正常走有线,当有线断了通过NQA 探测切换到无线,请求推荐一个配置案列的链接。

组网及组网描述:


最佳答案

粉丝:7人 关注:0人

https://www.cnblogs.com/noteTech/p/17034349.html

暂无评论

3 个回答
knox 七段
粉丝:1人 关注:4人

1、双出口,写两个缺省路由走这两个出口,调整路由优先级,走有线出口的优先级高,正常时默认走有线出口

2、走有线的静态路由联动track,配置nqa探测,当nqa探测失败联动track使静态路由失效


案例可以找配置手册track模块。nqa/track联动静态路由。

暂无评论

粉丝:1人 关注:0人

以下是一个配置案例:

interface GigabitEthernet0/0/0
description Connection to LAN
ip address 192.168.1.1 255.255.255.0
nqa test-instance 1
test-type icmp
destination-ip-address 8.8.8.8
control enable
frequency 5
timeout 1000
threshold 2
nqa test-instance 2
test-type icmp
destination-ip-address 8.8.4.4
control enable
frequency 5
timeout 1000
threshold 2

interface Cellular0/0/0
description Connection to 4G network
ip address negotiated
dialer in-band
dialer string internet
dialer-group 1
nqa test-instance 3
test-type icmp
destination-ip-address 8.8.8.8
control enable
frequency 5
timeout 1000
threshold 2
nqa test-instance 4
test-type icmp
destination-ip-address 8.8.4.4
control enable
frequency 5
timeout 1000
threshold 2

ip route 0.0.0.0 0.0.0.0 Cellular0/0/0
ip route 0.0.0.0 0.0.0.0 192.168.1.254 10

ip sla auto discovery
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
ip sla schedule 2 life forever start-time now
track 2 ip sla 2 reachability
ip sla schedule 3 life forever start-time now
track 3 ip sla 3 reachability
ip sla schedule 4 life forever start-time now
track 4 ip sla 4 reachability

access-list 101 permit ip any any
route-map SLA1 permit 10
match ip address 101
set ip next-hop verify-availability 192.168.1.254 10 track 1
route-map SLA2 permit 10
match ip address 101
set ip next-hop verify-availability Cellular0/0/0 track 3

interface GigabitEthernet0/0/0
description Connection to LAN
ip address 192.168.1.1 255.255.255.0
nqa test-instance 1
test-type icmp
destination-ip-address 8.8.8.8
control enable
frequency 5
timeout 1000
threshold 2
nqa test-instance 2
test-type icmp
destination-ip-address 8.8.4.4
control enable
frequency 5
timeout 1000
threshold 2
service-policy input SLA1

interface Cellular0/0/0
description Connection to 4G network
ip address negotiated
dialer in-band
dialer string internet
dialer-group 1
nqa test-instance 3
test-type icmp
destination-ip-address 8.8.8.8
control enable
frequency 5
timeout 1000
threshold 2
nqa test-instance 4
test-type icmp
destination-ip-address 8.8.4.4
control enable
frequency 5
timeout 1000
threshold 2
service-policy input SLA2

其中,路由器的GigabitEthernet0/0/0接口连接LAN,Cellular0/0/0接口连接4G网络。设置4个NQA实例,分别测试目标IP地址8.8.8.8和8.8.4.4的可用性。创建了两个路由映射:SLA1和SLA2。SLA1在GigabitEthernet0/0/0接口上应用,用于路由到192.168.1.254的有线网关,当有线网关不可用时,通过设置10并跟踪1自动切换到4G网络。SLA2应用到Cellular0/0/0接口上,用于在有线网关不可用时路由到Cellular0/0/0接口的4G网络。两个路由映射共同构成IP路由表中0.0.0.0/0的两条默认路由。使用SLA的自动切换可以实现在有线网关故障时无缝切换到4G网络,并提高网络可用性。

暂无评论

粉丝:6人 关注:0人

配置案例:
1. 配置有线和无线接口
interface GigabitEthernet0/0/0
description Connected to LAN
ip address 192.168.1.1 255.255.255.0
interface Cellular0/1/0
description Connected to 4G network
ip address dhcp
2. 配置NQA探测
ip sla 1
icmp-echo 8.8.8.8 source-interface GigabitEthernet0/0/0
frequency 30
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
delay down 10 up 5
3. 配置静态路由和默认路由
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0
ip route 8.8.8.8 255.255.255.255 Cellular0/1/0
4. 配置IP SLA跟踪并启用NAT
ip nat inside source list 1 interface Cellular0/1/0 overload
access-list 1 permit 192.168.1.0 0.0.0.255
ip sla monitor schedule 1 start-time now life forever
ip sla monitor reaction-configuration 1 react timeout threshold-type immediate action-type trapOnly
5. 配置路由跟踪
ip route 0.0.0.0 0.0.0.0 192.168.1.2 track 1
6. 配置故障转移
track 2 ip route 0.0.0.0 0.0.0.0 reachability
ip route 0.0.0.0 0.0.0.0 Cellular0/1/0 track 2
以上配置将在有线连接断开时自动切换到4G网络。

具体配置可能因设备型号和操作系统版本而有所不同。建议在实际环境中进行测试和调整。

暂无评论

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明