I vote it to be also in output chain as well!i hope this would work on the output chain - ie; connections generated from the router itself. Mainly for l2tp and pptp tunnels in my case.
Well as far as i can see you can use any chain there, so it shouldn't be a problem.i hope this would work on the output chain - ie; connections generated from the router itself. Mainly for l2tp and pptp tunnels in my case.
I second that! The gateway might be up and reachable but internet is down. This is often the case with VSAT connections.Any chance of giving the possibility to check another Ip not only the gateway if there is Internet connection through one gateway or not.???
True. For example I could use check-gateway=<IP>, instead of "ping" or "arp" !I second that! The gateway might be up and reachable but internet is down. This is often the case with VSAT connections.Any chance of giving the possibility to check another Ip not only the gateway if there is Internet connection through one gateway or not.???
yep! Netwatch with possibility to set Routing Table like in Ping command would be nice! feature request? somebody who need this, please write to supportTrue. For example I could use check-gateway=<IP>, instead of "ping" or "arp" !I second that! The gateway might be up and reachable but internet is down. This is often the case with VSAT connections.Any chance of giving the possibility to check another Ip not only the gateway if there is Internet connection through one gateway or not.???
Well it is NTH it is persistent NTH.Testing new system right now. So far working great. haven't seen anything drop so far.
I am watching it though. It seems to act a little more like nth on splitting how it picks which gateway but so far no major issues.
Going to keep testing it more tonight and push it harder with more connections tonight
Major servers are designed to be checked, they are powerful machines, load balanced by DNS, on powerful connections, can not be DoS attacked, so what I am saying is that we need the feature to ping a further up IP than the gateway and thats final. If your concerns are valid, than that can be avoided by providing a LIST OF IPs to ping to switch between them, if one fails - start ping the other one etc etc. simple logic. Right MikroTik ?I think we should keep all checks limited to the closest network or else it will start to become ridiculous and dangerous.
Imagine half of the country constantly checking your server's IP address..... and what will happen if that address goes down - router willl drop perfectly working connection? I think there is no point even trying to ask for this.
...
IMO - wrong!
Major servers are designed to be checked, they are powerful machines, load balanced by DNS, on powerful connections, can not be DoS attacked, so what I am saying is that we need the feature to ping a further up IP than the gateway and thats final. If your concerns are valid, than that can be avoided by providing a LIST OF IPs to ping to switch between them, if one fails - start ping the other one etc etc. simple logic. Right MikroTik ?
You do understand that check-gateway=ping,arp is not enough to know whether a route is OK, right? You know that we need to know if an ISP gateway is up in the case we have a CPE before the MirkoTik Router, right? We can not ping 192.168.1.1 we need to ping the Internet IP of the ISP gateway.IMO - wrong!
Major servers are designed to be checked, they are powerful machines, load balanced by DNS, on powerful connections, can not be DoS attacked, so what I am saying is that we need the feature to ping a further up IP than the gateway and thats final. If your concerns are valid, than that can be avoided by providing a LIST OF IPs to ping to switch between them, if one fails - start ping the other one etc etc. simple logic. Right MikroTik ?
and here is why - when you ping closest hop, you know this hop is working or not - if it is, then you do not have to worry about that. But in this case your owner of gateway should worry and supply you with route to network if links of gateway by any chance is down.
and most interesting part, if you are pinging some outer address, when route goes down, you adjust your routes and host is available again, your automatic configuration switches to previous configuration and no ping again - so, infinite loop of switching gateways.
and one more thing - do not hijack other threads and stay on topic in this case PCC
that's why you should use 'Routing Table' parameter in Ping command with table that have only one gw, isn't it? =)and most interesting part, if you are pinging some outer address, when route goes down, you adjust your routes and host is available again, your automatic configuration switches to previous configuration and no ping again - so, infinite loop of switching gateways.
there is nothing to fix, it just works that way - linux kernel developers made this. this is why we made another method that does what you want.Nice fix for the nth load balance.
Question though is will there ever be a fix or patch for ecmp to work correctly?
Thanks for reply normis.there is nothing to fix, it just works that way - linux kernel developers made this. this is why we made another method that does what you want.Nice fix for the nth load balance.
Question though is will there ever be a fix or patch for ecmp to work correctly?
there is no need to complicate simple things. to achieve effect you can already have but not in so direct way. i am stressing once more - your only concern is that link to any number of gateways is working and you can pass data there. For ease of explanation, lets make diagramthat's why you should use 'Routing Table' parameter in Ping command with table that have only one gw, isn't it? =)
I have read your explanation Janis K, and I am sure that from your perspective you could be right that there is no need to complicate things. MikroTik is free to decide whether or not to implement such feature.
But I warn you:
Every time a RouterOS user connects an ADSL modem, a SOHO "Broadband Router", some DOCSIS modems, some 3G modems etc etc etc THAT IS IN NAT MODE they will not be able to use check-gateway to know if that link to the Internet is good or not. They will become frustrated with the product, as usual, and either give up on it, or get on your nerves about it.
And when a veteran RouterOS user needs to use a GW that is a NAT he would need to implement a script and that's work overtime that the user would rather not waste to discover the hot water (=the right working script) every time.
RouterOS as a product can be much more automated and easier for the customer. Is MikroTik willing to improve on this matter? Stability is more important And ease of use will make more happy customers.
By the way I am so happy for PCC very useful!
p.s. and even in a lot of cases when GW is not NAT, Internet connectivity through it is lost, due to upstream ISP problems. Happens all the time. So the problem is bigger, so MikroTik should take action.
per-connection-classifier=src-address,dst-address must beadd chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address,dst-address:2/0 \
action=mark-connection new-connection-mark=wlan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address,dst-address:2/1 \
action=mark-connection new-connection-mark=wlan2_conn passthrough=yes
what if that gateway goes down? how can I implement high availability?Nop, example is correct. No matter how many connections from address A to address B will be always marked the same aand sent via same gateway.
thx. Do You have any idea what performance can I achive with this config? I'd need more than 1-3Gbit/s.. I think with this I can implement Server Load Balancing - Gateways become Servers in the Farm and clients become the users of the servers...If gateway goes down and you have "check-gateway" in the routes - those routes will become inactive and packets will be routed by other available route.
/ip firewall mangle> add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address,dst-address:2/0 ac
tion=mark-connection new-connection-mark=wlan1_conn passthrough=yes
syntax error (line 1 column 91)
Can't you use <tab> button - it is so easy to see where changes are exactly! If you just copy/paste configuration without thinking what you are doing it end up as a big problem one time.It looks like the acceptable syntax has changed?
Both examples are correct.. so what is the difference?there is wrong in PCC Wiki in those rulesper-connection-classifier=src-address,dst-address must beadd chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address,dst-address:2/0 \
action=mark-connection new-connection-mark=wlan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address,dst-address:2/1 \
action=mark-connection new-connection-mark=wlan2_conn passthrough=yes
per-connection-classifier=src-address,src-port
or it will be invalid .
i just tried PCC and it works fine until now .
Divide traffic into 4 streams and send first 2 on the first gateway. (use both addresses as separator)Both examples are correct.. so what is the difference?
How can I force one WAN port with 50% and the two others WAN ports with 25%?
tnx
read the link in the first post of this thread. it's very simple, there is nothing specialHello,
new PCC matcher is proprietary Mikrotik solution or implementation of open source code? I am interested how this new thing works. Many thanks.
# allow multiple inbound connections on dynamic (adsl) interfaces
/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=wan1 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=wan2 passthrough=yes
add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan1 connection-state=new disabled=no new-routing-mark=wan1 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan2 connection-state=new disabled=no new-routing-mark=wan2 passthrough=no
add action=mark-connection chain=prerouting comment="Mark new established connection wan1" connection-state=established disabled=no in-interface=wan1 new-connection-mark=wan1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark new established connection wan2" connection-state=established disabled=no in-interface=wan2 new-connection-mark=wan2 passthrough=yes
add action=mark-routing chain=output comment="Mark new established route wan1" connection-mark=wan1 connection-state=established disabled=no new-routing-mark=wan1 passthrough=no
add action=mark-routing chain=output comment="Mark new established route wan2" connection-mark=wan2 connection-state=established disabled=no new-routing-mark=wan2 passthrough=no
# round robin outbound traffic routing, based on src port and src address
/ip firewall mangle
add chain=prerouting dst-address-type=!local in-interface=Hotspot per-connection-classifier=src-address-and-port:2/0 action=mark-connection new-connection-mark=wan1_pcc_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Hotspot per-connection-classifier=src-address-and-port:2/1 action=mark-connection new-connection-mark=wan2_pcc_conn passthrough=yes
add chain=prerouting connection-mark=wan1_pcc_conn in-interface=Hotspot action=mark-routing new-routing-mark=wan1
add chain=prerouting connection-mark=wan2_pcc_conn in-interface=Hotspot action=mark-routing new-routing-mark=wan2
Thank you,read the link in the first post of this thread. it's very simple, there is nothing specialHello,
new PCC matcher is proprietary Mikrotik solution or implementation of open source code? I am interested how this new thing works. Many thanks.
Can I add this rules:Divide traffic into 4 streams and send first 2 on the first gateway. (use both addresses as separator)Both examples are correct.. so what is the difference?
How can I force one WAN port with 50% and the two others WAN ports with 25%?
tnx
Note that this is not per packet load balancing, so it will not be 50/25/25 all the time. - More connections/clients you will have closer to those numbers you will get.
Completely correct, the wrong (pre-release) version was uploaded onto 2 routers and upgraded. Funnily enough they seem to be working fine, but I'm waiting until early morning to downgrade and re-upgrade.AFAIK MT uses only Vanilla Kernel, all other code is written by MT. (at least starting from 3.x)
to omega-00: MT gave out pre-release version out to test PCC, there was your syntax, but in official release of 3.24 syntax was changed. Example is correct.
/ ip addressFollowing discussions about ECMP with Masquerade and similar, we have made a new firewall matcher that will allow you more control and hopefully will overcome the previous limitations, read on:
http://wiki.mikrotik.com/wiki/PCC#Introduction
My current "inbound routing + PCC on outbound routing" implementation.
I know NetworkPro was looking for something like this recently so I hope this helps some people out:
Code: Select all# allow multiple inbound connections on dynamic (adsl) interfaces /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=wan1 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=wan2 passthrough=yes add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan1 connection-state=new disabled=no new-routing-mark=wan1 passthrough=no add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan2 connection-state=new disabled=no new-routing-mark=wan2 passthrough=no add action=mark-connection chain=prerouting comment="Mark new established connection wan1" connection-state=established disabled=no in-interface=wan1 new-connection-mark=wan1 passthrough=yes add action=mark-connection chain=prerouting comment="Mark new established connection wan2" connection-state=established disabled=no in-interface=wan2 new-connection-mark=wan2 passthrough=yes add action=mark-routing chain=output comment="Mark new established route wan1" connection-mark=wan1 connection-state=established disabled=no new-routing-mark=wan1 passthrough=no add action=mark-routing chain=output comment="Mark new established route wan2" connection-mark=wan2 connection-state=established disabled=no new-routing-mark=wan2 passthrough=no # round robin outbound traffic routing, based on src port and src address /ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=Hotspot per-connection-classifier=src-address-and-port:2/0 action=mark-connection new-connection-mark=wan1_pcc_conn passthrough=yes add chain=prerouting dst-address-type=!local in-interface=Hotspot per-connection-classifier=src-address-and-port:2/1 action=mark-connection new-connection-mark=wan2_pcc_conn passthrough=yes add chain=prerouting connection-mark=wan1_pcc_conn in-interface=Hotspot action=mark-routing new-routing-mark=wan1 add chain=prerouting connection-mark=wan2_pcc_conn in-interface=Hotspot action=mark-routing new-routing-mark=wan2
but it didn't work ./ ip address
add address=192.168.100.1/24 network=192.168.100.0 broadcast=192.168.100.255 interface=Local
add address=192.168.0.5/24 network=192.168.0.0 broadcast=192.168.0.255 interface=WAN1
add address=192.168.1.5/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN2
add address=192.168.2.5/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN3
/ 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=WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=WAN2
add chain=output connection-mark=WAN3_conn action=mark-routing new-routing-mark=WAN3
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:3/1 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=Local action=mark-routing new-routing-mark=WAN3
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-mark=WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=WAN3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=3 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
add chain=srcnat out-interface=WAN3 action=masquerade
Divide traffic into 4 streams and send first 2 on the first gateway. (use both addresses as separator)Both examples are correct.. so what is the difference?
How can I force one WAN port with 50% and the two others WAN ports with 25%?
tnx
Note that this is not per packet load balancing, so it will not be 50/25/25 all the time. - More connections/clients you will have closer to those numbers you will get.
I am sorry... I just ask how to divide traffic into streams? Using queue or ?? Cannot find .. sorryDo you really need a blessing to try it?
I did write you to do it like this. where is the problem?
Divide traffic into 4 streams and send first 2 on the first gateway. (use both addresses as separator)Both examples are correct.. so what is the difference?
How can I force one WAN port with 50% and the two others WAN ports with 25%?
tnx
Note that this is not per packet load balancing, so it will not be 50/25/25 all the time. - More connections/clients you will have closer to those numbers you will get.
What is your PCC configuration??? in case of "both-addresses" problems 1. 3. 4. should be out of the picture.Hello staff,
I did some loadbalaced with PCC and in particular the improvements in the rules of the omega-00, took some things that I thought needed to n, and only added the rules of the wiki in the chain INPUT and OUTPUT = NEW STATE CONECTIONS and solved the problem of open the page of the hotspot authentication.
But some other problems appeared as:
1 - It has been reported to the top of youtube videos does not open at first
2 - once the customer is communicated with all the valid IP ranges that the server mikrotik using this loadbalaced to do directly with the PCC balancing the client leaves for internet to communicate with the network itself, but to solve it, just take these bands of IPs that the server mikrotik using this outside of the cache.
3 - When you make a bank transaction for the IP is changed so Desloge bank by the customer think that he is on another machine, so q is doing the same way up, taking the tracks out of the IP cache.
4 - Sometimes the pages of the Internet expires, as it was n the air, and that precionar F5 to return to open.
5 - There is no possibility to use an external proxy for customers who use the internet this loadbalaced.
Balancing out these details it is very good, I believe that the mikrotik will solve the problem soon.
Tiago Matias
What is your PCC configuration??? in case of "both-addresses" problems 1. 3. 4. should be out of the picture.Hello staff,
I did some loadbalaced with PCC and in particular the improvements in the rules of the omega-00, took some things that I thought needed to n, and only added the rules of the wiki in the chain INPUT and OUTPUT = NEW STATE CONECTIONS and solved the problem of open the page of the hotspot authentication.
But some other problems appeared as:
1 - It has been reported to the top of youtube videos does not open at first
2 - once the customer is communicated with all the valid IP ranges that the server mikrotik using this loadbalaced to do directly with the PCC balancing the client leaves for internet to communicate with the network itself, but to solve it, just take these bands of IPs that the server mikrotik using this outside of the cache.
3 - When you make a bank transaction for the IP is changed so Desloge bank by the customer think that he is on another machine, so q is doing the same way up, taking the tracks out of the IP cache.
4 - Sometimes the pages of the Internet expires, as it was n the air, and that precionar F5 to return to open.
5 - There is no possibility to use an external proxy for customers who use the internet this loadbalaced.
Balancing out these details it is very good, I believe that the mikrotik will solve the problem soon.
Tiago Matias
I would also add rule that closest (ISPs) networks will always be routed to a corresponding interface (that should solve 2.)
My interfaces
Interfaces WANs:
ether1, ether2, ether3, ether4, ether5, ether6 and ether7
LAN Interface: ether9-Clientes
My mangle
/ip firewall mangle
add action=accept chain=prerouting comment="out load DST" disabled=no dst-address-list=rede-interna in-interface=ether9-Clientes
add action=mark-connection chain=input comment=ether1_conn connection-state=new disabled=no in-interface=ether1 new-connection-mark=ether1_conn passthrough=yes
add action=mark-connection chain=input comment=ether2_conn connection-state=new disabled=no in-interface=ether2 new-connection-mark=ether2_conn passthrough=yes
add action=mark-connection chain=input comment=ether3_conn connection-state=new disabled=no in-interface=ether3 new-connection-mark=ether3_conn passthrough=yes
add action=mark-connection chain=input comment=ether4_conn connection-state=new disabled=no in-interface=ether4 new-connection-mark=ether4_conn passthrough=yes
add action=mark-connection chain=input comment=ether5_conn connection-state=new disabled=no in-interface=ether5 new-connection-mark=ether5_conn passthrough=yes
add action=mark-connection chain=input comment=ether6_conn connection-state=new disabled=no in-interface=ether6 new-connection-mark=ether6_conn passthrough=yes
add action=mark-connection chain=input comment=ether7_conn connection-state=new disabled=no in-interface=ether7 new-connection-mark=ether7_conn passthrough=yes
add action=mark-routing chain=output comment=to_ether1 connection-mark=ether1_conn connection-state=new disabled=no new-routing-mark=to_ether1 passthrough=no
add action=mark-routing chain=output comment=to_ether2 connection-mark=ether2_conn connection-state=new disabled=no new-routing-mark=to_ether2 passthrough=no
add action=mark-routing chain=output comment=to_ether3 connection-mark=ether3_conn connection-state=new disabled=no new-routing-mark=to_ether3 passthrough=no
add action=mark-routing chain=output comment=to_ether4 connection-mark=ether4_conn connection-state=new disabled=no new-routing-mark=to_ether4 passthrough=no
add action=mark-routing chain=output comment=to_ether5 connection-mark=ether5_conn connection-state=new disabled=no new-routing-mark=to_ether5 passthrough=no
add action=mark-routing chain=output comment=to_ether6 connection-mark=ether6_conn connection-state=new disabled=no new-routing-mark=to_ether6 passthrough=no
add action=mark-routing chain=output comment=to_ether7 connection-mark=ether7_conn connection-state=new disabled=no new-routing-mark=to_ether7 passthrough=no
add action=mark-connection chain=prerouting comment=ether1_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/0
add action=mark-connection chain=prerouting comment=ether2_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether2_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/1
add action=mark-connection chain=prerouting comment=ether3_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether3_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/2
add action=mark-connection chain=prerouting comment=ether4_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether4_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/3
add action=mark-connection chain=prerouting comment=ether5_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether5_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/4
add action=mark-connection chain=prerouting comment=ether6_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether6_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/5
add action=mark-connection chain=prerouting comment=ether7_conn disabled=no dst-address-type=!local in-interface=ether9-Clientes new-connection-mark=ether7_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:7/6
add action=mark-routing chain=prerouting comment=to_ether1 connection-mark=ether1_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether1 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether2 connection-mark=ether2_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether2 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether3 connection-mark=ether3_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether3 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether4 connection-mark=ether4_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether4 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether5 connection-mark=ether5_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether5 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether6 connection-mark=ether6_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether6 passthrough=no
add action=mark-routing chain=prerouting comment=to_ether7 connection-mark=ether7_conn disabled=no in-interface=ether9-Clientes new-routing-mark=to_ether7 passthrough=no
My NAT
/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether3
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether4
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether5
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether6
add action=masquerade chain=srcnat comment="" disabled=no out-interface=ether7
My route
/ip route
add comment=link1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=189.19.x.x scope=30 target-scope=10
add comment=link2 disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=30 target-scope=10
add comment=link1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=189.19.86.1 routing-mark=to_ether1 scope=30 target-scope=10
add comment=link2 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ether2 scope=30 target-scope=10
add comment=link3 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.1.1.1 routing-mark=to_ether3 scope=30 target-scope=10
add comment=link6 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.16.253.253 routing-mark=to_ether6 scope=30 target-scope=10
add comment=link5 disabled=no distance=5 dst-address=0.0.0.0/0 gateway=192.168.5.1 scope=30 target-scope=10
add comment=link3 disabled=no distance=3 dst-address=0.0.0.0/0 gateway=10.1.1.1 scope=30 target-scope=10
add comment=link4 disabled=no distance=4 dst-address=0.0.0.0/0 gateway=200.161.x.x scope=30 target-scope=10
add comment=link6 disabled=no distance=6 dst-address=0.0.0.0/0 gateway=172.16.253.253 scope=30 target-scope=10
add comment=link4 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=200.161.x.x routing-mark=to_ether4 scope=30 target-scope=10
add comment=link5 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.5.1 routing-mark=to_ether5 scope=30 target-scope=10
add comment=link7 disabled=no distance=7 dst-address=0.0.0.0/0 gateway=172.16.254.252 scope=30 target-scope=10
add comment=link7 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.16.254.252 routing-mark=to_ether7 scope=30 target-scope=10
Hello,
I'm using the example posted by: tiagom
my source is 6 gateways adsl and wireless internet each one is (128kbps).
I have setup this on my router and all traffic goes to ether1 only.
there were 25 users online, and all were taking internet from ether1
all my users are connected through ether9-Clients, via PPPOE each one has PPPOE username and password.
my question is:
- how can i get users to use other connections ether2,ether3,ether4... (divide traffic)
- i need to use the full speed of these gateways.
each gateway is (128kbps) so i should get 768kps
thanks
at first, it's not possible to get 768 kbps for single connection- i need to use the full speed of these gateways.
each gateway is (128kbps) so i should get 768kps
still the videos on youtube need to refresh the page to load, but all sites have stopped giving site expiredto tiagom: "both-addresses-and-ports" is the problem. Use "both-addresses"
yes, you should use 'Mangle Output' to redistribute proxy's output between different routing marksIt is possible that coexists web-proxy and pcc balanc. ? ... Previously it was not possible due to the fact that the output of the web-proxy takes one of the like own chains of exit.
that's not about PCC. if you use 'src-dst-address' classifier and address of the server you are connecting to is constant, then you will always go through the same gateway, because the hash function PCC is using is deterministicHow long are the idle connections kept before they're removed from the connection table and it counts as new? (ie. If I have a connection, then walk away for x amount of minutes, come back and refresh and it goes out a different WAN connection due to the first connection expiring - what is x?)
First Thanks for your reply,Hi Muhammad.
not working you mean "not matching"?
Hi, can you post a screeshot of Firewall/Mangle rules?First Thanks for your reply,Hi Muhammad.
not working you mean "not matching"?
not working mean, after using that both scripts my 100% internet traffic going throw WAN1. not 50% on each WAN
i am using PPPoE Server for Clint's on LAN Interface
Thanks for replyHi, can you post a screeshot of Firewall/Mangle rules?First Thanks for your reply,Hi Muhammad.
not working you mean "not matching"?
not working mean, after using that both scripts my 100% internet traffic going throw WAN1. not 50% on each WAN
i am using PPPoE Server for Clint's on LAN Interface
mmm, can you post a shot of Firewall/Connection section?
Thanks for replyAs you can see, Connection Mark is empty!!!!!
If you want, I can access this MT to help you... send me a PM...
/ ip address
add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=Local
add address=192.168.1.99/24 network=192.168.1.0 broadcast=192.168.1.255 interface=adsl1
add address=192.168.10.10/24 network=192.168.10.0 broadcast=192.168.10.255 interface=adsl2
/ ip firewall mangle
add chain=input in-interface=adsl1 action=mark-connection new-connection-mark=adsl1_conn
add chain=input in-interface=adsl2 action=mark-connection new-connection-mark=adsl2_conn
add chain=output connection-mark=adsl1_conn action=mark-routing new-routing-mark=to_adsl1
add chain=output connection-mark=adsl2_conn action=mark-routing new-routing-mark=to_adsl2
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.10.0/24 action=accept in-interface=Local
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=adsl1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=adsl2_conn passthrough=yes
add chain=prerouting connection-mark=adsl1_conn in-interface=Local action=mark-routing new-routing-mark=to_adsl1
add chain=prerouting connection-mark=adsl2_conn in-interface=Local action=mark-routing new-routing-mark=to_adsl2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_adsl1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=to_adsl2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.10.1 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=adsl1 action=masquerade
add chain=srcnat out-interface=adsl2 action=masquerade
i have same problem in RB532 OS-3.28Hello Guys,
I have setup the config in:
http://wiki.mikrotik.com/wiki/PCC#Introduction
My router is: RB433ah
Router Os ver = 3.28
here is what i came with:the problem is:Code: Select all/ ip address add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=Local add address=192.168.1.99/24 network=192.168.1.0 broadcast=192.168.1.255 interface=adsl1 add address=192.168.10.10/24 network=192.168.10.0 broadcast=192.168.10.255 interface=adsl2 / ip firewall mangle add chain=input in-interface=adsl1 action=mark-connection new-connection-mark=adsl1_conn add chain=input in-interface=adsl2 action=mark-connection new-connection-mark=adsl2_conn add chain=output connection-mark=adsl1_conn action=mark-routing new-routing-mark=to_adsl1 add chain=output connection-mark=adsl2_conn action=mark-routing new-routing-mark=to_adsl2 add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local add chain=prerouting dst-address=192.168.10.0/24 action=accept in-interface=Local add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=adsl1_conn passthrough=yes add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=adsl2_conn passthrough=yes add chain=prerouting connection-mark=adsl1_conn in-interface=Local action=mark-routing new-routing-mark=to_adsl1 add chain=prerouting connection-mark=adsl2_conn in-interface=Local action=mark-routing new-routing-mark=to_adsl2 / ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_adsl1 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=to_adsl2 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.10.1 distance=2 check-gateway=ping / ip firewall nat add chain=srcnat out-interface=adsl1 action=masquerade add chain=srcnat out-interface=adsl2 action=masquerade
all traffic goes to adsl1 , not divided to both.
all my clients connect to router via pppoe connection through Local interface.
i check the config several times, but helpless.
from my searches, i notced that all people who test it reported the same bug.
i hope somebody post a fix for it.
thanks for your quick reply.PPPoE server create a interface for each connected client.
It's wrong to set in-interface as physical Ethernet.
You need to match packets by source address or by other via.
/ip route
add check-gateway=arp comment="WAN 3 - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wan3-pppoe routing-mark=wan3
add check-gateway=arp comment="Default Route - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wan1-pppoe
add check-gateway=arp comment="WAN 2 - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wan2-pppoe routing-mark=wan2
add check-gateway=arp comment="WAN 1 - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wan1-pppoe routing-mark=wan1
add check-gateway=arp comment="WAN 1 - Distance 3" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=wan3-pppoe routing-mark=wan1
add check-gateway=arp comment="WAN 2 - Distance 3" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=wan1-pppoe routing-mark=wan2
add check-gateway=arp comment="WAN 1 - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=wan2-pppoe routing-mark=wan1
add check-gateway=arp comment="WAN 2 - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=wan3-pppoe routing-mark=wan2
add check-gateway=arp comment="WAN 3 - Distance 3" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=wan2-pppoe routing-mark=wan3
add check-gateway=arp comment="WAN 3 - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=wan1-pppoe routing-mark=wan3
add check-gateway=arp comment="Default Route - Distance 2" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=wan3-pppoe
add check-gateway=arp comment="Default Route - Distance 3" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=wan2-pppoe
/ip firewall mangle
add action=mark-connection chain=input comment="Mark new inbound connection wan1" connection-state=new disabled=no in-interface=wan1-pppoe new-connection-mark=wan1 \
passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection wan2" connection-state=new disabled=no in-interface=wan2-pppoe new-connection-mark=wan2 \
passthrough=yes
add action=mark-connection chain=input comment="Mark new inbound connection wan3" connection-state=new disabled=no in-interface=wan3-pppoe new-connection-mark=wan3 \
passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan1" connection-state=established disabled=no in-interface=wan1-pppoe \
new-connection-mark=wan1 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan2" connection-state=established disabled=no in-interface=wan2-pppoe \
new-connection-mark=wan2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark established inbound connection wan3" connection-state=established disabled=no in-interface=wan3-pppoe \
new-connection-mark=wan3 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan1" connection-state=related disabled=no in-interface=wan1-pppoe \
new-connection-mark=wan2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan2" connection-state=related disabled=no in-interface=wan2-pppoe \
new-connection-mark=wan2 passthrough=yes
add action=mark-connection chain=prerouting comment="Mark related inbound connection wan3" connection-state=related disabled=no in-interface=wan3-pppoe \
new-connection-mark=wan3 passthrough=yes
add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan1 disabled=no new-routing-mark=wan1 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan2 disabled=no new-routing-mark=wan2 passthrough=no
add action=mark-routing chain=output comment="Mark new inbound route wan3" connection-mark=wan3 disabled=no new-routing-mark=wan3 passthrough=no
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=new disabled=no \
dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=new disabled=no \
dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=new disabled=no \
dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/2
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=\
established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=\
both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=\
established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=\
both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=\
established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=\
both-addresses:3/2
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=related \
disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/0
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=related \
disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=related \
disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/2
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark - option 1" connection-mark=wan1_pcc_conn disabled=no new-routing-mark=wan1 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=wan2 passthrough=\
yes
add action=mark-routing chain=prerouting comment="Mark routing for PCC mark - option 3" connection-mark=wan3_pcc_conn disabled=no new-routing-mark=wan3 passthrough=\
yes
/ip route
add check-gateway=arp comment="Default Route - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1
add check-gateway=arp comment="Default Route - Distance 3" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.10.1
add check-gateway=arp comment="WAN 1 - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=wan1
add check-gateway=arp comment="WAN 1 - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=wan1
add check-gateway=arp comment="WAN 2 - Distance 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=wan2
add check-gateway=arp comment="WAN 2 - Distance 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=wan2
/ip firewall mangle
add action=mark-connection chain=input connection-state=new disabled=no in-interface=adsl1 new-connection-mark=wan1 passthrough=yes comment="Mark new inbound connection wan1"
add action=mark-connection chain=input connection-state=new disabled=no in-interface=adsl2 new-connection-mark=wan2 passthrough=yes comment="Mark new inbound connection wan2"
add action=mark-connection chain=prerouting connection-state=established disabled=no in-interface=adsl1 new-connection-mark=wan1 passthrough=yes comment="Mark established inbound connection wan1"
add action=mark-connection chain=prerouting connection-state=established disabled=no in-interface=adsl2 new-connection-mark=wan2 passthrough=yes comment="Mark established inbound connection wan2"
add action=mark-connection chain=prerouting connection-state=related disabled=no in-interface=adsl1 new-connection-mark=wan2 passthrough=yes comment="Mark related inbound connection wan1"
add action=mark-connection chain=prerouting connection-state=related disabled=no in-interface=adsl2 new-connection-mark=wan2 passthrough=yes comment="Mark related inbound connection wan2"
add action=mark-routing chain=output connection-mark=wan1 disabled=no new-routing-mark=wan1 passthrough=no comment="Mark new inbound route wan1"
add action=mark-routing chain=output connection-mark=wan2 disabled=no new-routing-mark=wan2 passthrough=no comment="Mark new inbound route wan2"
add action=mark-connection chain=prerouting connection-state=new disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0 comment="Mark traffic that isn't local with PCC mark rand (2 possibilities) - option 1"
add action=mark-connection chain=prerouting connection-state=new disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1 comment="Mark traffic that isn't local with PCC mark rand (2 possibilities) - option 2"
add action=mark-connection chain=prerouting connection-state=established disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0 comment="Mark established traffic that isn't local with PCC mark rand (2 possibilities) - option 1"
add action=mark-connection chain=prerouting connection-state=established disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1 comment="Mark established traffic that isn't local with PCC mark rand (2 possibilities) - option 2"
add action=mark-connection chain=prerouting connection-state=related disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/0 comment="Mark related traffic that isn't local with PCC mark rand (2 possibilities) - option 1"
add action=mark-connection chain=prerouting connection-state=related disabled=no dst-address-type=!local in-interface=Local new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:2/1 comment="Mark related traffic that isn't local with PCC mark rand (2 possibilities) - option 2"
add action=mark-routing chain=prerouting connection-mark=wan1_pcc_conn disabled=no new-routing-mark=wan1 passthrough=yes comment="Mark routing for PCC mark - option 1"
add action=mark-routing chain=prerouting connection-mark=wan2_pcc_conn disabled=no new-routing-mark=wan2 passthrough=yes comment="Mark routing for PCC mark - option 2"
thanks for the reply.maaking2: Not entirely sure, although you mentioned your connections are PPPoE connections in this router? If that is correct then would the users actually pass via the local interface or each via is own pppoe interface?
.
Haha, indeed. Sometimes all it takes is another set of eyesto maaking2 - in first picture you can clearly see - problematic interface don't have ready flag, so maybe you need to plug Ethernet cable first
to maaking2 - in first picture you can clearly see - problematic interface don't have ready flag, so maybe you need to plug Ethernet cable first
I think so yes. Because Mohammad reported problem was back after a few minutes so we don't really know what caused it. We thought it was fixed by that accept rule but .. no. I'm waiting waiting for him to contact me to bring the config to a complete working state with proxy.
The DNS problem was that the router tried to connect to ADSL1 IP through ADSL2 gateway therefore breaking DNS...Chat programs rarely depend on a working DNS. Maybe the DNS settings were not correct ... hence the web sites not opening.
0 ;;; Mark new inbound connection Telefonica1
chain=input action=mark-connection new-connection-mark=Telefonica1 passthrough=yes
connection-state=new in-interface=Telefonica1
1 ;;; Mark new inbound connection Telefonica2
chain=input action=mark-connection new-connection-mark=Telefonica2 passthrough=yes
connection-state=new in-interface=Telefonica2
2 ;;; Mark new inbound route Telefonica1
chain=output action=mark-routing new-routing-mark=Telefonica1 passthrough=no
connection-state=new connection-mark=Telefonica1
3 ;;; Mark new inbound route Telefonica2
chain=output action=mark-routing new-routing-mark=Telefonica2 passthrough=no
connection-state=new connection-mark=Telefonica2
4 ;;; Mark new established connection Telefonica1
chain=prerouting action=mark-connection new-connection-mark=Telefonica1
passthrough=yes connection-state=established in-interface=Telefonica1
5 ;;; Mark new established connection Telefonica2
chain=prerouting action=mark-connection new-connection-mark=Telefonica2
passthrough=yes connection-state=established in-interface=Telefonica2
6 ;;; Mark new established route Telefonica1
chain=output action=mark-routing new-routing-mark=Telefonica1 passthrough=no
connection-state=established connection-mark=Telefonica1
7 ;;; Mark new established route Telefonica2
chain=output action=mark-routing new-routing-mark=Telefonica2 passthrough=no
connection-state=established connection-mark=Telefonica2
8 chain=prerouting action=mark-connection new-connection-mark=Telefonica1_pcc_conn
passthrough=yes dst-address-type=!local in-interface=ether2
per-connection-classifier=src-address-and-port:2/0
9 chain=prerouting action=mark-connection new-connection-mark=Telefonica2_pcc_conn
passthrough=yes dst-address-type=!local in-interface=ether2
per-connection-classifier=src-address-and-port:2/1
10 chain=prerouting action=mark-routing new-routing-mark=Telefonica1 passthrough=yes
in-interface=ether2 connection-mark=Telefonica1_pcc_conn
11 chain=prerouting action=mark-routing new-routing-mark=Telefonica2 passthrough=yes
in-interface=ether2 connection-mark=Telefonica2_pcc_conn
Make a rule to mark HTTPS traffic and redirige it to unique connectivity.
Make a rule to mark HTTPS traffic and redirige it to unique connectivity.
Is this the only solution? and if so, can you explain a bit further and possible give a script example. Whenever i try and make my own rules they never seem to work.
Thank you !!
...
add action=mark-connection chain=prerouting comment=HTTPS_to_ADSL1 connection-state=new disabled=no dst-port=443 in-interface=\
ether1 new-connection-mark=https passthrough=yes protocol=tcp src-address=xxx.xxx.xxx.xxx/xx src-port=1025-65535
add action=mark-routing chain=prerouting comment="" connection-mark=https disabled=no in-interface=ether1 new-routing-mark=ADSL1 passthrough=no
...
sorry to be a pain, but how do I go about that? You'll have to assume i'm a complete idiot to be on the safe side.If you're breaking the logins due to PCC outbound balancing why not just use the both-addresses option to force connections to continue out the same connection for same IP?
If you do it for everything but https aren't you going to need further workarounds to deal with the "uh oh adsl1 is offline" issue?
bahah sorry I was replying to his without having read yoursomega-00, thanks for describing my answer in detail
Thanks for your help. all seems to be working much better now.If you're breaking the logins due to PCC outbound balancing why not just use the both-addresses option to force connections to continue out the same connection for same IP?
If you do it for everything but https aren't you going to need further workarounds to deal with the "uh oh adsl1 is offline" issue?
0 ;;; Mark new inbound connection Telefonica1
chain=input action=mark-connection new-connection-mark=Telefonica1
passthrough=yes connection-state=new in-interface=Telefonica1
1 ;;; Mark new inbound connection Telefonica2
chain=input action=mark-connection new-connection-mark=Telefonica2
passthrough=yes connection-state=new in-interface=Telefonica2
2 ;;; Mark new inbound route Telefonica1
chain=output action=mark-routing new-routing-mark=Telefonica1
passthrough=no connection-state=new connection-mark=Telefonica1
3 ;;; Mark new inbound route Telefonica2
chain=output action=mark-routing new-routing-mark=Telefonica2
passthrough=no connection-state=new connection-mark=Telefonica2
4 ;;; Mark new established connection Telefonica1
chain=prerouting action=mark-connection new-connection-mark=Telefonica1
passthrough=yes connection-state=established in-interface=Telefonica1
5 ;;; Mark new established connection Telefonica2
chain=prerouting action=mark-connection new-connection-mark=Telefonica2
passthrough=yes connection-state=established in-interface=Telefonica2
6 ;;; Mark new established route Telefonica1
chain=output action=mark-routing new-routing-mark=Telefonica1
passthrough=no connection-state=established connection-mark=Telefonica1
7 ;;; Mark new established route Telefonica2
chain=output action=mark-routing new-routing-mark=Telefonica2
passthrough=no connection-state=established connection-mark=Telefonica2
8 chain=prerouting action=mark-connection
new-connection-mark=Telefonica1_pcc_conn passthrough=yes
dst-address-type=!local in-interface=ether2
per-connection-classifier=both-addresses:2/0
9 chain=prerouting action=mark-connection
new-connection-mark=Telefonica2_pcc_conn passthrough=yes
dst-address-type=!local in-interface=ether2
per-connection-classifier=both-addresses:2/1
10 chain=prerouting action=mark-routing new-routing-mark=Telefonica1
passthrough=yes in-interface=ether2 connection-mark=Telefonica1_pcc_conn
11 chain=prerouting action=mark-routing new-routing-mark=Telefonica2
passthrough=yes in-interface=ether2 connection-mark=Telefonica2_pcc_conn
0 X ;;; place hotspot rules here
chain=unused-hs-chain action=passthrough
1 chain=srcnat action=masquerade src-address=192.168.88.0/24
out-interface=Telefonica1
2 chain=srcnat action=masquerade src-address=192.168.88.0/24
out-interface=Telefonica2
3 X ;;; Transparent Web Proxy
chain=dstnat action=redirect to-ports=8080 protocol=tcp
in-interface=ether2 dst-port=80
chain=output action=mark-routing
new-routing-mark=Telefonica1
dst-address=!your_LAN_addresses
per-connection-classifier=both-addresses:2/0
chain=output action=mark-routing
new-routing-mark=Telefonica2
dst-address=!your_LAN_addresses
per-connection-classifier=both-addresses:2/1
add two more rules to your Mangle:
Code: Select allchain=output action=mark-routing new-routing-mark=Telefonica1 dst-address=!your_LAN_addresses per-connection-classifier=both-addresses:2/0 chain=output action=mark-routing new-routing-mark=Telefonica2 dst-address=!your_LAN_addresses per-connection-classifier=both-addresses:2/1
When i add these rules to the mangle, my clients seem to lose all conection to the internet, and I also loose communication with my radius server, which is on my local network..??add two more rules to your Mangle:
chain=output action=mark-routing
new-routing-mark=Telefonica1
dst-address=192.168.88.0/24
per-connection-classifier=both-addresses:2/0
chain=output action=mark-routing
new-routing-mark=Telefonica2
dst-address=192.168.88.0/24
per-connection-classifier=both-addresses:2/1
dst-address=!192.168.88.0/24
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.1.1/24 192.168.1.0 192.168.1.255 LOCAL
1 21*.13.82.58/29 21*.13.82.56 21*.13.82.63 WAN2
2 *78.157.13.39/24 *78.157.13.0 *78.157.13.255 WAN3
3 D*77.28.18.50/32 *77.28.0.1 0.0.0.0 WAN1
mangle
1 chain=input action=mark-connection new-connection-mark=WAN1_conn passthrough=yes in-interface=WAN1
2 chain=input action=mark-connection new-connection-mark=WAN2_conn passthrough=yes in-interface=WAN2
3 chain=input action=mark-connection new-connection-mark=WAN3_conn passthrough=yes in-interface=WAN3
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=prerouting action=accept dst-address=21*.13.64.0/19 in-interface=LOCAL
8 chain=prerouting action=accept dst-address=*78.157.13.0/24 in-interface=LOCAL
9 chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local in-interface=LOCAL per-connection-classifier=both-addresses:3/0
10 chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local in-interface=LOCAL per-connection-classifier=both-addresses:3/1
11 chain=prerouting action=mark-connection new-connection-mark=WAN3_conn passthrough=yes dst-address-type=!local in-interface=LOCAL per-connection-classifier=both-addresses:3/2
12 chain=prerouting action=mark-routing new-routing-mark=to_WAN1 passthrough=yes in-interface=LOCAL connection-mark=WAN1_conn
13 chain=prerouting action=mark-routing new-routing-mark=to_WAN2 passthrough=yes in-interface=LOCAL connection-mark=WAN2_conn
14 chain=prerouting action=mark-routing new-routing-mark=to_WAN3 passthrough=yes in-interface=LOCAL connection-mark=WAN3_conn
NAT
0 chain=srcnat action=masquerade out-interface=WAN1
1 chain=srcnat action=masquerade out-interface=WAN2
2 chain=srcnat action=masquerade out-interface=WAN3
Route
#DST-ADDRESS PREF-SRC GATEWAY-STATE GATEWAY DISTANCE INTERFACE
0 AS 0.0.0.0/0 reachable 21*.13.82.57 1 WAN2
1 S 0.0.0.0/0 unreachable *78.157.13.1 1 WAN3
2 AS 0.0.0.0/0 reachable *77.28.0.1 1 WAN1
3 AS 0.0.0.0/0 reachable 21*.13.82.57 1 WAN2
4 S 0.0.0.0/0 unreachable *78.157.13.1 3 WAN3
5 S 0.0.0.0/0 reachable *77.28.0.1 2 WAN1
6 ADC *77.28.0.1/32 *77.28.18.50 0 WAN1
7 ADC *78.157.13.0/24 *78.157.13.39 0 WAN3
8 ADC 192.168.1.0/24 192.168.1.1 0 LOCAL
9 ADC 21*.13.82.56/29 21*.13.82.58 0 WAN2
/ip route export
but I think you need to assign routing-marks to your routes...Code: Select all/ip route export
nope, cannot ping nothing... If I run traceroute with connection mark wan1 or wan2 to some address it is ok, but if I run with connection mark wan3 the route goes trough backup wan2.can you ping *78.157.13.1?.. route #4 should be inactive, it's backup
tnx but that does not solve the problem, I set up gateway interface WAN3 without gateway IP and now trafic start to flow..maybe, you should change 'check-gateway=ping' to 'check-gateway=arp' or even remove this check?
18 ;;; routing mark for http
chain=prerouting action=mark-routing new-routing-mark=http
passthrough=yes protocol=tcp dst-port=80
19 ;;; routing mark for http-local
chain=prerouting action=mark-routing new-routing-mark=http-local
passthrough=no protocol=tcp dst-address-list=sa_ip dst-port=80
The answer to this can be found right here in this thread. Page 2, under one of Chupaka's posts.Hi,
Can we use PCC with Web-Proxy?
Thanks for replyThe answer to this can be found right here in this thread. Page 2, under one of Chupaka's posts.Hi,
Can we use PCC with Web-Proxy?
/ip firewall mangle
add chain=output per-connection-classifier=dst-address:2/0 action=mark-routing new-routing-mark=table1 disabled=no
add chain=output per-connection-classifier=dst-address:2/1 action=mark-routing new-routing-mark=table2 disabled=no
Thanks Chupakawith my eyes shut:
Code: Select all/ip firewall mangle add chain=output per-connection-classifier=dst-address:2/0 action=mark-routing new-routing-mark=table1 disabled=no add chain=output per-connection-classifier=dst-address:2/1 action=mark-routing new-routing-mark=table2 disabled=no
Thanks NetworkProWith my eyes very very widely open!!! http://forum.mikrotik.com/viewtopic.php ... 72#p169172 (complete config with a little comments that may explain it, or may confuse you LOL )
Thanks for replyin ROS v3 I use IP-> Firewall->Address List to manage groups of IP addresses for use with Manlge, NAT and Firewall. PPP can add the IPs of the clients to an address list automatically. This kind of stuff is explained in the manual and wiki
[admin@MikroTik] > tool traceroute ya.ru max-hops=4
ADDRESS STATUS
1 192.168.16.250 2ms 2ms 10ms
2 192.168.0.200 9ms 10ms 12ms
3 192.168.0.200 6ms 11ms 10ms network unreachable
4 192.168.0.200 14ms 6ms 53ms network unreachable
max-hops reached
[admin@MikroTik] > /ip route add disabled=no dst-address=0.0.0.0/0 gateway=192.168.16.141 routing-mark=preved
[admin@MikroTik] > /ip firewall mangle add chain=output action=mark-routing new-routing-mark=preved
[admin@MikroTik] > tool traceroute ya.ru max-hops=4
ADDRESS STATUS
1 192.168.16.141 5ms 7ms 10ms
2 192.168.16.250 11ms 9ms 1ms
3 192.168.0.200 6ms 7ms 5ms
4 192.168.0.200 4ms 19ms 11ms network unreachable
max-hops reached
[admin@MikroTik] >
some guy told me to change those lines :/ ip address
add address=10.5.50.1/24 network=10.5.50.0 broadcast=10.5.50.255 interface=Local
add address=192.168.1.5/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.0.5/24 network=192.168.0.0 broadcast=192.168.0.255 interface=WAN2
/ 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=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=WAN2
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=WAN2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-mark=WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.1 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
to those one :add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
but i got another problem , clients log in but they use only one line .add chain=prerouting dst-address-type=!local hotspot=auth in-interface=Local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local hotspot=auth in-interface=Local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
The dst-address fields that I made blue, they look like public IP addresses of the PPPoE accounts, and they look like they would be static, what would I need to do if my Public IP's were Dynamic? Is there a way around this or do I have to use a script to find my public addresses and add them into the dst-address fields. I really would rather not try to mess around with a script if I don't have to./ip firewall mangle
add action=accept chain=prerouting comment="" disabled=no dst-address=10.2.0.0/30 in-interface=ether6
add action=accept chain=prerouting comment="" disabled=no dst-address=83.71.aaa.aaa in-interface=ether6
add action=accept chain=prerouting comment="" disabled=no dst-address=82.141.bbb.bbb in-interface=ether6
add action=accept chain=prerouting comment="" disabled=no dst-address=82.141.ccc.ccc in-interface=ether6
add action=accept chain=prerouting comment="" disabled=no dst-address=82.141.ddd.ddd in-interface=ether6
I just substituted the 10.111.0.0/24 with my public IP address range and removed the other one...Then we will assign proper routing-mark to the packets leaving the router.
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=10.112.0.0/24 action=accept in-interface=Local
all I can say for now (taking into account that it works on your machine and isn't working on another one ("+ some others")), try to clear browser's cache and remove saved cookies... maybe try another web-browserIt's a 2 step authentication, first account number and pin, it accepts, then you have to fill in the missing letters of your passphrase. You receive a text message "confirmation of internet banking" if you set it up, then after you fill in the blanks and click on logon it returns you to the first page where you have to enter your account number and pin with a caption reading: "you have successfully logged out".
hmmm... I don't see any of it in your config... am I too tired?..By the way I am splitting local and international routes and the banking site's IP is in the Local routing table.
I tried using the wiki way of assigning the routes e.g gateway1 distance=1 gateway2 distance=2 ..3-3 ..4-4 but that only utilized gateway1 100% and didn't loadbalance at all, it made GW2-3-4 blue in gui (disabled). Thats the reason for rule 4 with multiple interfaces and rule 5-8 being disabled.[admin@RB493 Master] > ip route print
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 inter1 1 (Routing mark to_inter1)
1 A S 0.0.0.0/0 inter2 1 (Routing mark to_inter2)
2 A S 0.0.0.0/0 inter3 1 (Routing mark to_inter3)
3 A S 0.0.0.0/0 inter4 1 (Routing mark to_inter4)
4 A S 0.0.0.0/0 inter1 1
inter2
inter3
inter4
5 X S ;;; Default Route old
0.0.0.0/0 inter1 1
6 X S 0.0.0.0/0 inter2 2
7 X S 0.0.0.0/0 inter3 3
8 X S 0.0.0.0/0 inter4 4
9 A S 17.255.248.0/23 Local-PPPoE 2
10 A S 32.106.152.0/24 Local-PPPoE 2
11 A S 32.106.153.0/24 Local-PPPoE 2
12 A S 32.107.9.0/24 Local-PPPoE 2
13 A S 32.238.152.0/24 Local-PPPoE 2
14 A S 32.238.153.0/24 Local-PPPoE 2
15 A S 32.239.182.0/24 Local-PPPoE 2
16 A S 41.0.0.0/16 Local-PPPoE 2
17 A S 41.0.5.0/24 Local-PPPoE 2
18 A S 41.0.6.0/24 Local-PPPoE 2
routes: instead of making distance 1,2,3,4 I made them all 1 -rule4 /
and this line
add action=accept chain=prerouting comment="" disabled=no dst-address=41.240.0.0/13 in-interface=LocalLAN
which I adopted from another config.
for what goal? PCC is just classifier - it can classify packets =)Is it possible to use pcc with only one interface?
Can you post your mangle rules set and route list?FYI, noticing on a couple of sites I've been testing with 4.2 that the mangle rules don't seem to be working the same as before.
I'm yet to determine what is causing the issue but it's not balancing the links very well at all right now.
Has only changed to this since I upgraded to 4.2 (31 days ago)
Will be rolling back to check differences shortly.
/ip route add gateway=ISP1_gateway
/ip firewall nat add chain=srcnat <condition for satellite packets> action=src-nat to-addresses=79.141.89.xx/28
you cannot use that GW. satellite link is unidirectionalwhile If I use the gateway 79.141.17.xx
Code: Select all[admin@MikroTik] > tool traceroute ya.ru max-hops=4 ADDRESS STATUS 1 192.168.16.250 2ms 2ms 10ms 2 192.168.0.200 9ms 10ms 12ms 3 192.168.0.200 6ms 11ms 10ms network unreachable 4 192.168.0.200 14ms 6ms 53ms network unreachable max-hops reached [admin@MikroTik] > /ip route add disabled=no dst-address=0.0.0.0/0 gateway=192.168.16.141 routing-mark=preved [admin@MikroTik] > /ip firewall mangle add chain=output action=mark-routing new-routing-mark=preved [admin@MikroTik] > tool traceroute ya.ru max-hops=4 ADDRESS STATUS 1 192.168.16.141 5ms 7ms 10ms 2 192.168.16.250 11ms 9ms 1ms 3 192.168.0.200 6ms 7ms 5ms 4 192.168.0.200 4ms 19ms 11ms network unreachable max-hops reached [admin@MikroTik] >
/ip route rule add routing-mark=to_ISP1 action=lookup-only-in-table table=to_ISP1
/ping google.com routing-table=to_ISP1
no, 'action=lookup' will continue searching in 'main' table in case of failure. install 'routing-test' package for 3.30if i can use action=lookup ? because i´m using 3.30 and not 4.x OS. thanks
thanks =)Cool config, Chupaka
well, I'm still using v3.27 on Internet router =) v4 is only on core routers. just waiting for a moment to update internet and border routers to v4 ))if you are using 4.x with the loadbalancing? Because I'm having a lot of trouble with 4.x and I'm downgrading today to 3.30 Until I can get everything sorted out.
sorry, I'm not familiar with Hotspot. try simply dst-nat all port 80 requests to your Hotspot... 'man iptables' =)
ok the test works perfect when i use the ping comand in terminal, but with the packet marks in output mangle doesnt work, i will make an script to replace the netwatch. thanks a lotfirst, you should limit route lookup to the routes with that packet-mark:now your default route from 'main' table won't work for packets with 'to_ISP1' markCode: Select all/ip route rule add routing-mark=to_ISP1 action=lookup-only-in-table table=to_ISP1
then you can simply use 'ping' command via that routing table:
Code: Select all/ping google.com routing-table=to_ISP1
/ip firewall mangle
add action=mark-connection chain=input comment="Mark Incoming (to router itself) connections so their reply packets get routed to the interface the connections came in" connection-state=new \
disabled=no in-interface=pppoe-out1 new-connection-mark=adsl1_conn passthrough=yes
add action=mark-connection chain=input comment="" connection-state=new disabled=no in-interface=pppoe-out2 new-connection-mark=adsl2_conn passthrough=yes
add action=accept chain=output comment="Prevent Outgoing connections to clients' IP addresses from being mangled and routed by PCC" disabled=no dst-address-list=clients
add action=accept chain=output comment="" disabled=no dst-address=172.16.4.0/22
add action=mark-connection chain=output comment="Mark outgoing from router connections w PCC by dst-address for proxy (and everything from router) balancing" connection-state=new disabled=no \
dst-address-type=!local new-connection-mark=adsl1_conn passthrough=yes per-connection-classifier=dst-address:2/0
add action=mark-connection chain=output comment="" connection-state=new disabled=no dst-address-type=!local new-connection-mark=adsl2_conn passthrough=yes per-connection-classifier=dst-address:2/1
add action=mark-routing chain=output comment="" connection-mark=adsl1_conn disabled=no new-routing-mark=to_adsl1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=adsl2_conn disabled=no new-routing-mark=to_adsl2 passthrough=yes
add action=accept chain=prerouting comment="" disabled=no dst-address-list=clients src-address-list=clients
add action=mark-connection chain=prerouting comment="Mark connections from clients ip addresses w PCC balance before they get routed so they can be assigned routing rules later and get routed" \
connection-state=new disabled=no dst-address-type=!local new-connection-mark=adsl1_conn passthrough=yes per-connection-classifier=both-addresses:2/0 src-address-list=clients
add action=mark-connection chain=prerouting comment="" connection-state=new disabled=no dst-address-type=!local new-connection-mark=adsl2_conn passthrough=yes per-connection-classifier=\
both-addresses:2/1 src-address-list=clients
add action=mark-routing chain=prerouting comment="" connection-mark=adsl1_conn disabled=no new-routing-mark=to_adsl1 passthrough=yes src-address-list=clients
add action=mark-routing chain=prerouting comment="" connection-mark=adsl2_conn disabled=no new-routing-mark=to_adsl2 passthrough=yes src-address-list=clients
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=pppoe-out1
add action=masquerade chain=srcnat disabled=no out-interface=pppoe-out2
/ip route
add check-gateway=ping distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=30 target-scope=10
add check-gateway=ping distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_ADSL1 scope=30 target-scope=10
add check-gateway=ping distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_ADSL2 scope=30 target-scope=10
add check-gateway=ping distance=3 dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=30 target-scope=10
/ ip firewall mangle
add chain=input action=mark-connection new-connection-mark=wan1_conn passthrough=yes in-interface=pppoe-out1
add chain=input action=mark-connection new-connection-mark=wan2_conn passthrough=yes in-interface=pppoe-out2
add chain=prerouting action=mark-connection new-connection-mark=wan1_conn passthrough=yes src-address=172.16.4.0/22 dst-address-type=!local per-connection-classifier=both-addresses:2/0
add chain=prerouting action=mark-connection new-connection-mark=wan2_conn passthrough=yes src-address=172.16.4.0/22 dst-address-type=!local per-connection-classifier=both-addresses:2/1
add chain=output action=mark-routing new-routing-mark=to_wan1 passthrough=yes connection-mark=wan1_conn
add chain=output action=mark-routing new-routing-mark=to_wan2 passthrough=yes connection-mark=wan2_conn
add chain=prerouting action=mark-routing new-routing-mark=to_wan1 passthrough=yes src-address=172.16.4.0/22 connection-mark=wan1_conn
add chain=prerouting action=mark-routing new-routing-mark=to_wan2 passthrough=yes src-address=172.16.4.0/22 connection-mark=wan2_conn
/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
sorry for no answer... dssmiktik, yes, 'accept' should be used in the setup from Wiki... (by the way, 10.100.0.0/24 are internal addresses, not public IPs )
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=10.112.0.0/24 action=accept in-interface=Local
i was affraid about that answer, i dont know much about scripting, i just imagine an script to change dynamic 20 rules for 10 wan (10 for mar connection + 10 to mark routing) and i want to cry...@lukkes, the script to distribute the load can be achieved with simple scripting and with more complex to do it in a more precise way so ... its the scripting that will help as usual.
Sorry Chupaka, i cant understand your point... also can you see this post for me? it's another topic, but i don't know how to talk with you directly, and thanks for your help...simply add backup default routes (with bigger distances) to each routing table
/ip route add dst-address=0.0.0.0/0 gateway=gw1 routing-mark=to_gw1
/ip route add dst-address=0.0.0.0/0 gateway=gw2 routing-mark=to_gw1 distance=10
/ip route add dst-address=0.0.0.0/0 gateway=gw3 routing-mark=to_gw1 distance=10
/ip route add dst-address=0.0.0.0/0 gateway=gw4 routing-mark=to_gw1 distance=20
for example, you havethen addCode: Select all/ip route add dst-address=0.0.0.0/0 gateway=gw1 routing-mark=to_gw1
so now, if gw1 will be down, all traffic with that routing mark will be directed to gw2, gw3 or gw4 (with gw4 having the lowest priority)Code: Select all/ip route add dst-address=0.0.0.0/0 gateway=gw2 routing-mark=to_gw1 distance=10 /ip route add dst-address=0.0.0.0/0 gateway=gw3 routing-mark=to_gw1 distance=10 /ip route add dst-address=0.0.0.0/0 gateway=gw4 routing-mark=to_gw1 distance=20
Hi again, i need you professional helpwith my eyes shut:
Code: Select all/ip firewall mangle add chain=output per-connection-classifier=dst-address:2/0 action=mark-routing new-routing-mark=table1 disabled=no add chain=output per-connection-classifier=dst-address:2/1 action=mark-routing new-routing-mark=table2 disabled=no
In this case is wan1 and wan2this setup is for wan1 and wan2. how do you use it with three lines? %)
and... do you use web-proxy?
/ip firewall mangle
add action=mark-connection chain=input comment=pcc disabled=no in-interface=x.x.x.72/29 new-connection-mark=72/29_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=x.x.x.217/29 new-connection-mark=217/29_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=x.x.x.81/29 new-connection-mark=81/29_conn passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=72/29_conn disabled=no new-routing-mark=to_72/29 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=217/29_conn disabled=no new-routing-mark=to_217/29 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=81/29_conn disabled=no new-routing-mark=to_81/29 passthrough=yes
add action=accept chain=prerouting comment="" disabled=no dst-address=x.x.x.72/29 in-interface=radius_dmz
add action=accept chain=prerouting comment="" disabled=no dst-address=x.x.x.216/29 in-interface=radius_dmz
add action=accept chain=prerouting comment="" disabled=no dst-address=x.x.x.80/29 in-interface=radius_dmz
add action=accept chain=input comment="" disabled=no dst-address=x.x.x.x in-interface=radius_dmz
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=radius_dmz new-connection-mark=72/29_conn passthrough=yes \
per-connection-classifier=src-address:3/0
add action=mark-routing chain=prerouting comment="" connection-mark=72/29_conn disabled=no in-interface=radius_dmz new-routing-mark=to_72/29 passthrough=no
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=radius_dmz new-connection-mark=217/29_conn passthrough=yes \
per-connection-classifier=src-address:3/1
add action=mark-routing chain=prerouting comment="" connection-mark=217/29_conn disabled=no in-interface=radius_dmz new-routing-mark=to_217/29 passthrough=no
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface=radius_dmz new-connection-mark=81/29_conn passthrough=yes \
per-connection-classifier=src-address:3/2
add action=mark-routing chain=prerouting comment="" connection-mark=81/29_conn disabled=no in-interface=radius_dmz new-routing-mark=to_81/29 passthrough=no
ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=x.x.x.81 routing-mark=to_81/29 scope=30 target-scope=10
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=x.x.x.73 routing-mark=to_72/29 scope=30 target-scope=10
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=x.x.x.217 routing-mark=to_217/29 scope=30 target-scope=10
/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 comment="" \
dial-on-demand=no disabled=no interface=ADSL max-mru=1480 max-mtu=1480 \
mrru=disabled name=WAN1 password=xxxxxxx profile=default \
service-name="" use-peer-dns=no user=xxxxxx
/ ip address
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=LAN
add address=x.x.82.58/29 network=x.x.82.56 broadcast=x.x.x.63 interface=WAN2
add address=x.x.13.39/24 network=x.x.13.0 broadcast=x.x.13.255 interface=WAN3
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4,4.2.2.2
/ 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=wan2_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=x.x.82.58/29 action=accept in-interface=LAN
add chain=prerouting dst-address=x.x.13.39/24 action=accept in-interface=LAN
add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses:3/0 \
action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses:3/1 \
action=mark-connection new-connection-mark=wan2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses:3/2 \
action=mark-connection new-connection-mark=wan3_conn passthrough=yes
add chain=prerouting connection-mark=wan1_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan2_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan3
/ ip route
add dst-address=0.0.0.0/0 gateway=x.x.0.1 routing-mark=to_wan1 check-gateway=arp
add dst-address=0.0.0.0/0 gateway=x.x.82.57 routing-mark=to_wan2 check-gateway=arp
add dst-address=0.0.0.0/0 gateway=x.x.13.1 routing-mark=to_wan3 check-gateway=arp
add dst-address=0.0.0.0/0 gateway=x.x.0.1 distance=1 check-gateway=arp
add dst-address=0.0.0.0/0 gateway=x.x.82.57 distance=2 check-gateway=arp
add dst-address=0.0.0.0/0 gateway=x.x.13.1 distance=3 check-gateway=arp
/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade
add chain=srcnat out-interface=wan3 action=masquerade
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=80 \
in-interface=WAN1 protocol=tcp to-addresses=192.168.1.15 to-ports=80
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=80 \
in-interface=WAN2 protocol=tcp to-addresses=192.168.1.15 to-ports=80
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=80 \
in-interface=WAN3 protocol=tcp to-addresses=192.168.1.15 to-ports=80
/ 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=wan2_conn
/ ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=wan1_conn passthrough=no
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=wan2_conn passthrough=no
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=wan2_conn passthrough=no
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=wan2_conn
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=wan3_conn
add chain=prerouting connection-mark=wan2_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan2_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan3
add chain=prerouting connection-mark=wan2_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=LAN action=mark-routing new-routing-mark=to_wan3
/ ip firewall mangle
add chain=forward in-interface=WAN1 connection-mark=no-mark action=mark-connection new-connection-mark=wan1_conn
add chain=forward in-interface=WAN2 connection-mark=no-mark action=mark-connection new-connection-mark=wan2_conn
add chain=forward in-interface=WAN3 connection-mark=no-mark action=mark-connection new-connection-mark=wan3_conn
/ ip firewall mangle
add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/0 \
action=mark-connection new-connection-mark=wan1_conn passthrough=no
add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/1 \
action=mark-connection new-connection-mark=wan2_conn passthrough=no
add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/2 \
action=mark-connection new-connection-mark=wan3_conn passthrough=no
As I said, I think the issue is that new incoming connections are not bound to WAN interface they came on. Code below attempts to fix that (untested):
replace per-connection-classifier rules with:Code: Select all/ ip firewall mangle add chain=forward in-interface=WAN1 connection-mark=no-mark action=mark-connection new-connection-mark=wan1_conn add chain=forward in-interface=WAN2 connection-mark=no-mark action=mark-connection new-connection-mark=wan2_conn add chain=forward in-interface=WAN3 connection-mark=no-mark action=mark-connection new-connection-mark=wan3_conn
Code: Select all/ ip firewall mangle add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/0 \ action=mark-connection new-connection-mark=wan1_conn passthrough=no add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/1 \ action=mark-connection new-connection-mark=wan2_conn passthrough=no add chain=prerouting dst-address-type=!local connection-mark=no-mark in-interface=LAN per-connection-classifier=both-addresses:3/2 \ action=mark-connection new-connection-mark=wan3_conn passthrough=no
Which is what is happening here.Both-addresses can break SSL clusters. Multiple SSL web servers with different public IPs can sometimes access the same session data on their backend, and refuse services if the client session comes from multiple perceived source addresses to prevent session hijacking attacks.
Ekkasthat have (for some reason) 2 server IPs involved in the transactions, so PCC is great, but not for them.