Loading...
Friday 4 October 2013

PPPoE Dial-Out Loadbalancing 5 Wan PCC Method


/interface set ether1 name=WAN1
/interface set ether2 name=WAN2
/interface set ether3 name=WAN3
/interface set ether4 name=WAN4
/interface set ether5 name=WAN5
/interface set ether6 name=Local
/interface pppoe-client
add name=”internet1″ max-mtu=1492 max-mru=1492 mrru=disabled interface=WAN1 user=”123″ password=”ptcl” profile=default service-name=”" ac-name=”" disable=no add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2
add name=”internet2″ max-mtu=1492 max-mru=1492 mrru=disabled interface=WAN2 user=”123″ password=”ptcl” profile=default service-name=”" ac-name=”" disable=no add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2
add name=”internet3″ max-mtu=1492 max-mru=1492 mrru=disabled interface=WAN3 user=”123″ password=”ptcl” profile=default service-name=”" ac-name=”" disable=no add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2
add name=”internet4″ max-mtu=1492 max-mru=1492 mrru=disabled interface=WAN4 user=”123″ password=”ptcl” profile=default service-name=”" ac-name=”" disable=no add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2
add name=”internet5″ max-mtu=1492 max-mru=1492 mrru=disabled interface=WAN5 user=”123″ password=”ptcl” profile=default service-name=”" ac-name=”" disable=no add-default-route=no dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,mschap2
/ ip firewall mangle
add chain=input in-interface=internet1 action=mark-connection new-connection-mark=internet1_conn
add chain=input in-interface=internet2 action=mark-connection new-connection-mark=internet2_conn
add chain=input in-interface=internet3 action=mark-connection new-connection-mark=internet3_conn
add chain=input in-interface=internet4 action=mark-connection new-connection-mark=internet4_conn
add chain=input in-interface=internet5 action=mark-connection new-connection-mark=internet5_conn
add chain=output connection-mark=internet1_conn action=mark-routing new-routing-mark=to_internet1
add chain=output connection-mark=internet2_conn action=mark-routing new-routing-mark=to_internet2
add chain=output connection-mark=internet3_conn action=mark-routing new-routing-mark=to_internet3
add chain=output connection-mark=internet4_conn action=mark-routing new-routing-mark=to_internet4
add chain=output connection-mark=internet5_conn action=mark-routing new-routing-mark=to_internet5
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/0 \
action=mark-connection new-connection-mark=internet1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/1 \
action=mark-connection new-connection-mark=internet2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/2 \
action=mark-connection new-connection-mark=internet3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/3 \
action=mark-connection new-connection-mark=internet4_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/4 \
action=mark-connection new-connection-mark=internet5_conn passthrough=yes
add chain=prerouting connection-mark=internet1_conn in-interface=Local action=mark-routing new-routing-mark=to_internet1
add chain=prerouting connection-mark=internet2_conn in-interface=Local action=mark-routing new-routing-mark=to_internet2
add chain=prerouting connection-mark=internet3_conn in-interface=Local action=mark-routing new-routing-mark=to_internet3
add chain=prerouting connection-mark=internet4_conn in-interface=Local action=mark-routing new-routing-mark=to_internet4
add chain=prerouting connection-mark=internet5_conn in-interface=Local action=mark-routing new-routing-mark=to_internet5
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_internet1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_internet2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_internet3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 routing-mark=to_internet4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.5.1 routing-mark=to_internet5 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 distance=4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.5.1 distance=5 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=internet1 action=masquerade
add chain=srcnat out-interface=internet2 action=masquerade
add chain=srcnat out-interface=internet3 action=masquerade
add chain=srcnat out-interface=internet4 action=masquerade
add chain=srcnat out-interface=internet5 action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade
add chain=srcnat action=masquerade

0 comments:

Post a Comment

Latest @ World's TOP 10

Contact

Total Pageviews

 
TOP