Community discussions

MikroTik App
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

[ask] 11 WAN Load Balancing

Tue Nov 01, 2011 11:45 pm

I want to make load balancing and fail over with 11 WAN, while we know the type of NTH and PCC, what is the best way for the type of load balancing like this, thanks
 
User avatar
cbrown
Trainer
Trainer
Posts: 1839
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

[ask] 11 WAN Load Balancing

Wed Nov 02, 2011 12:07 am

 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 12:49 am

Thank you, friend .....
I would try it
I'll be back with the results
 
User avatar
cbrown
Trainer
Trainer
Posts: 1839
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

[ask] 11 WAN Load Balancing

Wed Nov 02, 2011 12:51 am

Sounds great.
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 1:18 am

This is my results....
please correct this......
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
    disabled=no full-duplex=yes l2mtu=1598 mac-address=XX:XX:XX:XX:XX:XX \
    master-port=none mtu=1500 name=ether2 speed=1Gbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Trunking ADSL-PPPoE" disabled=no full-duplex=yes l2mtu=1598 \
    mac-address=XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether3 \
    speed=1Gbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Proxy Squid V.30 " disabled=no full-duplex=yes l2mtu=1598 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether4 speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    Dedicated WAN disabled=no full-duplex=yes l2mtu=1598 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether5 speed=1Gbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Trunking Radio CPE" disabled=no full-duplex=yes l2mtu=1600 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether1 speed=1Gbps

/interface vlan
add arp=enabled comment="Trunking ADSL-PPPoE" disabled=no interface=ether3 l2mtu=\
    1594 mtu=1500 name=ADSL-01 use-service-tag=no vlan-id=10
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-02 \
    use-service-tag=no vlan-id=20
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-03 \
    use-service-tag=no vlan-id=30
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-04 \
    use-service-tag=no vlan-id=40
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-05 \
    use-service-tag=no vlan-id=50
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-06 \
    use-service-tag=no vlan-id=60
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-07 \
    use-service-tag=no vlan-id=70
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-08 \
    use-service-tag=no vlan-id=80
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-09 \
    use-service-tag=no vlan-id=90
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-10 \
    use-service-tag=no vlan-id=100
add arp=enabled comment="Wireless Gear" disabled=no \
    interface=ether1 l2mtu=1596 mtu=1500 name=DEV-OTA use-service-tag=no \
    vlan-id=11
add arp=enabled comment="Enable Access to C2950" disabled=no interface=ether3 \
    l2mtu=1594 mtu=1500 name=NOC-01 use-service-tag=no vlan-id=21
add arp=enabled comment="Enable Access to C3550" disabled=no interface=ether1 \
    l2mtu=1596 mtu=1500 name=NOC-02 use-service-tag=no vlan-id=14
add arp=enabled comment="Web , Mail, FTP, Radius Server etc" disabled=no \
    interface=ether3 l2mtu=1594 mtu=1500 name=CLOUD-SERVER use-service-tag=no \
    vlan-id=15

/ip address
add address=10.10.1.1/24 disabled=no interface=Wifi-Bridge network=10.10.1.0
add address=xxx.xx.x
xx.xx/xx comment=WAN Dedicated disabled=no interface=ether5 \
    network=xxx.xx.xxx.xx
add address=192.168.90.1/24 comment=Proxy disabled=no interface=ether4 \
    network=192.168.90.0
add address=11.11.11.1/24 disabled=no interface=ether3 network=11.11.11.0
add address=17.8.4.1/24 disabled=no interface=DEV-OTA network=17.8.4.0
add address=1.1.1.1/32 comment="Anti_NETCUT Gateway" disabled=no interface=\
    Wifi-Bridge network=1.1.1.1
add address=4.3.2.1/24 comment="IPCamera & CPE Radio" disabled=no interface=\
    DEV-OTA network=4.3.2.0
add address=2.2.2.2/32 comment="Office Networks" disabled=no interface=ether3 \
    network=2.2.2.2
add address=192.168.1.10/24 comment=VLAN-ADSL disabled=no interface=ADSL-01 \
    network=192.168.1.0
