|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
ip firewall mangle
#外部连接
add action=mark-connection chain=input comment="" disabled=no \ in-interface=ADSL-1 new-connection-mark=from_adsl_1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_1 \ disabled=no new-routing-mark=to_adsl_1 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-2 new-connection-mark=from_adsl_2 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_2 \ disabled=no new-routing-mark=to_adsl_2 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-3 new-connection-mark=from_adsl_3 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_3 \ disabled=no new-routing-mark=to_adsl_3 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-4 new-connection-mark=from_adsl_4 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_4 \ disabled=no new-routing-mark=to_adsl_4 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-5 new-connection-mark=from_adsl_5 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_5 \ disabled=no new-routing-mark=to_adsl_5 passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=\ ADSL-6 new-connection-mark=from_adsl_6 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from_adsl_6 \ disabled=no new-routing-mark=to_adsl_6 passthrough=yes
#内网均衡
add action=mark-connection chain=prerouting comment= "" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_1 nth=6,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_1 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_1 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_2 nth=5,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_2 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_2 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_3 nth=4,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_3 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_3 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_4 nth=3,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_4 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_4 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_5 nth=2,1 \ passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_5 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_5 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new \ disabled=no in-interface=LAN new-connection-mark=nth_6 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=nth_6 \ disabled=no in-interface=LAN new-routing-mark=to_adsl_6 passthrough=no
/ip firewall nat
#线路正常时的负载:
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ADSL-1 routing-mark=to_adsl_1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-2 routing-mark=to_adsl_2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-3 routing-mark=to_adsl_3
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-4 routing-mark=to_adsl_4
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-5 routing-mark=to_adsl_5
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\ ADSL-6 routing-mark=to_adsl_6
|
|