• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Quagga OSPFv3 (IPv6) Route Priorities

Started by mhamzahkhan, January 19, 2011, 12:22:46 AM

Previous topic - Next topic

mhamzahkhan

Hello everyone,

I'm trying to setup OSPFv3 on my home network to provide a type of fail-over for routes.

My configuration works, but I'm seeing some strange things happening which I cannot understand.

I basically have a setup where my "main" router (where the tunnel is actually setup. Lets call this six-gw) isn't really doing much in terms of IPv6 other than dealing with sending packets to the tunnel server, and forwarding packets to my two "real" IPv6 routers (lets call them six-router1 and six-router2). So like this:


Tunnel Server ------(internet)------ six-gw
                                               |
                                           -------------------
                                          |                   |
                                   six-router1         six-router2
                                          |                    |
                                      ----------------------------
                                          |          |         |
                                      vlan20  vlan30   vlan....


I wanted these two IPv6 routers to act in a way where six-router1 is the "always active" router, which six-gw will pass packets to, and if six-router1 is down, six-router2 takes over.

So to do that, I gave six-router1 a higher priority than six-router2, hoping that it will become the DR, but something strange happens.

It kind of works.... except for some reason, OSPF6d (I'm using Quagga) is routing two prefixes via six-router2 and others via six-router1 and I cannot see why.

I first started OSPFd on six-router1, and then six-gw which causes the routes to propagate correctly:

six-gw# show ipv6 route ospf6
Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,
       I - ISIS, B - BGP, * - FIB route.

O   2001:470:1f09:263:ffff:ffff:ffff:fff0/126 [110/1] is directly connected, vlan11, 01:34:51
O>* 2001:470:90a7:1::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 01:26:37
O>* 2001:470:90a7:2::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 01:26:37
O>* 2001:470:90a7:3::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 01:26:37
O>* 2001:470:90a7:30::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 01:26:37

six-gw# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime  State/IfState         Duration I/F[State]
10.253.253.253    2    00:00:32   Full/DR              01:35:07 vlan11[BDR]


But as soon as I start OSPF6d on six-router2, things get messy:


six-gw# show ipv6 route ospf6
Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,
       I - ISIS, B - BGP, * - FIB route.

O   2001:470:1f09:263:ffff:ffff:ffff:fff0/126 [110/1] is directly connected, vlan11, 01:35:54
O>* 2001:470:90a7:1::/64 [110/2] via fe80::2e0:81ff:fe42:1a4, vlan11, 00:00:19
O>* 2001:470:90a7:2::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 00:00:09
O>* 2001:470:90a7:3::/64 [110/2] via fe80::2e0:81ff:fe41:f6b8, vlan11, 00:00:09
O>* 2001:470:90a7:30::/64 [110/2] via fe80::2e0:81ff:fe42:1a4, vlan11, 00:00:09

six-gw# show ipv6 ospf6 neighbor
Neighbor ID     Pri    DeadTime  State/IfState         Duration I/F[State]
10.252.252.252    1    00:00:37   Full/DROther         00:00:34 vlan11[BDR]
10.253.253.253    2    00:00:36   Full/DR              01:36:04 vlan11[BDR]


As you can see, as soon as I start ospf6d on six-router2, for some reason six-gw selects it for two of the /64 prefixes, but I can't think why!
Strangely, its not always the same prefixes that are routed to six-router2, it changes every time I start ospf6d.

I'm lost for ideas now, so I was wondering if anyone can see what I am doing wrong?

I have put my config files here: http://static.hamzahkhan.com/ospf6d/

jimb

I'm not an OSPF expert, but your LAN setup, from a purely path oriented perspective, the two routers are equivalent.

Also, the route tables show equal metrics for both routes.  I think OSPF may just be "load balancing" the routes across the two routers because it sees the paths as equivalent.  For whatever reason, the weights you're trying to add to the routes via Quagga aren't being considered by the routers themselves, or, they're not transitive.

If you want true active/passive, your should probably be using HSRP/VRRP anyway, no?

comptech

#2
My first guess would be the same as jimb's. Six-gw is seeing equal cost routes and choosing whichever one it feels like (and only one, looks like multipath isn't on by default).

OSPF Priority only controls which router becomes the DR and BDR, not how traffic actually gets routed.

Excerpt from the OSPF Wiki:
QuoteDR's exist for the purpose of reducing network traffic by providing a source for routing updates, the DR maintains a complete topology table of the network and sends the updates to the other routers via multicast.
http://en.wikipedia.org/wiki/Open_Shortest_Path_First

Try changing the OSPF cost to 3 or higher on the router you want to be the backup and see what happens.


mhamzahkhan

Ahhh! I see.

I guess I understood that incorrectly. I thought the priority also as an influence on route selection as well as providing a way to give a router higher priority to win the DR election.

That makes sense now. Route cost would definitely make more sense for this :)

But I think Jimb may be right, VRRP might be a better way for me to do this albeit a bit more complicated (read: fun), so I'll probably give that a go some time this week!

Thanks for your help guys :)