add address=192.168.2.20/24 disabled=no interface=ADSL-02 network=192.168.2.0
add address=192.168.3.30/24 disabled=no interface=ADSL-03 network=192.168.3.0
add address=192.168.4.40/24 disabled=no interface=ADSL-04 network=192.168.4.0
add address=192.168.5.50/24 disabled=no interface=ADSL-05 network=192.168.5.0
add address=192.168.6.60/24 disabled=no interface=ADSL-06 network=192.168.6.0
add address=192.168.7.70/24 disabled=no interface=ADSL-07 network=192.168.7.0
add address=192.168.8.80/24 disabled=no interface=ADSL-08 network=192.168.8.0
add address=192.168.9.90/24 disabled=no interface=ADSL-09 network=192.168.9.0
add address=192.168.10.100/24 disabled=no interface=ADSL-10 network=\
    192.168.10.0
add address=192.168.21.1/24 comment=VLAN-NOC disabled=no interface=NOC-01 \
    network=192.168.21.0
add address=192.168.14.1/24 disabled=no interface=NOC-02 network=192.168.14.0
add address=192.168.15.1/24 disabled=no interface=CLOUD-SERVER network=\
    192.168.15.0
add address=192.168.1.101/24 comment=to MODEM WAN Dedicated disabled=yes interface=\
    ether5 network=192.168.1.0

/ip firewall mangle
add action=mark-connection chain=input comment="NEW Load Balancing" \
    connection-state=new disabled=yes in-interface=ether5 \
    new-connection-mark=WAN_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-01 new-connection-mark=ADSL-1_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-02 new-connection-mark=ADSL-2_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-03 new-connection-mark=ADSL-3_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-04 new-connection-mark=ADSL-4_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-05 new-connection-mark=ADSL-5_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-06 new-connection-mark=ADSL-6_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-07 new-connection-mark=ADSL-7_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-08 new-connection-mark=ADSL-8_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-09 new-connection-mark=ADSL-9_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-10 new-connection-mark=ADSL-10_conn passthrough=yes
add action=mark-connection chain=prerouting comment="Load Balance Proxy" \
    connection-state=new disabled=yes dst-port=80 in-interface=ether4 \
    new-connection-mark=WAN_conn_via_PROXY nth=4,1 passthrough=yes \
    protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-1_conn_via_PROXY nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-2_conn_via_PROXY nth=4,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-3_conn_via_PROXY nth=4,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-4_conn_via_PROXY nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-5_conn_via_PROXY nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-6_conn_via_PROXY nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-7_conn_via_PROXY nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-8_conn_via_PROXY nth=4,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-9_conn_via_PROXY nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-10_conn_via_PROXY nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment=\
    "Load Balance Wifi Client" connection-state=new disabled=yes dst-port=\
    !80,22 in-interface=Wifi-Bridge new-connection-mark=WAN_conn nth=\
    4,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-1_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-2_conn nth=4,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-3_conn nth=4,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-4_conn nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-5_conn nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-6_conn nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-7_conn nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-8_conn nth=4,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-9_conn nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-10_conn nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=WAN_conn \
    nth=11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-1_conn \
    nth=11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-2_conn \
    nth=3,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-3_conn \
    nth=3,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-4_conn \
    nth=11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-8_conn \
    nth=3,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=\
    "Load Balance Officer" connection-state=new disabled=yes dst-port=\
    !80,22 in-interface=ether3 new-connection-mark=WAN_conn nth=11,1 \
    passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-1_conn \
    nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-2_conn \
    nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-3_conn \
    nth=3,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-4_conn \
    nth=11,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-8_conn \
    nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=WAN_conn nth=\
    11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-1_conn nth=\
    11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-2_conn nth=\
    11,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-3_conn nth=\
    11,4 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-4_conn nth=\
    11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-5_conn nth=\
    11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-6_conn nth=\
    11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-7_conn nth=\
    11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-8_conn nth=\
    11,9 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether2 new-connection-mark=ADSL-9_conn nth=\
    11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-10_conn nth=\
    11,11 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment="Load Balance CPE" \
    connection-state=new disabled=yes dst-port=!80,22 in-interface=\
    DEV-OTA new-connection-mark=WAN_conn nth=11,1 passthrough=yes \
    protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-1_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-2_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-3_conn nth=3,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-4_conn nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-5_conn nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-6_conn nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-7_conn nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-8_conn nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-9_conn nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-10_conn nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=WAN_conn \
    nth=11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-1_conn \
    nth=11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-2_conn \
    nth=11,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-3_conn \
    nth=11,4 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-4_conn \
    nth=11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-8_conn \
    nth=11,9 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=udp
