Ros3.30PCC多线负载均衡脚本脚本

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Ros 3.30 PCC双线负载均衡脚本脚本如下

/ip address add address=内网网关IP/内网子网掩码interface=内网网卡名称comment="\D1\CC\C9\F1\B6\E0\CF\DF\50\43\43\BD\C5\B1\BE\52\6F\73\BC\BC\ CA\F5\BD\BB\C1\F7\C8\BA\A3\BA\31\30\32\38\37\32\30\35\38"

/ip dns set primary-dns=首选DNS secondary-dns=备用DNS

allow-remote-requests=yes

/interface pppoe-client add name="pppoe-out1" interface=外网网卡1名称

user="PPPoE帐号1" password="密码1" add-default-route=no disabled=no

/interface pppoe-client add name="pppoe-out2" interface=外网网卡2名称

user="PPPoE帐号2" password="密码2" add-default-route=no disabled=no

/ip firewall mangle

add action=change-mss chain=forward

comment="\D1\CC\C9\F1\B6\E0\CF\DF\50\43\43\BD\C5\B1\BE\52\6F\73\BC\BC\ CA\F5\BD\BB\C1\F7\C8\BA\A3\BA\31\30\32\38\37\32\30\35\38" disabled=no new-mss=1440 protocol=tcp tcp-flags=syn

add action=mark-connection chain=input comment="" disabled=no

in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes

add action=mark-connection chain=input comment="" disabled=no

in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes

add action=mark-routing chain=output comment=""

connection-mark=pppoe-out1_conn disabled=no

new-routing-mark=to_pppoe-out1 passthrough=yes

add action=mark-routing chain=output comment=""

connection-mark=pppoe-out2_conn disabled=no

new-routing-mark=to_pppoe-out2 passthrough=yes

add action=mark-connection chain=prerouting comment="" disabled=no

dst-address-type=!local in-interface=ether1

new-connection-mark=pppoe-out1_conn passthrough=yes

per-connection-classifier=both-addresses:2/0 src-address=内网网断/内网子网掩码add action=mark-connection chain=prerouting comment="" disabled=no

dst-address-type=!local in-interface=ether1

new-connection-mark=pppoe-out2_conn passthrough=yes

per-connection-classifier=both-addresses:2/1 src-address=内网网断/内网子网掩码add action=mark-routing chain=prerouting comment=""

connection-mark=pppoe-out1_conn disabled=no in-interface=ether1

new-routing-mark=to_pppoe-out1 passthrough=yes src-address=内网网断/内网子网掩码

add action=mark-routing chain=prerouting comment=""

connection-mark=pppoe-out2_conn disabled=no in-interface=ether1

new-routing-mark=to_pppoe-out2 passthrough=yes src-address=内网网断/内网子网掩码

/ip route

add comment=1 disabled=no distance=1 dst-address=0.0.0.0/0

gateway=pppoe-out1 routing-mark=to_pppoe-out1 check-gateway=ping

add comment=2 disabled=no distance=1 dst-address=0.0.0.0/0

gateway=pppoe-out2 routing-mark=to_pppoe-out2 check-gateway=ping

add check-gateway=ping comment="pppoe-out1" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out1

add check-gateway=ping comment="pppoe-out2" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out2

/ip firewall nat

add action=masquerade chain=srcnat comment="1" disabled=no

out-interface=pppoe-out1

add action=masquerade chain=srcnat comment="2" disabled=no

out-interface=pppoe-out2

相关文档
最新文档