Community discussions

MikroTik App
 
edris
just joined
Topic Author
Posts: 15
Joined: Wed Dec 22, 2010 1:41 pm

pcc load balancing

Wed Dec 22, 2010 3:15 pm

hi
i have rb1000u that this model of routerboard has 4 physical interface. and i have 4 wimax modem that each of them has 1mb bandwidth
i use ether 3 and ether 4 for my local networks. and i want to use 2 first interface as wan interface!! and i also want to using pcc load balancing on my router for managing internet bandwidth in my local networks but unfortunately pcc load balancing only applied on physical interface . my question is... in consider to my network topology how can i using pcc load balancing on my router with 2 physical interface and 4 different gateway!!
can i use 2 range of address on same interface?
what is the best solution for my problem!!
any idea?
Image
 
User avatar
LatinSuD
Member Candidate
Member Candidate
Posts: 181
Joined: Wed Jun 29, 2005 1:05 pm
Location: Spain
Contact:

Re: pcc load balancing

Wed Dec 22, 2010 3:59 pm

Short answer:
- You can have N different addresses on the same interface (you can even do that on windows :) ).
- PCC load balancing on your case should be quite straightforward.

Keep in mind that load balancing and policy routing is generally based on the gateway address (you have 4) rather than the interfaces (you have 2).
 
edris
just joined
Topic Author
Posts: 15
Joined: Wed Dec 22, 2010 1:41 pm

Re: pcc load balancing

Wed Dec 22, 2010 6:44 pm

thanks for your reply and sorry about my poor English.
can u explain more for me!! what exactly should i do!!
here is my router configuration but is seems like load balancing not working correctly.
[admin@MikroTik] > ip add pri
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         BROADCAST       INTERFACE                                                                               
 0   10.0.0.1/22        10.0.0.0        10.0.3.255      lan                                                                                     
 1   192.168.101.2/24   192.168.101.0   192.168.101.255 wan1                                                                                    
 2   192.168.102.2/24   192.168.102.0   192.168.102.255 wan2                                                                                    
 3   192.168.103.2/24   192.168.103.0   192.168.103.255 wan1                                                                                    
 4   192.168.104.2/24   192.168.104.0   192.168.104.255 wan2    
[admin@MikroTik] > ip fir man pri
Flags: X - disabled, I - invalid, D - dynamic 
 0   chain=input action=mark-connection new-connection-mark=wan1_conn passthrough=yes src-address=192.168.101.1 in-interface=wan1 

 1   chain=input action=mark-connection new-connection-mark=wan2_conn passthrough=yes src-address=192.168.102.1 in-interface=wan2 

 2   chain=input action=mark-connection new-connection-mark=wan3_conn passthrough=yes src-address=192.168.103.1 in-interface=wan1 

 3   chain=input action=mark-connection new-connection-mark=wan4_conn passthrough=yes src-address=192.168.104.1 in-interface=wan2 

 4   chain=output action=mark-routing new-routing-mark=to_wan1 passthrough=yes connection-mark=wan1_conn 

 5   chain=output action=mark-routing new-routing-mark=to_wan2 passthrough=yes connection-mark=wan2_conn 

 6   chain=output action=mark-routing new-routing-mark=to_wan3 passthrough=yes connection-mark=wan3_conn 

 7   chain=output action=mark-routing new-routing-mark=to_wan4 passthrough=yes connection-mark=wan4_conn 

 8   chain=prerouting action=accept src-address=10.0.0.2-10.0.3.254 dst-address=192.168.101.0/24 

 9   chain=prerouting action=accept src-address=10.0.0.2-10.0.3.254 dst-address=192.168.102.0/24 

10   chain=prerouting action=accept src-address=10.0.0.2-10.0.3.254 dst-address=192.168.103.0/24 

11   chain=prerouting action=accept src-address=10.0.0.2-10.0.3.254 dst-address=192.168.104.0/24 