add action=mark-routing chain=prerouting comment="Routing Mark PCC Proxy" \
    connection-mark=WAN_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-1_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-2_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-2 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-3_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-3 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-4_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-4 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-5_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-5 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-6_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-6 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-7_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-7 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-8_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-8 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-9_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-9 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-10_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-10 passthrough=no
add action=mark-routing chain=prerouting comment=\
    "Route PCC by Using Client Interface" connection-mark=WAN_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_WAN \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-10 \
    passthrough=no
add action=mark-routing chain=prerouting comment=Office connection-mark=\
    WAN_conn disabled=yes in-interface=ether3 new-routing-mark=\
    maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-10 \
    passthrough=no
add action=mark-routing chain=prerouting comment=CPE connection-mark=\
    WAN_conn disabled=yes in-interface=DEV-OTA new-routing-mark=\
    maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-10 \
    passthrough=no


/ip route
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ether5 \
    routing-mark=to_SAPINET scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_SAPINET scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-01 \
    routing-mark=to_ADSL-1 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-02 \
    routing-mark=to_ADSL-2 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-02 \
    routing-mark=to_ADSL-2 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_ADSL-3 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_ADSL-3 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-04 \
    routing-mark=to_ADSL-4 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-05 \
    routing-mark=to_ADSL-5 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-06 \
    routing-mark=to_ADSL-6 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-07 \
    routing-mark=to_ADSL-7 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-08 \
    routing-mark=to_ADSL-8 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-08 \
    routing-mark=to_ADSL-8 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-09 \
    routing-mark=to_ADSL-9 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-10 \
    routing-mark=to_ADSL-10 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add check-gateway=ping disabled=yes distance=1 dst-address=0.0.0.0/0 gateway="\
    ether5,ADSL-08,ADSL-04,ADSL-02,ADSL-01,ADSL-05,ADSL-10,ADSL-03,ADSL-09,A\
    DSL-06,ADSL-07" scope=30 target-scope=10
add disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add disabled=yes distance=4 dst-address=0.0.0.0/0 gateway=ADSL-02 scope=30 \
    target-scope=10
add disabled=yes distance=5 dst-address=0.0.0.0/0 gateway=ADSL-03 scope=30 \
    target-scope=10
add disabled=yes distance=6 dst-address=0.0.0.0/0 gateway=ADSL-04 scope=30 \
    target-scope=10
add disabled=yes distance=7 dst-address=0.0.0.0/0 gateway=ADSL-05 scope=30 \
    target-scope=10
add disabled=yes distance=8 dst-address=0.0.0.0/0 gateway=ADSL-06 scope=30 \
    target-scope=10
add disabled=yes distance=9 dst-address=0.0.0.0/0 gateway=ADSL-07 scope=30 \
    target-scope=10
add disabled=yes distance=10 dst-address=0.0.0.0/0 gateway=ADSL-08 scope=30 \
    target-scope=10
add disabled=yes distance=11 dst-address=0.0.0.0/0 gateway=ADSL-09 scope=30 \
    target-scope=10
add disabled=yes distance=12 dst-address=0.0.0.0/0 gateway=ADSL-10 scope=30 \
    target-scope=10
add disabled=yes distance=3 dst-address=0.0.0.0/0 gateway=ADSL-01 scope=30 \
    target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    ADSL-02,ADSL-08,ADSL-03,ether5 scope=30 target-scope=10
add disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add disabled=yes distance=3 dst-address=0.0.0.0/0 gateway=ADSL-02 scope=30 \
    target-scope=10
add disabled=yes distance=4 dst-address=0.0.0.0/0 gateway=ADSL-03 scope=30 \
    target-scope=10
add disabled=yes distance=5 dst-address=0.0.0.0/0 gateway=ADSL-08 scope=30 \
    target-scope=10

with my simply topology.....:-)
You do not have the required permissions to view the files attached to this post.
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 1:28 am

