Freebsd – OSPF routing (quagga) FreeBSD. Routing tables doesn’t change. Help please

freebsdospfquagga

I have a problem with my lab work.
I need to provide network routing with ospf.
My Net has the following layout:

Network Topology

So… When I start 3 virtual machine with all working interfaces, everything is ok – routing tables is right, all connections work.

But when I put down IF1 on R3 machine, after 120 sec routing tables on R1 and R2 have changed.
But even after 1 hour routing tables on R2 doesn't change, and I have problem with routing to 172.16.3.0 network.
I know in OSPF there are something like "flooding" routing – first wave of changing goes after 120 sec, and next step – after something like 8-9 min…

Please, help to make ospf work fine!

Here is conf files of zebra.conf and ospf.conf for R2 machine (for others all conf the same, exept IP addresses, network, hostsname and router id.

zebra.conf:

hostname Router
password zebra
enable password zebra

interface lo
 description loopback

interface em0
 ip address 192.168.9.3/24
interface em1
 ip address 172.16.2.1/24
interface em2
 ip address 172.16.1.2/24

ospf.conf:

hostname R2
password zebra
enable password zebra

interface em0
 no ip ospf authentication-key
interface em1
 no ip ospf authentication-key
interface em2
 no ip ospf authentication-key

router ospf
 ospf router-id 0.0.0.2
 network 192.168.9.0/24 area 0
 network 172.16.2.0/24 area 0
 network 172.16.1.0/24 area 0
 redistribute connected

Note: For all machines – em0=IF3, em1=IF2, em2=IF3

UPDATE: Thanks… Problem solved. I just add link-detect corectly… Sorry, I temporally can't vote for answer…

Best Answer

Why would the routing table change at all? R2 already has routes to everything via its links to R1 and R3. Even if R1 loses its route to 172.16.3.0/24, R3 is still advertising it back to R2 (as it did before the link went down).

You should see some change in the OSPF database itself, but the host's routing shouldn't need to change. Try comparing "show ip ospf database" on each of the routers before and after shutting down the link.

Worth noting - Without multipath enabled in your ospf configuration only one path to 172.16.3.0/24 will be injected into your routing table. If it sees routes from both routers then it will choose one of the paths based on a tie breaker - the router-id's. If R2 had already selected the path where the link -didn't- go down then nothing changes...

A couple of points-

1.) Why are you using "redistribute connected" - particularly on an unrestricted basis. The "network x.y.z.q" command already takes care of the links themselves. Redistribute connected is, at best, going to yield local routes showing up as external. Remove this statement and add another network statement for the 192.168.x interfaces (mark these interfaces as passive if they're supposed to be for end-host connectivity). If you must redistribute connected routes then apply filtering to limit the routes that are actually redistributed. Unrestricted redistribution is only pain waiting to happen.

2.) It's been a while since I've played with Quagga, but I think you also need "link-detect" on the ospf interface definitions.

Related Topic