[Xorp-hackers] Soft-wiring RIB

Mark Handley M.Handley@cs.ucl.ac.uk
Sat, 08 May 2004 10:26:07 +0100


I just thought of another solution to the rib config issue for redist.
It should be possible to hook the routing protocol templates, so they
call RIB Xrls to configure the RIB OriginTables.

For example, something like (in bgp.tp):

protocols {
  bgp {
    %modinfo: provides bgp;
    %modinfo: depends rib;
    ...
    %create: xrl "rib/rib/0.2/expect_rib_client4?tablename:txt=bgp";
    ...
}

Now, what happens at startup is that the dependencies are all figured
out, and then the XRLs are re-ordered so things are configured one at
a time.

Putting a RIB Xrl in "protocols bgp" will ensure that if and only if
the config file contains any BGP config, then the RIB Xrl will be
called.  And because of the explicit dependencies, the rtrmgr does all
the RIB config before it does any routing protocol config.  So by the
time the first routing protocol is configured, all the OriginTables in
the RIB will have been setup.

The big advantage of this is that it is completely transparent to the
user, removing the possibility of mismatched RIB and routing protocol
configs, while preserving the error checking that you want.

Cheers,
	Mark