This is my results....
please correct this......
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
    disabled=no full-duplex=yes l2mtu=1598 mac-address=XX:XX:XX:XX:XX:XX \
    master-port=none mtu=1500 name=ether2 speed=1Gbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Trunking ADSL-PPPoE" disabled=no full-duplex=yes l2mtu=1598 \
    mac-address=XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether3 \
    speed=1Gbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Proxy Squid V.30 " disabled=no full-duplex=yes l2mtu=1598 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether4 speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    Dedicated WAN disabled=no full-duplex=yes l2mtu=1598 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether5 speed=1Gbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "Trunking Radio CPE" disabled=no full-duplex=yes l2mtu=1600 mac-address=\
    XX:XX:XX:XX:XX:XX master-port=none mtu=1500 name=ether1 speed=1Gbps

/interface vlan
add arp=enabled comment="Trunking ADSL-PPPoE" disabled=no interface=ether3 l2mtu=\
    1594 mtu=1500 name=ADSL-01 use-service-tag=no vlan-id=10
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-02 \
    use-service-tag=no vlan-id=20
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-03 \
    use-service-tag=no vlan-id=30
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-04 \
    use-service-tag=no vlan-id=40
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-05 \
    use-service-tag=no vlan-id=50
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-06 \
    use-service-tag=no vlan-id=60
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-07 \
    use-service-tag=no vlan-id=70
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-08 \
    use-service-tag=no vlan-id=80
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-09 \
    use-service-tag=no vlan-id=90
add arp=enabled disabled=no interface=ether3 l2mtu=1594 mtu=1500 name=ADSL-10 \
    use-service-tag=no vlan-id=100
add arp=enabled comment="Wireless Gear" disabled=no \
    interface=ether1 l2mtu=1596 mtu=1500 name=DEV-OTA use-service-tag=no \
    vlan-id=11
add arp=enabled comment="Enable Access to C2950" disabled=no interface=ether3 \
    l2mtu=1594 mtu=1500 name=NOC-01 use-service-tag=no vlan-id=21
add arp=enabled comment="Enable Access to C3550" disabled=no interface=ether1 \
    l2mtu=1596 mtu=1500 name=NOC-02 use-service-tag=no vlan-id=14
add arp=enabled comment="Web , Mail, FTP, Radius Server etc" disabled=no \
    interface=ether3 l2mtu=1594 mtu=1500 name=CLOUD-SERVER use-service-tag=no \
    vlan-id=15

/ip address
add address=10.10.1.1/24 disabled=no interface=Wifi-Bridge network=10.10.1.0
add address=xxx.xx.x
xx.xx/xx comment=WAN Dedicated disabled=no interface=ether5 \
    network=xxx.xx.xxx.xx
add address=192.168.90.1/24 comment=Proxy disabled=no interface=ether4 \
    network=192.168.90.0
add address=11.11.11.1/24 disabled=no interface=ether3 network=11.11.11.0
add address=17.8.4.1/24 disabled=no interface=DEV-OTA network=17.8.4.0
add address=1.1.1.1/32 comment="Anti_NETCUT Gateway" disabled=no interface=\
    Wifi-Bridge network=1.1.1.1
add address=4.3.2.1/24 comment="IPCamera & CPE Radio" disabled=no interface=\
    DEV-OTA network=4.3.2.0
add address=2.2.2.2/32 comment="Office Networks" disabled=no interface=ether3 \
    network=2.2.2.2
add address=192.168.1.10/24 comment=VLAN-ADSL disabled=no interface=ADSL-01 \
    network=192.168.1.0
add address=192.168.2.20/24 disabled=no interface=ADSL-02 network=192.168.2.0
add address=192.168.3.30/24 disabled=no interface=ADSL-03 network=192.168.3.0
add address=192.168.4.40/24 disabled=no interface=ADSL-04 network=192.168.4.0
add address=192.168.5.50/24 disabled=no interface=ADSL-05 network=192.168.5.0
add address=192.168.6.60/24 disabled=no interface=ADSL-06 network=192.168.6.0
add address=192.168.7.70/24 disabled=no interface=ADSL-07 network=192.168.7.0
add address=192.168.8.80/24 disabled=no interface=ADSL-08 network=192.168.8.0
add address=192.168.9.90/24 disabled=no interface=ADSL-09 network=192.168.9.0
add address=192.168.10.100/24 disabled=no interface=ADSL-10 network=\
    192.168.10.0
