RIP Metric export to kernel table ?

Martin Mares mj at ucw.cz
Tue Jun 20 01:32:02 CEST 2000


Hello!

> The application I have for this is a VPN with a dial-on-demand modem backup.
> In order to make the ppp link being used if its up, I need to control the
> metrics differently for the links. That works fine with bird filters, and the
> rip announcements do carry the correct metric (i set it to 5),
> according to tcpdump.

> However on the other end, the routes show up with metric 0 in the kernel
> table, which of course disturbs the settings I planned for it.

Just let BIRD do all the routing decisions, it should have all the information
needed. Let's assume that you have two point-to-point links, one to 192.168.0.1
and the other one to 192.168.0.2 and you want to route 10.0.0.0/8 to the
first one if it's available, otherwise to the second one. One of the ways
how to accomplish it is:

	protocol static {
		preference 201;
		route 10.0.0.0/8 via 192.168.0.1;
	}

	# I definitely should teach BIRD to recognize preferences in static
	# route definitions to avoid needing to configure two static protocols
	# or a filter in order to have static routes with different preferences. --mj
	protocol static {
		preference 200;
		route 10.0.0.0/8 via 192.168.0.2;
	}

BIRD always adds the static routes only if their destinations are available,
so if both links are running, both routes are installed and the first one
having higher precedence will be used and propagated to the kernel. Also,
if the first link fails, its static route gets removed and the remaining
second one will get used instead.

				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj at ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Error: Compiler unable to abort!"



More information about the Bird-users mailing list