Community discussions

MikroTik App
 
conquerer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Tue Dec 22, 2009 7:31 pm

Load Balancing on Static IPs

Thu Nov 07, 2013 7:02 pm

I have 2 internet links with static ips. both are of 2mb.

I need to merge both two links to make it of 4mb.

Please provide solution.
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: Load Balancing on Static IPs

Thu Nov 07, 2013 7:56 pm

Check load balancer by PCC. In the wiki you have a example with 2 isp.
nothing
 
conquerer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Tue Dec 22, 2009 7:31 pm

Re: Load Balancing on Static IPs

Mon Nov 18, 2013 6:47 pm

I configured the PCC for loadbalaning according to this site
http://wiki.mikrotik.com/wiki/PCC
But link are not taking load on PCC mode. Please check my given configuration and guide what i did wrong in all.

/ip address
0 10.1.1.1/24 10.1.1.0 Lan
1 11.1.1.1/24 11.1.1.0 Wifi
2 192.168.1.3/24 192.168.1.0 WAN1
3 192.168.2.2/24 192.168.2.0 WAN2


/ip firewall mangle

0 chain=prerouting action=accept dst-address=192.168.1.0/24 in-interface=Lan

1 chain=prerouting action=accept dst-address=192.168.2.0/24 in-interface=Lan

2 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn
passthrough=yes in-interface=WAN1 connection-mark=no-mark

3 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn
passthrough=yes in-interface=WAN2 connection-mark=no-mark

4 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn
passthrough=yes dst-address-type=!local in-interface=Lan
connection-mark=no-mark per-connection-classifier=both-addresses:2/0

5 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn
passthrough=yes dst-address-type=!local in-interface=Lan
connection-mark=no-mark per-connection-classifier=both-addresses:2/1

6 chain=prerouting action=mark-routing new-routing-mark=to_WAN1
passthrough=yes in-interface=Lan connection-mark=WAN1_conn

7 chain=prerouting action=mark-routing new-routing-mark=to_WAN2

8 chain=output action=mark-routing new-routing-mark=to_WAN1 passthrough=yes
connection-mark=WAN1_conn

9 chain=output action=mark-routing new-routing-mark=to_WAN2 passthrough=yes
connection-mark=WAN2_conn

/ip route

0 A S 0.0.0.0/0 192.168.1.1 1
1 A S 0.0.0.0/0 192.168.2.1 1
2 A S 0.0.0.0/0 192.168.1.1 1
3 S 0.0.0.0/0 192.168.2.1 2
4 ADC 10.1.1.0/24 10.1.1.1 Lan 0
5 ADC 11.1.1.0/24 11.1.1.1 Wifi 0
6 ADC 192.168.1.0/24 192.168.1.3 WAN1 0
7 ADC 192.168.2.0/24 192.168.2.2 WAN2 0


/ip firewall NAT

0 chain=srcnat action=masquerade out-interface=WAN1

1 chain=srcnat action=masquerade out-interface=WAN2
 
bingo220
Member Candidate
Member Candidate
Posts: 124
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Load Balancing on Static IPs

Mon Nov 18, 2013 8:52 pm

try this config:
/ip address
add address=10.1.1.1/24 interface=Lan network=10.1.1.0
add address=192.168.1.3/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0

/ip route
add check-gateway=arp comment="WAN 1 – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=wan-1
add check-gateway=arp comment="WAN 2 – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=wan-2
add check-gateway=arp comment="WAN 1 – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=wan-1
add check-gateway=arp comment="WAN 2 – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=wan-2
add check-gateway=arp comment="Default Route – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1
add check-gateway=arp comment="Default Route – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2
add check-gateway=arp comment="Static Route – WAN1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=static-wan1
add check-gateway=arp comment="Static Route – WAN2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=static-wan2

/ip firewall mangle
add action=mark-connection chain=input comment="Mark new inbound connection wan1" connection-state=new disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection wan2" connection-state=new disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan1" connection-state=established disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan2" connection-state=established disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan1" connection-state=related disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan2" connection-state=related disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan-1 disabled=no new-routing-mark=static-wan1 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan-2 disabled=no new-routing-mark=static-wan2 passthrough=no
add action=mark-connection chain=prerouting comment="Mark traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=new disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=new disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment="Mark established traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=established disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark established traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=established disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment="Mark related traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=related disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark related traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=related disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark – option 1" connection-mark=wan1_pcc_conn disabled=no new-routing-mark=wan-1 passthrough=yes
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark – option 2" connection-mark=wan2_pcc_conn disabled=no new-routing-mark=wan-2 passthrough=yes

/ip firewall nat
add chain=srcnat action=masquerade out-interface=WAN1
add chain=srcnat action=masquerade out-interface=WAN2
 
conquerer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Tue Dec 22, 2009 7:31 pm

Re: Load Balancing on Static IPs

Thu Nov 21, 2013 11:07 pm

Given scripts not worked. Please guide me for a proper solution.

/ip address
add address=10.1.1.1/24 interface=Lan network=10.1.1.0
add address=192.168.1.3/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0

