打印

[交流] 路由自动切换备份

0

路由自动切换备份

自己在一家工厂做小网管,这家工厂有几个分厂,通过联通的光缆连接做内部网络。各家分厂都通过总厂这边的路由器防火墙通往公网。
因为是生产性的还有平时都是做的给国外代工,平时都跑实时的ERP还有对外的网络连接不能中断,所以工厂做了双线接入。用了两个路由器来通往公网。
因为数据流量很大,所以有时候路由器会死机,网络就会中断。就需要手动切换到另外一条链路上。
没事研究了一下华为的三层交换机具有自动侦测和路由备份功能,对交换机做了配置后,主路由中断后可以自动切换到备用路由,网络不会中断。配置如下:
dis cu
#
sysname jifang
#
super password level 3 cipher E=7[M.`NV0WN#".;_P%&+A!!
#
radius scheme system
#
domain system
#
local-user glindows
password simple 361767648
service-type telnet
level 3
#
detect-group 1
detect-list 1 ip address 221.1.105.82 nexthop 192.168.11.2
#
detect-group 2
detect-list 1 ip address 221.1.107.197 nexthop 192.168.22.2
#
vlan 1
#
vlan 10
description yumin
#
vlan 40
description silou
#
vlan 50
description sheji
#
vlan 60
description caiwu
#
vlan 70
description bangongshi
#
vlan 80
description guanghao
#
vlan 90
description yumin3
#
vlan 100 to 101
#
vlan 110
description isa
#
vlan 140
description huanghua
#
vlan 220
description luyoubeifen
#
vlan 1000
description fuwuqi
#
interface Vlan-interface1
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface10
ip address 192.168.2.1 255.255.255.0
#
interface Vlan-interface40
ip address 192.168.4.1 255.255.255.0
#
interface Vlan-interface50
ip address 192.168.5.1 255.255.255.0
#
interface Vlan-interface60
ip address 192.168.6.1 255.255.255.0
#
interface Vlan-interface70
ip address 192.168.7.1 255.255.255.0
#
interface Vlan-interface80
ip address 172.16.1.1 255.255.255.0
#
interface Vlan-interface90
ip address 192.168.3.1 255.255.255.0
#
interface Vlan-interface100
ip address 192.168.10.1 255.255.255.0
#
interface Vlan-interface101
ip address 10.11.104.1 255.255.255.0
#
interface Vlan-interface110
ip address 192.168.11.1 255.255.255.0
#
interface Vlan-interface140
ip address 192.168.14.1 255.255.255.0
#
interface Vlan-interface220
ip address 192.168.22.1 255.255.255.0
#
interface Vlan-interface1000
ip address 192.168.0.1 255.255.255.0
#
interface Aux1/0/0
#
interface Ethernet1/0/1
port access vlan 10
#
interface Ethernet1/0/2
port access vlan 90
#
interface Ethernet1/0/3
#
interface Ethernet1/0/4
port access vlan 40
#
interface Ethernet1/0/5
port access vlan 50
#
interface Ethernet1/0/6
port access vlan 60
#
interface Ethernet1/0/7
port access vlan 70
#
interface Ethernet1/0/8
port access vlan 80
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
port access vlan 100
#
interface Ethernet1/0/11
port access vlan 110
line-rate inbound 5120
line-rate outbound 5120
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
port access vlan 140
#
interface Ethernet1/0/15
port access vlan 220
#
interface Ethernet1/0/16
#
interface Ethernet1/0/17
port access vlan 101
#
interface Ethernet1/0/18
port access vlan 110
#
interface Ethernet1/0/19
port access vlan 1000
line-rate inbound 6144
line-rate outbound 6144
#
interface Ethernet1/0/20
port access vlan 1000
#
interface Ethernet1/0/21
port link-type trunk
port trunk permit vlan 1 60 1000
#
interface Ethernet1/0/22
port link-type trunk
port trunk permit vlan 1 60
#
interface Ethernet1/0/23
port link-type trunk
port trunk permit vlan 1 40 50 70
#
interface Ethernet1/0/24
port link-type trunk
port trunk permit vlan all
#
interface GigabitEthernet1/1/1
#
interface GigabitEthernet1/1/2
#
interface GigabitEthernet1/1/3
#
interface GigabitEthernet1/1/4
#
undo irf-fabric authentication-mode
#
interface NULL0
#
voice vlan mac-address 0001-e300-0000 mask ffff-ff00-0000
#
ip route-static 0.0.0.0 0.0.0.0 192.168.11.2 preference 60 detect-group 1
ip route-static 0.0.0.0 0.0.0.0 192.168.22.2 preference 80 detect-group 2
ip route-static 10.1.2.0 255.255.255.0 172.16.1.2 preference 60
ip route-static 192.168.1.0 255.255.255.0 172.16.1.2 preference 60
ip route-static 192.168.8.0 255.255.255.0 172.16.1.2 preference 60
ip route-static 192.168.9.0 255.255.255.0 172.16.1.2 preference 60
ip route-static 192.168.12.0 255.255.255.0 172.16.1.2 preference 60
#
snmp-agent
snmp-agent local-engineid 800007DB000FE26538636877
snmp-agent community write public
snmp-agent community read private
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.10.175 udp-port 5000 params securityname public
#
ip http shutdown
#
user-interface aux 0 7
user-interface vty 0 4
set authentication password cipher E=7[M.`NV0WN#".;_P%&+A!!
#
return
<jifang>

TOP

0
楼主这个方法看似不错,但是对于新手来说难度太大了,不过还是佩服楼主!

TOP

0
绝对是好东西,但是我刚刚看懂,那些菜鸟怎么办,

TOP

0
..虽然感谢楼主的分享。但这个东西贴出来完全没意义。。工厂的路由一般都有专业网管在搞。。。路由的设置虽然都是E文。。但还是看的懂的。。你整个复制下来也没意义啊。。你自己的用户名密码和IP都跑上去了。。别人也看不懂!

TOP

0
这可是路由器的高级控制,我只能学习了。感谢楼主。

TOP

当前时区 GMT+8, 现在时间是 2025-3-17 17:37