[quagga-users 12458] Re: Automatically influence the Linux Routing Metric of Directluy-Connected routes?

Daniel Ng daniel.ng1234 at gmail.com
Thu Sep 8 06:09:21 IST 2011


> Thanks for the tip, Stephen. How did you raise the route cost?

Hi Stephen,

I noticed you manipulated the ospf cost in the ospfd config. ie.-

interface eth0
  ospf cost 50

-Doesn't this only affect the OSPF routing decisions? If a packet has already
entered this router, and its destination was the LAN on eth0, it will still be
forwarded out the eth0 interface.

Here's another possible solution. Say the LAN on eth0 is 192.168.1.0/24. The
kernel routing table would look like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

If I then add a static route to the same LAN, but out a different interface
(eth1) I get this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo

When I then ping from this router to 192.168.1.x, I see that the ping goes out
eth1 instead of eth0!

So, is there a way to make Quagga (at least ospfd and ripd) provide this route
to the kernel when it detects that Hello Packets/RIP Advertisments have stopped
entering eth0?

Cheers,
Daniel







More information about the Quagga-users mailing list