防火墙F100-E-G2 如何配置联通电信双线接入且实现双线负载均衡?
(0)
您好,参考
本案例适用于软件平台为Comware V7系列防火墙:F100-X-G2、F1000-X-G2、F100-X-WiNet、F1000-AK、F10X0等。
某公司为达到业务流量快速转发和链路冗余需求申请了三条不同运营商的外网线路,需要实现如下需求:
1)要求内网用户访问目的地址为移动链路数据从移动链路转发、访问目的地址为联通链路数据从联通链路转发、访问目的地址为电信链路数据从电信链路转发需求。
2)财务部门因为经常访问网银等支付平台,目前不希望出口IP地址经常变化。指定财务数据从电信转发并希望当电信流量负载到带宽的90%后,后面流量负载到联通链路上。
说明:
ISP |
外网接口 |
公网地址/掩码 |
公网网关 |
移动 |
1/0/3 |
218.200.5.8/24 |
218.200.5.9 |
联通 |
1/0/2 |
14.204.0.2/24 |
14.204.0.1 |
电信 |
1/0/1 |
202.90.112.2/24 |
202.90.112.1 |
探测组名称为nqa,描述为test。用于检测链路健康性。
<H3C>system
[H3C]nqa template icmp nqa
[H3C-nqatplt-icmp-nqa]description test
[H3C-nqatplt-icmp-nqa]reaction trigger per-probe
[H3C-nqatplt-icmp-nqa]quit
配置电信链路接口地址,并开启保存上一跳功能。
[H3C]interface GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1]ip address 202.90.112.2 255.255.255.0
[H3C-GigabitEthernet1/0/1]ip last-hop hold
[H3C-GigabitEthernet1/0/1]nat outbound
[H3C-GigabitEthernet1/0/1]quit
配置联通链路接口地址,并开启保存上一跳功能。
[H3C]interface GigabitEthernet1/0/2
[H3C-GigabitEthernet1/0/2]ip address 14.204.0.2 255.255.255.0
[H3C-GigabitEthernet1/0/2]ip last-hop hold
[H3C-GigabitEthernet1/0/2]nat outbound
[H3C-GigabitEthernet1/0/2]quit
配置移动链路接口地址,并开启保存上一跳功能。
[H3C]interface GigabitEthernet1/0/3
[H3C-GigabitEthernet1/0/3]ip address 218.200.5.8 255.255.255.0
[H3C-GigabitEthernet1/0/3]ip last-hop hold
[H3C-GigabitEthernet1/0/3]nat outbound
[H3C-GigabitEthernet1/0/3]quit
将外网接口加入不信任区域
[H3C]security-zone name Untrust
[H3C-security-zone-Untrust]import interface Dialer1
[H3C-security-zone-Untrust]import interface GigabitEthernet1/0/1
[H3C-security-zone-Untrust]import interface GigabitEthernet1/0/2
[H3C-security-zone-Untrust]import interface GigabitEthernet1/0/3
[H3C-security-zone-Untrust]quit
创建对象策略pass,因为本章内容主要介绍负载均衡,域间策略采用最简配置请见谅。
[H3C]object-policy ip pass
[H3C-object-policy-ip-pass] rule 0 pass
[H3C-object-policy-ip-pass]quit
创建any到any域的域间策略调用pass策略。
[H3C]zone-pair security source any destination any
[H3C-zone-pair-security- Any-Any]object-policy apply ip pass
[H3C-zone-pair-security- Any-Any]quit
设置路由防止在负载均衡配置前或者负载均衡失效后网络不通问题
[H3C]ip route-static 0.0.0.0 0 218.200.5.9 preference 80
[H3C]ip route-static 0.0.0.0 0 14.204.0.1 preference 70
[H3C]ip route-static 0.0.0.0 0 202.90.112.1
设置链路失败的reschedule:重定向连接,即把连接重定向到链路组中其它可用的链路上。并使用transparent enable关闭链路组本身的NAT功能并绑定nqa探测组。
[H3C]loadbalance link-group cmcc
[H3C-lb-lgroup-cmcc]fail-action reschedule
[H3C-lb-lgroup-cmcc]transparent enable
[H3C-lb-lgroup-cmcc]probe nqa.
[H3C-lb-lgroup-cmcc]quit
[H3C]loadbalance link-group cnc
[H3C-lb-lgroup-cnc]fail-action reschedule
[H3C-lb-lgroup-cnc]transparent enable
[H3C-lb-lgroup-cnc]probe nqa.
[H3C-lb-lgroup-cnc]quit
[H3C]loadbalance link-group china-isp
[H3C-lb-lgroup-china-isp]fail-action reschedule
[H3C-lb-lgroup-china-isp]transparent enable
[H3C-lb-lgroup-china-isp]probe nqa
[H3C-lb-lgroup-china-isp]quit
[H3C]loadbalance link-group caiwu
[H3C-lb-lgroup-caiwu]fail-action reschedule
[H3C-lb-lgroup-caiwu]transparent enable
[H3C-lb-lgroup-caiwu]probe nqa
[H3C-lb-lgroup-caiwu]quit
router ip指链路的网关地址,将链路绑定链路组后该链路才能生效。
[H3C]loadbalance link cmcc-link
[H3C-lb-link-cmcc-link]router ip 218.200.5.9
[H3C-lb-link-cmcc-link]link-group cmcc
[H3C-lb-link-cmcc-link]probe nqa
[H3C-lb-link-cmcc-link]quit
[H3C]loadbalance link cnc-link
[H3C-lb-link-cnc-link]router ip 14.204.0.1
[H3C-lb-link-cnc-link]link-group cnc
[H3C-lb-link-cnc-link]probe nqa
[H3C-lb-link-cnc-link]quit
将电信链路带宽调整为100M,设置带宽繁忙比当带宽利用率超过90%*100M=90M,新建session会负载到其他链路。
[H3C]loadbalance link chinanet-link
[H3C-lb-link-cnc-chinanet-link]router ip 202.90.112.1
[H3C-lb-link-cnc-chinanet-link]link-group china-isp
[H3C-lb-link-cnc-chinanet-link]probe nqa
[H3C-lb-link-cnc-chinanet-link]max-bandwidth outbound 102400
[H3C-lb-link-cnc-chinanet-link]bandwidth outbound busy-rate 90
[H3C-lb-link-cnc-chinanet-link]quit
[H3C]loadbalance link link-caiwu
[H3C-lb-link- link-caiwu] router ip 202.90.112.1
[H3C-lb-link- link-caiwu] link-group caiwu
[H3C-lb-link- link-caiwu]quit
[H3C]loadbalance class cmcc type link-generic match-any
[H3C-lbc-link-generic-cmcc]match 1 isp cmcc
[H3C-lbc-link-generic-cmcc]quit
[H3C]loadbalance class cnc type link-generic match-any
[H3C-lbc-link-generic-cnc]match 1 isp cnc
[H3C-lbc-link-generic-cnc]quit
[H3C]loadbalance class chinanet type link-generic match-any
[H3C-lbc-link-generic-chinanet]match 1 isp chinatel
[H3C-lbc-link-generic-chinanet]quit
[H3C] loadbalance class caiwu type link-generic match-any
[H3C-lbc-link-generic-caiwu]match 1 source ip address 172.16.0.0 24
[H3C-lbc-link-generic-caiwu]quit
配置负载行为绑定各链路组,设置转发失败规则为继续匹配。
[H3C]loadbalance action cmcc type link-generic
[H3C-lbc-link-generic- cmcc]link-group cmcc
[H3C-lbc-link-generic- cmcc]fallback-action continue
[H3C-lbc-link-generic- cmcc]quit
[H3C]loadbalance action cnc type link-generic
[H3C-lbc-link-generic-cnc]link-group cnc
[H3C-lbc-link-generic-cnc]fallback-action continue
[H3C-lbc-link-generic-cnc]quit
[H3C]loadbalance action chinanet type link-generic
[H3C-lbc-link-generic-chinanet]link-group china-isp
[H3C-lbc-link-generic-chinanet]fallback-action continue
[H3C-lbc-link-generic-chinanet]quit
[H3C]loadbalance action caiwu type link-generic
[H3C-lbc-link-generic-caiwu]link-group caiwu
[H3C-lbc-link-generic-caiwu]fallback-action continue
[H3C-lbc-link-generic-caiwu]quit
负载均衡策略严格按照配置顺序进行匹配,如果需要财务数据优先匹配需要将优先配置。
[H3C]loadbalance policy 1 type link-generic
[H3C-lbp-link-generic-1]class caiwu action caiwu
[H3C-lbp-link-generic-1]class chinanet action chinanet
[H3C-lbp-link-generic-1]class cmcc action cmcc
[H3C-lbp-link-generic-1]class cnc action cnc
配置LB虚服务,虚服务地址为0.0.0.0/0表示内网访问所有的数据将会匹配虚服务进行转发,lb策略调用之前创建的策略1,如果无法匹配运营商的数据缺省从移动转发。
[H3C]virtual-server outbound type link-ip
[H3C-vs-link-ip-outbound]virtual ip address 0.0.0.0 0
[H3C-vs-link-ip-outbound]lb-policy 1
[H3C-vs-link-ip-outbound]default link-group cmcc
[H3C-vs-link-ip-outbound]service enable
[H3C-vs-link-ip-outbound]quit
[H3C]quit
<H3C>save force
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论