Community discussions

MikroTik App
 
jopopo
just joined
Topic Author
Posts: 6
Joined: Mon Oct 17, 2011 4:43 pm

PCC with 2xWAN + 3xLAN

Fri Oct 21, 2011 11:19 am

Helo, there are a lot of description to configure PCC but all instructions are with multiple WAN (ISP) and single LAN. I have different scenario using 2x ports for ISP (ADSL and Cable) and 3x lan ports for local network belong to same network running DHCP server on all three. Here are the settings:

Interfaces:
1. wan1 - dhcp client (ADSL ISP doesn't allow to use bridge mode, receiving address is from pool 192.168.1.2-192.168.1.5)
2. wan2 - dhcp client (Cable model)
3. lan1 - 192.168.2.1/24 (DHCP Server)
4. lan2 - 192.168.2.1/24 (DHCP Server)
5. lan3 - 192.168.2.1/24 (DHCP Server)

If I follow the instruction (2xWAN + 1xLAN) and everything is clear until these lines for creating mangle rules:
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
Should I multiple lines above for every lan interface I have? Something like this (read the comments):
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (2 possibilities for lan1) - option 1" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan1 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 for lan1) - option 2" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan1 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 for lan2) - option 1" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan2 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 for lan2) - option 2" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan2 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 for lan3) - option 1" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan3 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 for lan3) - option 2" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan3 new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=\
both-addresses:2/1
Or I missed the idea?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: PCC with 2xWAN + 3xLAN

Fri Oct 21, 2011 7:26 pm

Well just looking at your first couple of sentences, I see a huge problem. You have the same IP and subnet on 3 different routed interfaces. Things will not work at all with a setup like that, each routed interface needs it's own subnet and IP address, otherwise it can't route properly, and nothing will work. If you want multiple interfaces to share the same address space, that means you either need to bridge them together so they act is one layer3 interface, or use a switch chip to make them one layer3 interface.

Otherwise PCC with 1 or 20 lans are no different, with the example you just include the extra subnets into your address list, and possibly modify your NAT rules depending on your needs.
 
jopopo
just joined
Topic Author
Posts: 6
Joined: Mon Oct 17, 2011 4:43 pm

Re: PCC with 2xWAN + 3xLAN

Fri Oct 21, 2011 7:49 pm

Yes, you are right, I need all three "lan" interfaces to act like "Switch", be part of same network so wired PC can see each other. Then I need load balancing between those (3x) PCs in network so any traffic from three lan ports to be balanced througt two wan ports.

Is this possible?

edit: Why I want this scenario? I have 750G and want use Gb ports to have fast transfer between PCs and local network, don't want to buy another 1GB switch and connect behind the RB. Make no sense to me.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: PCC with 2xWAN + 3xLAN

Fri Oct 21, 2011 8:43 pm

Then as I said, use the switch chip to get several LAN interfaces to act as one since you want wirespeed possible between the LAN PCs. Then just have the IP and DHCP server on the master-port, all services will be available on other ports since the router sees them as one interface in it's software.
http://wiki.mikrotik.com/wiki/Manual:Sw ... p_Features

I'm not sure what your question is?
 
jopopo
just joined
Topic Author
Posts: 6
Joined: Mon Oct 17, 2011 4:43 pm

Re: PCC with 2xWAN + 3xLAN

Fri Oct 21, 2011 9:01 pm

Then as I said, use the switch chip to get several LAN interfaces to act as one since you want wirespeed possible between the LAN PCs. Then just have the IP and DHCP server on the master-port, all services will be available on other ports since the router sees them as one interface in it's software.
http://wiki.mikrotik.com/wiki/Manual:Sw ... p_Features

I'm not sure what your question is?
Good, so I made lan1 to be master (run DHCP Server on it) and made lan2 and lan3 to have lan1 as MASTER-PORT. When I attach device on lan2 there are letters R near lan1 and lan2 meaning traffic is on slave and master ports. That was my question :)

Now I know how to do. Thanks for hint!!!

Who is online

Users browsing this forum: CGGXANNX, N6WT and 42 guests