Community discussions

MikroTik App
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

different traffic/clients to different gateways+failover

Mon Aug 19, 2013 6:21 pm

Can someone recommend what would be their optimum flavour of routing for the following scenario, bearing in mind that the present setup is a large network ring topology, with the main gateway rb1100h having 1 eth facing public and 2 further interfaces ether2 going anticlockwise and ether3 going clockwise around the circuit.

The two halves of the circuit actually come together at a point supported by a rb750.

At present, everything works great, a few grumbling ospf errors from the ros5 packages, but since ros6 everything ok.

At any point in the network, I can unplug any cable in the loop and the traffic simply goes the other direction with just a few dropped packets. Interestingly, when the cable is reconnected, the switch back to the preffered(shortest) path is instant.

Now things are about to get more complicated, at the RB750 (halfway around the ring) I will be injecting another providers source.. Anotherwords I will have 2 gateways.

I was hoping to segregate the traffic now..

With some customers or better stiff some types of traffic, going out through gateway A and other customers and or their traffic going out through gateway B

And I still wanted to maintain my redundancy, so that if either gateway should fail, then all traffic is ent to the surviving gateway.

Is this still possible with ospf, maybe with routing marks..

Before I start another learning curve, I was hoping to get some senior members opinions on the best form of routing to cater for all those pre-requisites.

thanks
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: different traffic/clients to different gateways+failover

Sat Aug 24, 2013 11:46 pm

I would begin to plan for BGP running on top of OSPF. BGP will give you many more options to influence the direction of traffic for customer subnets. OSPF will give you fast convergence of the underlying transit subnets.
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: different traffic/clients to different gateways+failover

Sun Aug 25, 2013 9:40 am

thanks for that, good timing too, the link was finally activated yesterday... So last night I was taking a look at configuring the OSPF ring to now have 2 border gateway routers.

And I was considering messing around with route filters to somehow change the distance on certain groups of clients.

I will take a look at your suggestion this evening.

Simon
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: different traffic/clients to different gateways+failover

Sun Aug 25, 2013 12:54 pm

mmm 3 hours of reading and its still looking too complex for me.

Are there any simple examples to follow anywhere, particularly relating to either ospf filtering examples
or BGP on top of ospf.

see attached

The ring is currently configured as 1 network back to 2 seperate interfaces on RB1100ah,

Now, the RB750 needs to be modified (halfway in the ring) so that

village 1 or subnet (xxx) goes out through ISP2 prefered, but if ISP2 fails, then their traffic will go to ISP1.

Similarly all traffic that was destined for ISP1 (main) will fallback to ISP2 if ISP1 fails
You do not have the required permissions to view the files attached to this post.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: different traffic/clients to different gateways+failover

Sun Aug 25, 2013 7:21 pm

OSPF Cost would accomplish what you want and get the villages to take the default route nearest to them if you have routers at your towers/APs.

But using OSPF cost to engineer traffic can get ugly quickly. On the upside however, it is relatively simple to configure. If you need more granular traffic control, BGP is the way to go.

Check out these from the Wiki

http://wiki.mikrotik.com/wiki/Manual:OSPF-examples

http://wiki.mikrotik.com/wiki/Manual:OS ... _Operation
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: different traffic/clients to different gateways+failover

Mon Aug 26, 2013 3:01 pm

Before I start another learning curve, I was hoping to get some senior members opinions on the best form of routing to cater for all those pre-requisites.
If I understand the question correctly you are essentially adding a second ISP gateway to the ring. You seem to be satisfied with the current OSPF solution so I suggest that you stick with it and simply use the OSPF interface cost feature to make certain ring members default to Gateway A while others default to Gateway B. OSPF is perfectly adequate for this topology. The redundancy for ring breaks will be maintained.

With some gateway checking and possibly some additional Netwatch/Scripting you should also be able to detect ISP failures at the gateways and alter the advertised default routes accordingly thus giving you ISP failure redundancy too.
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: different traffic/clients to different gateways+failover

Mon Aug 26, 2013 3:09 pm

hi,

Thanks for input,, again sound advice... I took a quick look at BGP and it nearly gave me a migrane!

I have been looking at the route filters and head scratching a way to filter specific IP's and change their cost.

Think it might be the way to go, rather than learn yet another routing protocol.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: different traffic/clients to different gateways+failover

Mon Aug 26, 2013 3:19 pm

Look at interface cost in OSPF. By adjusting interface cost you can ensure that a particular point on the ring will tend to use (say) Gateway A rather than Gateway B unless its direct path to Gateway A is broken.

To see the cost that a given point on the ring is seeing for the default route(s) look in Routing / OSPF / Routes. Those effective costs affect which routes OSPF places in the main IP routing table.

If you only have dynamically created interfaces in OSPF (created because of network entries) then manually add the interfaces - the dynamic ones will disappear and you can manually set the OSPF cost associated with the interfaces.
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: different traffic/clients to different gateways+failover

Mon Aug 26, 2013 4:14 pm

jesus

I didn't know that ( manually setting cost), cos i struggled with that the other night when I took a glance at it.

I was trying to find a way of setting the default cost value up higher, somewhere around the 120, then at least I have got headroom above and below to steer the traffic.

Nice one.. Thanks for that valuable tip.

S
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: different traffic/clients to different gateways+failover

Mon Aug 26, 2013 4:19 pm

Remember to distinguish between the AD (typically 110 for OSPF routes) placed in the IP routing table and the cost used by OSPF to decide which routes to place in the table.

Have a look at the routes in Routing / OSPF and it should be clearer what is happening.

Who is online

Users browsing this forum: No registered users and 53 guests