Adding Static Routes via Routing Daemons

Based on this chapter, you should now understand why adding static routes from the UNIX command line differs from adding static routes to the configuration of routing protocol daemons. The former acts directly on the FIB, whereas the latter acts on the RIB.

You should also note that because of this design paradigm, the routing engines differentiate between redistributing static routes added via routing protocol daemons and kernel routes added via the shell. For a complete treatise, three example configuration fragments for MRTd, GateD, and Zebra are offered (Examples 8-12 through 8-14). You can configure a preference value (administrative distance in Cisco notation) for comparison with other internal routing feeds, whereas from the UNIX shell only metrics are possible.

Example 8-12. MRTd Static Routes

[root@callisto:~#] cat /etc/mrtd.conf


router rip



  redistribute connected

  redistribute static

  redistribute kernel


route 1


Example 8-13. GateD Static Routes

[root@callisto:~#] cat /etc/gated.conf



       host gateway reject;

       host gateway retain;

host gateway noinstall; mask gateway preference 1

       interface eth1; masklen 24 gateway blackhole;

       default gateway;


export proto rip{

        proto static;

        proto direct;

        proto kernel;



Example 8-14. Zebra Static Routes

[root@callisto:~#] cat /usr/local/etc/zebra.conf


ip route eth1 1

ip route Null0