多平台统一管理软件接口,如何实现多平台统一管理软件接口
1546
2022-09-18
H3C V7防火墙双WAN上网主备模式(命令行)(h3c路由器)
1.配置需求及实现的效果
防火墙F100-A-G2双WAN口上网,WAN口1采用静态地址,地址为198.76.28.30 (运营商下一跳198.76.28.29),WAN口2采用也采用静态地址,地址为198.77.28.30 (运营商下一跳198.77.28.29)。需要实现内网用户访问外网从WAN1口出去,当WAN1断掉切换到WAN2。
2.组网图
3.配置步骤
3.1配置防火墙基本上网
外网接口G1/0/1配置运营商给的静态ip地址
interface GigabitEthernet1/0/1ip address 198.76.28.30 255.255.255.252nat outbound
外网接口G1/0/2配置运营商给的静态ip地址
interface GigabitEthernet1/0/2ip address 198.77.28.30 255.255.255.252nat outbound
内网接口G1/0/3配置自定义的内网静态ip地址
interface GigabitEthernet1/0/2ip address 192.168.2.1 255.255.255.0#将内网接口加入trust域security-zone name trust import interface GigabitEthernet1/0/3#将外网接口加入untrust域security-zone name Untrust import interface GigabitEthernet1/0/1 import interface GigabitEthernet1/0/2#配置安全策略security-policy ip rule 0 name trust-untrust (放通内网到外网的访问) action pass source-zone trust destination-zone untrust rule 1 name per-nqa (放通local安全域到外网探测地址114.114.114.114的访问,如不配置则无法正常使用nqa探测外网地址) action pass source-zone local destination-zone untrust destination-ip-host 114.114.114.1143.2 配置链路检测#创建管理员名为admin、操作标签为test的NQA测试组[H3C]nqa entry admin test #配置测试类型为ICMP-echo,ICMP-echo测试利用ICMP协议,根据是否接收到应答报文判断目的端设备的可达性。ICMP-echo测试的功能与ping命令类似,但ICMP-echo测试中可以指定测试的下一跳设备。在源端和目的端设备之间存在多条路径时,通过配置下一跳设备可以指定测试的路径[H3C-nqa-admin-test-icmp-echo] type icmp-echo 配置监测公网的任意地址如114.114.114.114等,这样就可以规避掉运营商本身出现网络故障的风险[H3C-nqa-admin-test-icmp-echo] destination ip 114.114.114.114#配置测试组连续两次测试的时间间隔为3000ms[H3C-nqa-admin-test-icmp-echo] frequency 3000#配置探测报文的下一跳IP地址,这个一般在探测的目的地址不是网关地址的时候建议配置,本案例探测的目的地址是直连网关地址,可以不配置下一跳地址 [H3C-nqa-admin-test-icmp-echo] next-hop 198.76.28.29 #配置联动项1(连续失败3次触发联动)[H3C-nqa-admin-test-icmp-echo] reaction 1 checked-element probe-fail threshold-type consecutive 3 action-type trigger-only[H3C-nqa-admin-test-icmp-echo]quit#启动探测[H3C] nqa schedule admin test start-time now lifetime forever#配置Track项1,关联NQA测试组(管理员为admin,操作标签为test)的联动项1[H3C] track 1 nqa entry admin test reaction 13.3配置静态路由
进入系统视图,配置两条默认路由,并且修改G1.0.2线路的默认路由优先级为80(默认路由优先级为60,值越大优先级越低)。设备固定IP上网路由与Track项1关联,作为主用路由。实现正常情况下流量全部从WAN1出去,链路出现故障时可切换到WAN2。
[H3C]ip route-static 0.0.0.0 0 198.76.28.29 track 1 [H3C]ip route-static 0.0.0.0 0 198.77.28.29 preference 80 4 保存配置信息[H3C]save force5 查看与验证
两条链路都正常的时候track项状态为positive,路由也是走优先级为60的G1/0/1。
[H3C]display track all Track ID: 1 State: Positive Duration: 0 days 0 hours 1 minutes 35 seconds Tracked object type: NQA Notification delay: Positive 0, Negative 0 (in seconds) Tracked object: NQA entry: admin test Reaction: 1 Remote IP/URL: 114.114.114.114 Local IP: -- Interface: -- [H3C]display ip routing-table Destinations : 17 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/0 Static 60 0 198.76.28.29 GE1/0/10.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0198.76.28.28/30 Direct 0 0 198.76.28.30 GE1/0/1198.76.28.28/32 Direct 0 0 198.76.28.30 GE1/0/1198.76.28.30/32 Direct 0 0 127.0.0.1 InLoop0198.76.28.31/32 Direct 0 0 198.76.28.30 GE1/0/1198.77.28.28/30 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.28/32 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.30/32 Direct 0 0 127.0.0.1 InLoop0198.77.28.31/32 Direct 0 0 198.77.28.30 GE1/0/2224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
当G1/0/1侧运营商链路有问题时,设备上可以很快检测到,此时查看track项状态为Negative,查看路由发现走的是G1/0/2。
%Jan 24 15:38:01:238 2021 H3C NQA/6/NQA_ENTRY_PROBE_RESULT: -Context=1; Reaction entry 1 of NQA entry admin-name admin operation-tag test: probe-fail. [H3C]display track all Track ID: 1 State: Negative Duration: 0 days 0 hours 0 minutes 4 seconds Tracked object type: NQA Notification delay: Positive 0, Negative 0 (in seconds) Tracked object: NQA entry: admin test Reaction: 1 Remote IP/URL: 114.114.114.114 Local IP: -- Interface: -- [H3C]display ip routing-table Destinations : 14 Routes : 14Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/0 Static 80 0 198.77.28.29 GE1/0/20.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0198.76.28.30/32 Direct 1 0 0.0.0.0 NULL0198.77.28.28/30 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.28/32 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.30/32 Direct 0 0 127.0.0.1 InLoop0198.77.28.31/32 Direct 0 0 198.77.28.30 GE1/0/2224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
当G1/0/1运营商链路恢复时设备也能很快检测到并切换为主链路。
%Jan 24 15:38:16:834 2021 H3C NQA/6/NQA_ENTRY_PROBE_RESULT: -Context=1; Reaction entry 1 of NQA entry admin-name admin operation-tag test: probe-pass. [H3C]display track all Track ID: 1 State: Positive Duration: 0 days 0 hours 0 minutes 2 seconds Tracked object type: NQA Notification delay: Positive 0, Negative 0 (in seconds) Tracked object: NQA entry: admin test Reaction: 1 Remote IP/URL: 114.114.114.114 Local IP: -- Interface: -- [H3C]display ip routing-table Destinations : 17 Routes : 17Destination/Mask Proto Pre Cost NextHop Interface0.0.0.0/0 Static 60 0 198.76.28.29 GE1/0/10.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0198.76.28.28/30 Direct 0 0 198.76.28.30 GE1/0/1198.76.28.28/32 Direct 0 0 198.76.28.30 GE1/0/1198.76.28.30/32 Direct 0 0 127.0.0.1 InLoop0198.76.28.31/32 Direct 0 0 198.76.28.30 GE1/0/1198.77.28.28/30 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.28/32 Direct 0 0 198.77.28.30 GE1/0/2198.77.28.30/32 Direct 0 0 127.0.0.1 InLoop0198.77.28.31/32 Direct 0 0 198.77.28.30 GE1/0/2224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop06 注意事项1、本案例双出口路由主备使用且备份,因此设置路由优先级,如果负载使用等价路由也可以分流互备的效果,只需将优先级设置一致即可
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~