add address=192.168.21.1/24 comment=VLAN-NOC disabled=no interface=NOC-01 \
    network=192.168.21.0
add address=192.168.14.1/24 disabled=no interface=NOC-02 network=192.168.14.0
add address=192.168.15.1/24 disabled=no interface=CLOUD-SERVER network=\
    192.168.15.0
add address=192.168.1.101/24 comment=to MODEM WAN Dedicated disabled=yes interface=\
    ether5 network=192.168.1.0

/ip firewall mangle
add action=mark-connection chain=input comment="NEW Load Balancing" \
    connection-state=new disabled=yes in-interface=ether5 \
    new-connection-mark=WAN_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-01 new-connection-mark=ADSL-1_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-02 new-connection-mark=ADSL-2_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-03 new-connection-mark=ADSL-3_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-04 new-connection-mark=ADSL-4_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-05 new-connection-mark=ADSL-5_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-06 new-connection-mark=ADSL-6_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-07 new-connection-mark=ADSL-7_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-08 new-connection-mark=ADSL-8_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-09 new-connection-mark=ADSL-9_conn passthrough=yes
add action=mark-connection chain=input connection-state=new disabled=yes \
    in-interface=ADSL-10 new-connection-mark=ADSL-10_conn passthrough=yes
add action=mark-connection chain=prerouting comment="Load Balance Proxy" \
    connection-state=new disabled=yes dst-port=80 in-interface=ether4 \
    new-connection-mark=WAN_conn_via_PROXY nth=4,1 passthrough=yes \
    protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-1_conn_via_PROXY nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-2_conn_via_PROXY nth=4,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-3_conn_via_PROXY nth=4,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-4_conn_via_PROXY nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-5_conn_via_PROXY nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-6_conn_via_PROXY nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-7_conn_via_PROXY nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-8_conn_via_PROXY nth=4,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-9_conn_via_PROXY nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=80 in-interface=ether4 new-connection-mark=\
    ADSL-10_conn_via_PROXY nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment=\
    "Load Balance Wifi Client" connection-state=new disabled=yes dst-port=\
    !80,22 in-interface=Wifi-Bridge new-connection-mark=WAN_conn nth=\
    4,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-1_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-2_conn nth=4,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-3_conn nth=4,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-4_conn nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-5_conn nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-6_conn nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-7_conn nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-8_conn nth=4,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-9_conn nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=Wifi-Bridge new-connection-mark=\
    ADSL-10_conn nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=WAN_conn \
    nth=11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-1_conn \
    nth=11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-2_conn \
    nth=3,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-3_conn \
    nth=3,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-4_conn \
    nth=11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-8_conn \
    nth=3,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=Wifi-Bridge new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=\
    "Load Balance Officer" connection-state=new disabled=yes dst-port=\
    !80,22 in-interface=ether3 new-connection-mark=WAN_conn nth=11,1 \
    passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-1_conn \
    nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-2_conn \
    nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-3_conn \
    nth=3,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-4_conn \
    nth=11,4 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-8_conn \
    nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=ether3 new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=WAN_conn nth=\
    11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-1_conn nth=\
    11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-2_conn nth=\
    11,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-3_conn nth=\
    11,4 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-4_conn nth=\
    11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-5_conn nth=\
    11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-6_conn nth=\
    11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-7_conn nth=\
    11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-8_conn nth=\
    11,9 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether2 new-connection-mark=ADSL-9_conn nth=\
    11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=ether3 new-connection-mark=ADSL-10_conn nth=\
    11,11 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment="Load Balance CPE" \
    connection-state=new disabled=yes dst-port=!80,22 in-interface=\
    DEV-OTA new-connection-mark=WAN_conn nth=11,1 passthrough=yes \
    protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-1_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-2_conn nth=3,1 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-3_conn nth=3,2 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-4_conn nth=11,5 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-5_conn nth=11,6 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-6_conn nth=11,7 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-7_conn nth=11,8 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-8_conn nth=3,3 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-9_conn nth=11,10 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!80,22 in-interface=DEV-OTA new-connection-mark=\
    ADSL-10_conn nth=11,11 passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=WAN_conn \
    nth=11,1 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-1_conn \
    nth=11,2 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-2_conn \
    nth=11,3 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-3_conn \
    nth=11,4 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-4_conn \
    nth=11,5 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-5_conn \
    nth=11,6 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-6_conn \
    nth=11,7 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-7_conn \
    nth=11,8 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-8_conn \
    nth=11,9 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-9_conn \
    nth=11,10 passthrough=yes protocol=udp
