Page 1 of 1

Problem connecting 2 links.

Posted: Thu Dec 09, 2010 3:01 pm
by singh
I have two internet links connected to my RouterOS and I am using ECMP load balancing with masquerade whose instructions I got from the wiki.

Everything seemed to work fine but I am having major issues of late.
I can ping both gatways and both DNS as well without any timeouts. But when I ping yahoo.com or try to browse any sites, it refuses.
If I change the check gateway option in routes from ping to arp, it works for some time then stops. If I change it back to ping, again it works for some time then stops. If I disable the check gateway, still it works for some times then stops.
If I disable any one of the links in the interface list, I can browse the internet properly without problems.
Tried playing around with the DNSs as well but no luck.
Tried doing setup againg, no luck.
Tries a different router, no luck.
Any help?

Re: Problem connecting 2 links.

Posted: Fri Dec 10, 2010 7:27 am
by singh
Can anybody please help

Re: Problem connecting 2 links.

Posted: Fri Dec 10, 2010 8:08 am
by fewi
ECMP only works well with public IPs. Try PCC instead. See the wiki for instructions.

Re: Problem connecting 2 links.

Posted: Fri Dec 10, 2010 11:49 am
by singh
I am using public IPs for both my conections. And if using them separtely, they work just fine. Please assist. Thanks

Re: Problem connecting 2 links.

Posted: Fri Dec 10, 2010 1:59 pm
by singh
Nobody wants to assist.....................................................................

Re: Problem connecting 2 links.

Posted: Sun Dec 12, 2010 11:32 am
by singh
Can anyone assist on this problem please

Re: Problem connecting 2 links.

Posted: Sun Dec 12, 2010 11:34 am
by mahnet
CHECK THE NET MASK & dns used. many ppl do mistakes with handling public IP and subnet.

Re: Problem connecting 2 links.

Posted: Thu Dec 16, 2010 4:25 pm
by singh
All that is correct. I dont think I have a syntax error.
Please advise

Re: Problem connecting 2 links.

Posted: Thu Dec 16, 2010 4:40 pm
by singh
Since both ISPs have different DNSs, I put one DNS from the 1st ISP and 2nd DNS from 2nd ISP

Re: Problem connecting 2 links.

Posted: Thu Dec 16, 2010 5:12 pm
by singh
ECMP only works well with public IPs. Try PCC instead. See the wiki for instructions.
Tried doing this but when I put in this line, it brings syntax error on line 39.

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:2/0 \
action=mark-connection new-connection-mark=wlan1_conn passthrough=yes

Re: Problem connecting 2 links.

Posted: Thu Dec 16, 2010 5:20 pm
by fewi
That's completely without context. If you want help you need to post as many details as you can.

Post at the VERY least all the configuration you applied as part of PCC (IP addresses, routes, mangle) and put it into
 tags, also post a network diagram and the version of RouterOS you are using.

Re: Problem connecting 2 links.

Posted: Fri Dec 17, 2010 7:49 am
by singh
I am using Version 3.3 of Mikrotik Router OS.
I have three interfaces, ether1 which is for my local IPs and connects to a switch which connects to an AP. The IP address is 192.168.0.1 The second interface is ether2, which connects to my ISP KDN, the IP for this is 41.72.222.121. Third interface is ether3, connecting to Safaricom ISP with IP 41.139.176.22.
My link works fine when I disable either ether2 or ether3. It works for some time when I enable both but then it fails to browse the internet. :?

Safaricom DNSs are 41.203.208.18 and 41.203.208.19
KDN DNSs are 41.220.238.4 and 196.201.231.167

Now, when I am trying to put in the PCC, I check the code for the wiki and type it into new terminal.
First I put the IPs.
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether1
add address=41.72.222.121/28 network=41.72.222.112 broadcast=41.72.222.127 interface=ether2
add address=41.139.176.22/30 network=41.139.176.20 broadcast=41.139.176.23 interface=ether3

