Prioritising default routes

Michael Ludvig mludvig at logix.net.nz
Fri Feb 28 03:49:29 CET 2014


Hi

Short version: Can I assign different priorities (metrics?) to the same 
route inserted by Bird into different routing tables?

Long version:
I've got a main office router with these uplinks:

- 1x SDSL with BGP, receives national routes
- 1x ADSL with OSPF Cisco modem that advertises default route
- 2x OpenVPN tunnel to our Datacentre (one over each physical 
connection) with OSPF that's primarily for internal nets.

The SDSL and Datacentre are with the same ISP and I can propagate our 
DMZ subnets over BGP from either location.

Then I've got two routing tables - one for internal LAN and one for DMZ 
which has different rules.

In normal circumstances the LAN traffic goes out over ADSL unless there 
is a better route learnt from BGP in which case it'd go out over SDSL. 
The DMZ traffic (public IPs) always goes out over SDSL, and the DMZ 
routing table has a static default rule in that sense.

Now if SDSL goes down - as it did yesterday after a fibre cut down the 
road...
- all LAN traffic goes out over ADSL, that's good
- DMZ subnet advertised from DC router over BGP and incoming traffic 
arrives over the OpenVPN tunnel (which still works over ADSL).
- all DMZ egress is blocked though until I replace the default route in 
DMZ routing table to go via the tunnel to datacentre and from there to 
the internet.

If ADSL goes down...
- LAN traffic is restricted to BGP learned routes (national traffic) 
until I add a static default route via SDSL
- DMZ is fine

What I want is an automatic fail over for both LAN and DMZ if any one of 
the links fails.

My idea is to advertise a default route over all the uplinks and for the 
LAN routing table use them in this order of preference:
1. ADSL (OSPF), 2. SDSL (BGP), 3. one of the tunnels (unlikely if both 
physical links are down)
For DMZ routing table do this order:
1. SDSL (BGP), 2. tunnel over ADSL (OSPF), 3. plain ADSL (OSPF)

I know I can manage different routing tables from Bird but how do I 
assign different priorities (metrics?) for the same route going into 
different tables?

Thanks!

Michael







More information about the Bird-users mailing list