add action=mark-connection chain=prerouting connection-state=new disabled=yes \
    dst-port=!53 in-interface=DEV-OTA new-connection-mark=ADSL-10_conn \
    nth=11,11 passthrough=yes protocol=udp
add action=mark-routing chain=prerouting comment="Routing Mark PCC Proxy" \
    connection-mark=WAN_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-1_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-2_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-2 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-3_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-3 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-4_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-4 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-5_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-5 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-6_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-6 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-7_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-7 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-8_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-8 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-9_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-9 passthrough=no
add action=mark-routing chain=prerouting connection-mark=\
    ADSL-10_conn_via_PROXY disabled=yes in-interface=ether4 \
    new-routing-mark=maring_ADSL-10 passthrough=no
add action=mark-routing chain=prerouting comment=\
    "Route PCC by Using Client Interface" connection-mark=WAN_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_WAN \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=Wifi-Bridge new-routing-mark=maring_ADSL-10 \
    passthrough=no
add action=mark-routing chain=prerouting comment=Office connection-mark=\
    WAN_conn disabled=yes in-interface=ether3 new-routing-mark=\
    maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=ether3 new-routing-mark=maring_ADSL-10 \
    passthrough=no
add action=mark-routing chain=prerouting comment=CPE connection-mark=\
    WAN_conn disabled=yes in-interface=DEV-OTA new-routing-mark=\
    maring_WAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-1_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-1 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-2_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-2 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-3_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-3 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-4_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-4 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-5_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-5 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-6_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-6 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-7_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-7 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-8_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-8 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-9_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-9 \
    passthrough=no
add action=mark-routing chain=prerouting connection-mark=ADSL-10_conn \
    disabled=yes in-interface=DEV-OTA new-routing-mark=maring_ADSL-10 \
    passthrough=no


/ip route
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ether5 \
    routing-mark=to_SAPINET scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_SAPINET scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-01 \
    routing-mark=to_ADSL-1 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-02 \
    routing-mark=to_ADSL-2 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-02 \
    routing-mark=to_ADSL-2 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_ADSL-3 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-03 \
    routing-mark=to_ADSL-3 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-04 \
    routing-mark=to_ADSL-4 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-05 \
    routing-mark=to_ADSL-5 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-06 \
    routing-mark=to_ADSL-6 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-07 \
    routing-mark=to_ADSL-7 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-08 \
    routing-mark=to_ADSL-8 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-08 \
    routing-mark=to_ADSL-8 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-09 \
    routing-mark=to_ADSL-9 scope=30 target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=ADSL-10 \
    routing-mark=to_ADSL-10 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add check-gateway=ping disabled=yes distance=1 dst-address=0.0.0.0/0 gateway="\
    ether5,ADSL-08,ADSL-04,ADSL-02,ADSL-01,ADSL-05,ADSL-10,ADSL-03,ADSL-09,A\
    DSL-06,ADSL-07" scope=30 target-scope=10
add disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add disabled=yes distance=4 dst-address=0.0.0.0/0 gateway=ADSL-02 scope=30 \
    target-scope=10
add disabled=yes distance=5 dst-address=0.0.0.0/0 gateway=ADSL-03 scope=30 \
    target-scope=10
add disabled=yes distance=6 dst-address=0.0.0.0/0 gateway=ADSL-04 scope=30 \
    target-scope=10
add disabled=yes distance=7 dst-address=0.0.0.0/0 gateway=ADSL-05 scope=30 \
    target-scope=10
add disabled=yes distance=8 dst-address=0.0.0.0/0 gateway=ADSL-06 scope=30 \
    target-scope=10
add disabled=yes distance=9 dst-address=0.0.0.0/0 gateway=ADSL-07 scope=30 \
    target-scope=10
add disabled=yes distance=10 dst-address=0.0.0.0/0 gateway=ADSL-08 scope=30 \
    target-scope=10