12   chain=prerouting action=mark-connection new-connection-mark=wan1_conn passthrough=yes src-address=10.0.0.2-10.0.3.254 
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/0 

13   chain=prerouting action=mark-connection new-connection-mark=wan2_conn passthrough=yes src-address=10.0.0.2-10.0.3.254 
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/1 

14   chain=prerouting action=mark-connection new-connection-mark=wan3_conn passthrough=yes src-address=10.0.0.2-10.0.3.254 
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/2 

15   chain=prerouting action=mark-connection new-connection-mark=wan4_conn passthrough=yes src-address=10.0.0.2-10.0.3.254 
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/3 

16   chain=prerouting action=mark-routing new-routing-mark=to_wan1 passthrough=yes src-address=10.0.0.2-10.0.3.254 connection-mark=wan1_conn 

17   chain=prerouting action=mark-routing new-routing-mark=to_wan2 passthrough=yes src-address=10.0.0.2-10.0.3.254 connection-mark=wan2_conn 

18   chain=prerouting action=mark-routing new-routing-mark=to_wan3 passthrough=yes src-address=10.0.0.2-10.0.3.254 connection-mark=wan3_conn 

19   chain=prerouting action=mark-routing new-routing-mark=to_wan4 passthrough=yes src-address=10.0.0.2-10.0.3.254 connection-mark=wan4_conn 
[admin@MikroTik] /ip firewall nat> pr
Flags: X - disabled, I - invalid, D - dynamic 
 0 X ;;; place hotspot rules here
     chain=unused-hs-chain action=passthrough 

 1   chain=srcnat action=masquerade out-interface=wan1 

 2   chain=srcnat action=masquerade out-interface=wan2 

 3   chain=srcnat action=masquerade out-interface=wan1 

 4   chain=srcnat action=masquerade out-interface=wan1 
[admin@MikroTik] > ip rou pri
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                          192.168.101.1      1       
 1 A S  0.0.0.0/0                          192.168.102.1      1       
 2 A S  0.0.0.0/0                          192.168.103.1      1       
 3 A S  0.0.0.0/0                          192.168.104.1      1       
 4 A S  0.0.0.0/0                          192.168.101.1      1       
 5   S  0.0.0.0/0                          192.168.102.1      2       
 6   S  0.0.0.0/0                          192.168.103.1      3       
 7   S  0.0.0.0/0                          192.168.104.1      4       
 8 ADC  10.0.0.0/22        10.0.0.1        lan                0             
9 ADC  192.168.101.0/24   192.168.101.2   wan1               0       
10 ADC  192.168.102.0/24   192.168.102.2   wan2               0       
11 ADC  192.168.103.0/24   192.168.103.2   wan1               0       
12 ADC  192.168.104.0/24   192.168.104.2   wan2               0       
                                                                      
any idea
 
edris
just joined
Topic Author
Posts: 15
Joined: Wed Dec 22, 2010 1:41 pm

Re: pcc load balancing

Thu Dec 23, 2010 9:46 am

any help would be appreciated.
 
edris
just joined
Topic Author
Posts: 15
Joined: Wed Dec 22, 2010 1:41 pm

Re: pcc load balancing

Fri Dec 24, 2010 11:15 am

someone please help me on this situation !!
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: pcc load balancing

Fri Dec 24, 2010 3:54 pm

I would suggest the following
[admin@MikroTik] > ip add pri
Flags: X - disabled, I - invalid, D - dynamic
#   ADDRESS            NETWORK         BROADCAST       INTERFACE                                                                               
0   10.0.0.1/22        10.0.0.0        10.0.3.255      lan                                                                                     
1   192.168.101.2/24   192.168.101.0   192.168.101.255 wan1                                                                                   
2   192.168.102.2/24   192.168.102.0   192.168.102.255 wan2                                                                                   
3   192.168.103.2/24   192.168.103.0   192.168.103.255 wan1                                                                                   
4   192.168.104.2/24   192.168.104.0   192.168.104.255 wan2   
[admin@MikroTik] > ip fir man pri
Flags: X - disabled, I - invalid, D - dynamic
0   chain=input action=mark-connection new-connection-mark=wan1_conn passthrough=yes dst-address=192.168.101.1 in-interface=wan1

