Community discussions

MikroTik App
 
SC0RPl0N
just joined
Topic Author
Posts: 15
Joined: Thu Oct 13, 2016 4:40 pm

Need help adding second wan

Tue Feb 28, 2017 6:23 am

Hi,

I have modem connected to my first ISP. Modem(IP 192.168.1.1) is bridged to my mikrotik(default IP 192.168.88.1) and i am getting internet by PPPOE configured in mikrotik. I have second ISP and i want to connect it to mikrotik router too. For the second ISP i am using gateway(IP 192.168.1.254) which is getting internet connetion by itself. What i want to do is connect gateway from second ISP to mikrotik by lan cable and pass all tcp traffic from my computer trough that second ISP , so ALL traffic except tcp traffic goes over my first ISP. Address on my lan adapter is 192.168.88.77. Can anyone help me with this?

thanks
 
User avatar
null31
Member Candidate
Member Candidate
Posts: 183
Joined: Fri Dec 23, 2016 6:07 pm
Location: Brazil

Re: Need help adding second wan

Tue Feb 28, 2017 7:25 pm

Hi.
It's possible to do.
#You need to mark-routing packets over tcp protocol and set the src-address with your IP from computer.
/ip firewall mangle
	add chain=prerouting protocol=tcp action=mark-routing new-routing-mark=isp2-routing passthrough=yes src-address=192.168.88.77 disabled=no
#Add a default route manually, disable add-default-route from dhcp-client on ISP2.
/ip route
	add dst-address=0.0.0.0/0 gateway=ISP2-out-interface or 192.168.1.254 distance=2 routing-mark=isp2-routing disabled=no
#To work with fasttrack rule, you must set !isp2-routing on routing-mark.
/ip firewall filter
	add chain=forward action=fasttrack-connection routing-mark=!isp2-routing disabled=no
#Also, you need to create masquerade rules to work fine, changing only the out-interface.
Here, i use two pppoe-clients and i did this to my devices use only isp2, the rest of devices uses isp1.

Edit: You can use ISP2 to pass all traffic, then you don't need to add the protocol=tcp to mangle rule.
Last edited by null31 on Tue Feb 28, 2017 8:56 pm, edited 1 time in total.
 
Revelation
Member
Member
Posts: 336
Joined: Fri Dec 25, 2015 5:59 am

Re: Need help adding second wan

Tue Feb 28, 2017 8:33 pm

I don't recommend splitting your UDP and TCP traffic across two different ISPs. You can run into the issue where a connection uses both UDP and TCP and it will cause issues when the destination is seeing two different IPs.

I advise finding a better solution to using both ISPs.
 
SC0RPl0N
just joined
Topic Author
Posts: 15
Joined: Thu Oct 13, 2016 4:40 pm

Re: Need help adding second wan

Tue Feb 28, 2017 10:34 pm

@Null31
thanks for the advice

@Revelation
Why there should be issues with 2 IP addresses?
 
Revelation
Member
Member
Posts: 336
Joined: Fri Dec 25, 2015 5:59 am

Re: Need help adding second wan

Tue Feb 28, 2017 10:41 pm

If you have a specific application or service that you are connecting to. The Application on your device may need both TCP and UDP connections.

So let's say that you first establish a TCP connection to service. The application then sends UDP packets, the receiving end would see a different IP and may not associate that traffic with your initial TCP connection thus the traffic will be dropped.

As I said earlier, you should find a better way to balance your traffic over the WAN links.

Who is online

Users browsing this forum: anovojr, Paltri34 and 62 guests