add disabled=yes distance=11 dst-address=0.0.0.0/0 gateway=ADSL-09 scope=30 \
    target-scope=10
add disabled=yes distance=12 dst-address=0.0.0.0/0 gateway=ADSL-10 scope=30 \
    target-scope=10
add disabled=yes distance=3 dst-address=0.0.0.0/0 gateway=ADSL-01 scope=30 \
    target-scope=10
add disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    ADSL-02,ADSL-08,ADSL-03,ether5 scope=30 target-scope=10
add disabled=yes distance=2 dst-address=0.0.0.0/0 gateway=ether5 scope=30 \
    target-scope=10
add disabled=yes distance=3 dst-address=0.0.0.0/0 gateway=ADSL-02 scope=30 \
    target-scope=10
add disabled=yes distance=4 dst-address=0.0.0.0/0 gateway=ADSL-03 scope=30 \
    target-scope=10
add disabled=yes distance=5 dst-address=0.0.0.0/0 gateway=ADSL-08 scope=30 \
    target-scope=10

with my simply topology.....:-)
I forget about the topology the image, there should be another one trunking on eth 1 which I have not been defined, but Iwould correction ASAP, thank you....
 
User avatar
cbrown
Trainer
Trainer
Posts: 1839
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 1:31 am

I'll look through your rules when I get to the office in the morning. It is a little challenging reading through all those rules on an iPhone.
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 8:27 am

Thank before guys.......
I am still confused with NTH arrangement on my rule, I had tried with the method on 3 WANs and working properly, but after I applied on 11 WANs was not running well, I hope to all of you who are here, to provide the best solutions, thank you
 
User avatar
cbrown
Trainer
Trainer
Posts: 1839
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 1:29 pm

Your rules are pretty screwed up. Try starting over and follow this. http://wiki.mikrotik.com/wiki/Manual:PCC. Don't use nth at all.
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 1:56 pm

OK, I will follow your advice ....thank you
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: [ask] 11 WAN Load Balancing

Wed Nov 02, 2011 2:04 pm

Nth in v3 and later has another algorithm: it's counter-per-rule now. so your rules won't work at all, they are for v2. use PCC
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Thu Nov 03, 2011 8:58 am

I have applied the rule as http://wiki.mikrotik.com/wiki/Manual:PCC but problems still arise, that is when 1 WAN connection is lost, whether in this way has included the failover rule?

secondly, if each client with a different port (example: eth3 ==> marketing, eth2 ===> HRD, and so on) .....
do i have to apply the rules on /ip firewall mangle in accordance with the interfaces used?

Thank You.......
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Tue Nov 08, 2011 7:52 am

hello.....
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: [ask] 11 WAN Load Balancing

Tue Nov 08, 2011 8:34 am

when you have many LAN interfaces - use src-address instead of in-interface, for example

routes w/o routing-mark should do failover
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Tue Nov 08, 2011 8:58 am

when you have many LAN interfaces - use src-address instead of in-interface
I totally agree with your suggestion, and what if I define src-address by using address list, so it can otherwise become src-address-list?
for example routes w/o routing-mark should do failover
that means: if the routing-mark remains defined in accordance with that the existing route?
Thank you...
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: [ask] 11 WAN Load Balancing

Tue Nov 08, 2011 11:18 am

what if I define src-address by using address list, so it can otherwise become src-address-list?
yep, you may also use address-list
that means: if the routing-mark remains defined in accordance with that the existing route?
it means, if packet has 'routing-mark', and there's no active routes in that routing table, routing decision process drops back to 'main' table
 
User avatar
tinggalklik
just joined
Topic Author
Posts: 19
Joined: Fri Oct 28, 2011 9:57 am
Location: Somewhere over the rainbow.....

Re: [ask] 11 WAN Load Balancing

Wed Nov 09, 2011 6:20 am

Mr. Chupaka, would you give an illustration, so that I could helped implement your ideas? thank you :-)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: [ask] 11 WAN Load Balancing

Wed Nov 09, 2011 9:54 am

illustration of what?

http://wiki.mikrotik.com/wiki/Manual:PCC - there are necessary /ip routes

Who is online

Users browsing this forum: Bing [Bot] and 72 guests