Community discussions

MikroTik App
 
NetBrowser
just joined
Topic Author
Posts: 18
Joined: Mon Mar 27, 2017 5:03 pm

Dual SIP providers one Lan routing on Mikrotik

Thu Feb 21, 2019 8:28 pm

Hello friends I am facing an issue with this setting, I have two different SIP providers both of them have a different approach in which regards to how they deliver their service but both do it through a dedicated fiber to the client (me).
So this is the catch, they have provide me each Wan port instructions to connect the PBX but my PBX only have 1 WAN port so I have changed it to switch mode (grandstream capabilities) I have setted up two wan ports on my mikrotik and one lan so I can reach the wan ports.

Adding route 0.0.0.0/0 to 1st SIP provider gateway I am a able to reach the SBC’s behind that wan network from 1st SIP provider

Adding route 0.0.0.0/0 to 2nd SIP provider gateway simoultaneously I am not able to reach the SBC’s behind the second wan network from 2nd SIP provider.

If I dissable 1st route, I can reach the second SIP providers SBC’s.

Obviously I am making a mess here as I a newbie Mikrotik user so any experienced user that can guide me through the right path it will be very well appreciated.

Thanks in advance.
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Dual SIP providers one Lan routing on Mikrotik

Fri Feb 22, 2019 1:13 pm

Keep both default routes.
Add two more default routes with routing marks for both providers.
Add two src-nat rules for both WAN interfaces.
Add routes for both SBCs with above routing marks.
Mangle your incoming and outgoing connections from/to those SBCs (first: mark connection, second: mark routing and set appropriate routing mark).

That should be it.
-Chris
 
NetBrowser
just joined
Topic Author
Posts: 18
Joined: Mon Mar 27, 2017 5:03 pm

Re: Dual SIP providers one Lan routing on Mikrotik

Sat Feb 23, 2019 6:48 am

Hello Chris, thanks for your help. I will try to acchieve what you are suggesting but please help me with some details since i am not an advanced user of Mikrotik.

Keep both default routes.
0.0.0.0/0 to SIP1
0.0.0.0/0 to SIP2

Add two more default routes with routing marks for both providers.
Do I have to create a routing mark first? and then add the route? or how do I add the two more default routes for both providers

Add two src-nat rules for both WAN interfaces.
0.0.0.0/0 to eth-SIP1 interface
0.0.0.0/0 to eth-SIP2 interface

Add routes for both SBCs with above routing marks.
This part is what I am confused regarding routes and marking as i undertand that this is done with mangle

Mangle your incoming and outgoing connections from/to those SBCs (first: mark connection, second: mark routing and set appropriate routing mark).
clearing the above i think i can acchieve this.

thanks for your help, any help will be very well appreaciated, please help me with this detailed solution I am looking forward to get a Mikrotik certiication.
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Dual SIP providers one Lan routing on Mikrotik

Mon Feb 25, 2019 11:28 am

Add two more default routes with routing marks for both providers.
Do I have to create a routing mark first? and then add the route? or how do I add the two more default routes for both providers
The sequence of doing this stuff doesn't really matter - you can do it either order.
It might be good to create the routing marks in mangle first - then you can select it when adding routes. This will avoid typo-errors.
Just add another default route with these marks, you can add as many as you want :-)
Add routes for both SBCs with above routing marks.
This part is what I am confused regarding routes and marking as i undertand that this is done with mangle
Well, with mangle you just add the marks - this will exclude those marked connections from the main routing table.
Now you have to add routes for connections marked with these marks to ensure your router knows what to do with them.
-Chris
 
Edwardpum
just joined
Posts: 2
Joined: Fri Mar 15, 2019 11:36 am
Location: Zimbabwe
Contact:

Dual SIP providers one Lan routing on Mikrotik

Sun Mar 24, 2019 2:36 pm

That is also a viable solution... and makes Windows obey a little better.

One question: how are you reaching the NAS? By Name or by IP? it matters..

Who is online

Users browsing this forum: loloski and 15 guests