This works fine.
Next I go to mangle.

add chain=input in-interface=ether2 action=mark-connection new-connection-mark=ether2_conn
add chain=input in-interface=ether3 action=mark-connection new-connection-mark=ether3_conn
add chain=output connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2
add chain=output connection-mark=ether3_conn action=mark-routing new-routing-mark=to_ether3
add chain=prerouting dst-address=41.72.222.112/28 action=accept in-interface=Local
add chain=prerouting dst-address=41.139.176.20/30 action=accept in-interface=Local

No problem till here
Then I go to the next step and type the following wwhich I have copied from the wiki also.

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses:2/0 \ action=mark-connection new-connection-mark=ether2_conn passthrough=yes

Now it says, "bad argument name per-connection-classifier (line 1 column 66)"

Thsi is where I get stuck. Please advise and soryy for my way for doing this as I am not an expert

Re: Problem connecting 2 links.

Posted: Sun Dec 19, 2010 7:56 am
by singh
Any help

Re: Problem connecting 2 links.

Posted: Sun Dec 19, 2010 6:47 pm
by fewi
The command was introduced later - you need to upgrade to a more recent version.

Thanks for the detailed post. Everything else looks goo and should work once you upgrade.

Re: Problem connecting 2 links.

Posted: Sun Dec 19, 2010 6:52 pm
by armanalam
i was also having this issue and i get resolve it by renaming the interface adapter name like ether1 into Local or Lan (dont rename it like local.... use capital L)
ether2 into Wan1
ether3 into Wan3

i dont know what is that but that is the way i mentioned above.

or i am putting here my PCC commands list change their values as u want and apply

/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.100/24 network=192.168.1.0 broadcast=192.168.1.255 interface=Wan1
add address=192.168.2.100/24 network=192.168.2.0 broadcast=192.168.2.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=to_Wan1
add chain=output connection-mark=Wan2_conn action=mark-routing new-routing-mark=to_Wan2
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.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=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=to_Wan1
add chain=prerouting connection-mark=Wan2_conn in-interface=Local action=mark-routing new-routing-mark=to_Wan2

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_Wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_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.2.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

Arman

Re: Problem connecting 2 links.

Posted: Mon Dec 20, 2010 9:28 am
by singh
i was also having this issue and i get resolve it by renaming the interface adapter name like ether1 into Local or Lan (dont rename it like local.... use capital L)
ether2 into Wan1
ether3 into Wan3

i dont know what is that but that is the way i mentioned above.

or i am putting here my PCC commands list change their values as u want and apply

/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.100/24 network=192.168.1.0 broadcast=192.168.1.255 interface=Wan1
add address=192.168.2.100/24 network=192.168.2.0 broadcast=192.168.2.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=to_Wan1
add chain=output connection-mark=Wan2_conn action=mark-routing new-routing-mark=to_Wan2
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.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=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=to_Wan1
add chain=prerouting connection-mark=Wan2_conn in-interface=Local action=mark-routing new-routing-mark=to_Wan2

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_Wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_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.2.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

Arman
Thanks for the help. When I type in the above, it still gets stuck at !local

[admin@MikroTik] /ip firewall mangle>> add chain=prerouting dst-address-type=!local

when I press spacebar after this, the curser do not move.

Re: Problem connecting 2 links.

Posted: Mon Dec 20, 2010 3:48 pm
by singh
Is there any other solution

Re: Problem connecting 2 links.

Posted: Mon Dec 20, 2010 4:45 pm
by fewi
The command was introduced later - you need to upgrade to a more recent version.
Latest stable is 4.16. Upgrade to that.
PCC was introduced somewhere around 3.23 or so, 3.3 is too old.

Re: Problem connecting 2 links.

Posted: Fri Dec 31, 2010 10:55 am
by asadaries
@ arman alam ,, will pcc work with pppoe sever ?