Community discussions

MikroTik App
 
yakcora
newbie
Topic Author
Posts: 25
Joined: Sun Mar 04, 2007 9:22 am

OSPF multiple gateways mikrotik ver6.5

Thu Oct 24, 2013 2:58 am

I need the advice of an OSPF guru for our interesting network.

here is the setup all locations have mikrotik rb450 and they are geographicly distant locations
the 10.10.10.x network is a metro ethernet network on a single subnet touching each location
location1
port1 192.168.1.1/24
port2 192.168.2.1/24
port3 192.168.3.1/24
port4 Internet1 (NAT) x.x.x.x
Port5 10.10.10.1

location1.5 (same building different office)
port1 192.168.1.2/24 (link to location1 port1 switch) (I have no Idea why this is setup this way I'd link it to 10.10 network myself)
port2 na
port3 192.168.99.1/24
port4 192.168.98.1/24
Port5 na


Location2
port1 192.168.4.1/24
port2 192.168.5.1/24
port3 192.168.6.1/24
port4 Internet2 (NAT) y.y.y.y
Port5 10.10.10.2

location3
port1 192.168.7.1/24
port2 192.168.8.1/24
port3 192.168.9.1/24
port4 NO INTERNET yet
Port5 10.10.10.3

Location4
port1 192.168.10.1/24
port2 192.168.11.1/24
port3 192.168.12.1/24
port4 Internet4 (NAT) z.z.z.z
Port5 10.10.10.4

here is what I need this network to do normally route internet traffic from it's own internet and if it is down route the internet traffic from the metroethernet port to any of the other internet locations.

I currently have RIP + manual static routes for the
0.0.0.0/0 with 200 as the distance for local internet
0.0.0.0/0 with 201 as the distance for backup internet
0.0.0.0/0 with 202 as the distance for backup internet
I manually go and change the distance if internet goes out (well actually with a script that pings an ip and disables the local default route)

I need to get rid of this script and rip and implement OSPF
here is what I tried and failed!
enable ospf on all interfaces added 0.0.0.0/0 network and default instance on all but the problem is the 0.0.0.0/0 on ospf has the same distance as the rest of the subnets which causes a big mess.

any input is appreciated.

Thank you in advance
 
djdrastic
Member
Member
Posts: 367
Joined: Wed Aug 01, 2012 2:14 pm

Re: OSPF multiple gateways mikrotik ver6.5

Thu Oct 24, 2013 11:20 am

Adjust Default Route Import Metric ?
 
yakcora
newbie
Topic Author
Posts: 25
Joined: Sun Mar 04, 2007 9:22 am

Re: OSPF multiple gateways mikrotik ver6.5

Fri Oct 25, 2013 12:31 am

I tried default route metric changed to 20 but it did not change anything on the routing table
You do not have the required permissions to view the files attached to this post.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: OSPF multiple gateways mikrotik ver6.5

Fri Oct 25, 2013 7:51 pm

Could you be more specific about the problem? The AD of the OSPF routes will be 110 by default (same as Cisco default AD for OSPF) but on a router which has a local static default route the static route should always take preference over the default route provided by OSPF.
 
yakcora
newbie
Topic Author
Posts: 25
Joined: Sun Mar 04, 2007 9:22 am

Re: OSPF multiple gateways mikrotik ver6.5

Fri Oct 25, 2013 8:39 pm

the problem is as soon as I enable the ospf the internet is routed out from a non-local internet connection over metro ethernet.
as I understand the part I am making mistake is assigning the wrong metrics for the local internet default gateway.

so rather than using 0.0.0.0/0 x.x.x.x 200 metric for the local internet I need to use 0.0.0.0/0 x.x.x.x 110 metric ?

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

Re: OSPF multiple gateways mikrotik ver6.5

Fri Oct 25, 2013 11:29 pm

I think that you may be confusing Administrative Distances (AD) shown as Distance in the RouterOS routing table with the metrics used internally by a particular dynamic routing protocol. The costs that you set on OSPF interfaces are used by OSPF to select routes but when the chosen route is inserted into a routing table its AD is set to 110 by default.

The other "AD"s which are most relevant to your situation are:

Connected routes - AD=0
Static Routes - AD=1

Thus a static route should always trump an OSPF route because it has the lowest AD.

The default ADs above are used by both RouterOS and Cisco IOS - not all routers follow the same process and some do not even truly use the AD concept.

Can you upload a sample routing table?

Who is online

Users browsing this forum: No registered users and 55 guests