/ip route
add check-gateway=arp comment="WAN 1 – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=wan-1
add check-gateway=arp comment="WAN 2 – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=wan-2
add check-gateway=arp comment="WAN 1 – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=wan-1
add check-gateway=arp comment="WAN 2 – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=wan-2
add check-gateway=arp comment="Default Route – Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1
add check-gateway=arp comment="Default Route – Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2
add check-gateway=arp comment="Static Route – WAN1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1 routing-mark=static-wan1
add check-gateway=arp comment="Static Route – WAN2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=static-wan2

/ip firewall mangle
add action=mark-connection chain=input comment="Mark new inbound connection wan1" connection-state=new disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection wan2" connection-state=new disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan1" connection-state=established disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan2" connection-state=established disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan1" connection-state=related disabled=no in-interface=WAN1 new-connection-mark=wan-1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan2" connection-state=related disabled=no in-interface=WAN2 new-connection-mark=wan-2 passthrough=yes
add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan-1 disabled=no new-routing-mark=static-wan1 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan-2 disabled=no new-routing-mark=static-wan2 passthrough=no
add action=mark-connection chain=prerouting comment="Mark traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=new disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=new disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment="Mark established traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=established disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark established traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=established disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment="Mark related traffic that isn’t local with PCC mark rand (2 possibilities) – option 1" connection-state=related disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="Mark related traffic that isn’t local with PCC mark rand (2 possibilities) – option 2" connection-state=related disabled=no dst-address-type=!local in-interface=Lan new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark – option 1" connection-mark=wan1_pcc_conn disabled=no new-routing-mark=wan-1 passthrough=yes
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark – option 2" connection-mark=wan2_pcc_conn disabled=no new-routing-mark=wan-2 passthrough=yes

/ip firewall nat
add chain=srcnat action=masquerade out-interface=WAN1
add chain=srcnat action=masquerade out-interface=WAN2
 
User avatar
heislerb
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Mon Sep 16, 2013 4:41 pm

Re: Load Balancing on Static IPs

Fri Nov 22, 2013 2:39 am

Are you trying to provide 4Mbps to 1 user?
 
conquerer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Tue Dec 22, 2009 7:31 pm

Re: Load Balancing on Static IPs

Thu Nov 28, 2013 10:31 am

I want to combine 2 WAN links to all users

E.g;

4mb + 4mb = 20 users
 
User avatar
heislerb
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Mon Sep 16, 2013 4:41 pm

Re: Load Balancing on Static IPs

Thu Nov 28, 2013 5:17 pm

I have a Dual WAN with static IP's working. The Dual WAN part is working good. I think it is not 100%. I used the following link and made a few changes.
One user cannot get the combined input, but 20 users can get close to the combined input.
http://aacable.wordpress.com/2011/06/04 ... t-by-zaib/
 
User avatar
Kreacher
Member
Member
Posts: 359
Joined: Wed Sep 25, 2013 3:58 pm
Location: Hogwarts

Re: Load Balancing on Static IPs

Wed Dec 11, 2013 3:48 pm

I have 2 internet links with static ips. both are of 2mb.

I need to merge both two links to make it of 4mb.

Please provide solution.
1. Only with MLPPP on both sides (yours + your ISP side) it should work! (2 + 2 = 4)
2. Otherwise you are only able to use a Load Balancing method! (2 + 2 = 2 + 2)
- Session based load balancing
- Service based load balancing
- Policy based routing
- ....

There are different methods for different network schematics and/or designs, I would suggest that you are
taking a look over the MikroTik wiki to find out a method that fit your needs best.


http://wiki.mikrotik.com/wiki/Manual:Lo ... bnet_links
http://wiki.mikrotik.com/wiki/PCC
http://wiki.mikrotik.com/wiki/NTH_load_ ... _approach)
http://wiki.mikrotik.com/wiki/NTH_load_ ... masquerade
http://wiki.mikrotik.com/wiki/ECMP_load ... masquerade

Good luck
Kindly regards
Kreacher ♬

--------------------------------------
Karma points must not be paid by you
 
nikos
just joined
Posts: 22
Joined: Sat Jan 14, 2012 11:18 am

Re: Load Balancing on Static IPs

Sat Dec 21, 2013 10:32 am

Hi all,
I have same problem with 2 Fiber Optic 4/24 Mbps links with /29 subnet on ISP's hardware,I can use the rest IP's. Cannot loadbalance with PCC. Any help will be appreciated.
Thank you in advance
 
User avatar
Kreacher
Member
Member
Posts: 359
Joined: Wed Sep 25, 2013 3:58 pm
Location: Hogwarts

Re: Load Balancing on Static IPs

Sat Dec 21, 2013 12:58 pm

Hi all,
I have same problem with 2 Fiber Optic 4/24 Mbps links with /29 subnet on ISP's hardware,I can use the rest IP's. Cannot loadbalance with PCC. Any help will be appreciated.
Thank you in advance
Policy Based Routing
Kindly regards
Kreacher ♬

--------------------------------------
Karma points must not be paid by you
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: Load Balancing on Static IPs

Sat Dec 21, 2013 3:17 pm

Try with pcc "both address and port".



Send from my mobile phone using Tapatalk.
nothing

Who is online

Users browsing this forum: elekakos2703, ngrhd and 29 guests