Community discussions

MikroTik App
 
netbits
just joined
Topic Author
Posts: 24
Joined: Fri Aug 03, 2012 11:25 pm

is my pcc config correct?

Mon Nov 19, 2012 11:05 pm

I'm trying to setup pcc on a RB1100AH. I have 10 networks (the first 10 ports each go to their own network) and 3 WAN links which I would like to bond using pcc. Unfortunately I need to do this config in a live environment so I would really appreciate it and be super grateful if someone can have a quick look at my config and tell me if it will work:
/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=WAN3_conn

add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2
add chain=output connection-mark=WAN3_conn action=mark-routing new-routing-mark=to_WAN3

add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17216
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17216
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17216
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17217
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17217
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17217
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17218
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17218
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17218
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17219
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17219
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17219
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17220
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17220
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17220
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17221
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17221
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17221
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17222
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17222
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17222
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17223
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17223
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17223
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17224
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17224
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17224
add chain=prerouting dst-address=10.1.1.0/30 action=accept in-interface=17225
add chain=prerouting dst-address=10.2.2.0/30 action=accept in-interface=17225
add chain=prerouting dst-address=10.3.3.0/30 action=accept in-interface=17225

add chain=prerouting dst-address-type=!local in-interface=17216 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17216 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17216 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17217 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17217 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17217 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17218 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17218 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17218 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17219 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17219 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17219 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17220 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17220 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17220 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17221 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17221 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17221 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17222 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17222 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17222 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17223 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17223 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17223 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17224 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17224 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17224 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17225 per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17225 per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=17225 per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes

add chain=prerouting connection-mark=WAN1_conn in-interface=17216 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17216 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17216 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17217 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17217 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17217 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17218 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17218 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17218 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17219 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17219 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17219 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17220 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17220 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17220 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17221 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17221 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17221 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17222 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17222 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17222 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17223 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17223 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17223 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17224 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17224 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17224 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN1_conn in-interface=17225 action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=17225 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=17225 action=mark-routing new-routing-mark=to_WAN3



/ip route
add dst-address=0.0.0.0/0 gateway=10.1.1.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.2.2.1 routing-mark=to_WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.3.3.1 routing-mark=to_WAN3 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=10.1.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.2.2.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.3.3.1 distance=3 check-gateway=ping
I see in all the examples they add NAT. NAT is already being done on the ADSL routers so i was wondering if I can leave out the following:
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
add chain=srcnat out-interface=WAN3 action=masquerade
 
netbits
just joined
Topic Author
Posts: 24
Joined: Fri Aug 03, 2012 11:25 pm

Re: is my pcc config correct?

Mon Nov 19, 2012 11:07 pm

Just to make it easier to visualize, I've added a network diagram
Image
 
netbits
just joined
Topic Author
Posts: 24
Joined: Fri Aug 03, 2012 11:25 pm

Re: is my pcc config correct?

Tue Nov 20, 2012 7:19 am

Did I mention I'll buy who ever helps coffee/beer and give them some karma :)
 
netbits
just joined
Topic Author
Posts: 24
Joined: Fri Aug 03, 2012 11:25 pm

Re: is my pcc config correct?

Tue Nov 20, 2012 12:26 pm

Okay, you guys drive a hard bargain. I'll buy two beers for this first person that helps? :-P
 
romahiz
just joined
Posts: 12
Joined: Thu Nov 22, 2012 11:28 am

Re: is my pcc config correct?

Thu Nov 22, 2012 12:25 pm

Yes this configuration will work but you didn't mentioned that you are going to configure DNS with allow remote request. may be you forgot to mention that but after adding DNS to allow remote request Yes your configuration will work.
Regards,
Romahiz
romahiz.wordpress.com
 
infidel
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Wed Oct 07, 2009 5:30 pm

Re: is my pcc config correct?

Thu Nov 22, 2012 7:57 pm

I see in all the examples they add NAT. NAT is already being done on the ADSL routers so i was wondering if I can leave out the following:
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
add chain=srcnat out-interface=WAN3 action=masquerade
It does not matter if the ADSL router is doing nat, you still need to nat your packets since they enter as 172.xx.0.0 and leave as 10.xx.xx.2 Aa you still need to port forward packets from adsl router to mikrotik and then port forward to clients (if you need access from outside) You could ofcourse set the adsl routers to bridge mode, and configure pppoe clients on the mikrotik. That way your mikrotik's wan interfaces will get the adsl router wan ips (and skip a nat)

Who is online

Users browsing this forum: Google [Bot], pe1chl and 41 guests