1   chain=input action=mark-connection new-connection-mark=wan2_conn passthrough=yes dst-address=192.168.102.1 in-interface=wan2

2   chain=input action=mark-connection new-connection-mark=wan3_conn passthrough=yes dst-address=192.168.103.1 in-interface=wan1

3   chain=input action=mark-connection new-connection-mark=wan4_conn passthrough=yes dst-address=192.168.104.1 in-interface=wan2

4   chain=output action=mark-routing new-routing-mark=to_wan1 passthrough=yes connection-mark=wan1_conn

5   chain=output action=mark-routing new-routing-mark=to_wan2 passthrough=yes connection-mark=wan2_conn

6   chain=output action=mark-routing new-routing-mark=to_wan3 passthrough=yes connection-mark=wan3_conn

7   chain=output action=mark-routing new-routing-mark=to_wan4 passthrough=yes connection-mark=wan4_conn

8   chain=prerouting action=accept dst-address=10.0.0.0/24


9   chain=prerouting action=mark-connection new-connection-mark=wan1_conn passthrough=yes src-address=10.0.0.0/24
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/0

10   chain=prerouting action=mark-connection new-connection-mark=wan2_conn passthrough=yes src-address=10.0.0.0/24
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/1

11   chain=prerouting action=mark-connection new-connection-mark=wan3_conn passthrough=yes src-address=10.0.0.0/24
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/2

12   chain=prerouting action=mark-connection new-connection-mark=wan4_conn passthrough=yes src-address=10.0.0.0/24
     dst-address-type=!local hotspot=auth per-connection-classifier=both-addresses:4/3

13   chain=prerouting action=mark-routing new-routing-mark=to_wan1 passthrough=yes src-address=10.0.0.0/24 connection-mark=wan1_conn

14   chain=prerouting action=mark-routing new-routing-mark=to_wan2 passthrough=yes src-address=10.0.0.0/24 connection-mark=wan2_conn

15   chain=prerouting action=mark-routing new-routing-mark=to_wan3 passthrough=yes src-address=10.0.0.0/24 connection-mark=wan3_conn

16   chain=prerouting action=mark-routing new-routing-mark=to_wan4 passthrough=yes src-address=10.0.0.0/24 connection-mark=wan4_conn

[admin@MikroTik] /ip firewall nat> pr
Flags: X - disabled, I - invalid, D - dynamic
0 X ;;; place hotspot rules here
     chain=unused-hs-chain action=passthrough

1   chain=srcnat action=masquerade out-interface=wan1

2   chain=srcnat action=masquerade out-interface=wan2


[admin@MikroTik] > ip rou pri
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE	Routing Mark
0 A S  0.0.0.0/0                          192.168.101.1      1       	to_wan1
1 A S  0.0.0.0/0                          192.168.102.1      1       	to_wan2
2 A S  0.0.0.0/0                          192.168.103.1      1       	to_wan3
3 A S  0.0.0.0/0                          192.168.104.1      1       	to_wan4
4 A S  0.0.0.0/0                          192.168.101.1      1       
5   S  0.0.0.0/0                          192.168.102.1      2       
6   S  0.0.0.0/0                          192.168.103.1      3       
7   S  0.0.0.0/0                          192.168.104.1      4       
8 ADC  10.0.0.0/22        10.0.0.1        lan                0             
9 ADC  192.168.101.0/24   192.168.101.2   wan1               0       
10 ADC  192.168.102.0/24   192.168.102.2   wan2               0       
11 ADC  192.168.103.0/24   192.168.103.2   wan1               0       
12 ADC  192.168.104.0/24   192.168.104.2   wan2               0       

Who is online

Users browsing this forum: Google [Bot], GoogleOther [Bot] and 21 guests