Juliusz Chroboczek | 7 Feb 22:46
Picon

[quagga-users 12713] Multiple routing tables (Linux policy routing)

Hi,

My router is running quagga in a non-default table (table 8), since I'm
using different default routes for locally originated packets and for
forwarded packets (which go through a NAT box):

  $ grep table /usr/local/quagga/etc/zebra.conf
  table 8
  $ ip rule show
  0:      from all lookup local 
  100:    from 192.168.4.0/24 lookup 8 
  101:    from all to 192.168.4.0/24 lookup 8 
  32766:  from all lookup main 
  32767:  from all lookup default 

I'd like there to be two distinct default routes that are active at the
same time, one to the (quagga discovered) NAT box in table 8, one to the
(statically configured) router in table main.  Unfortunately, quagga
doesn't seem to install the route in table 8:

  $ ip route show 0.0.0.0/0 table main
  default via A.B.C.D dev eth0 
  $ ip route show 0.0.0.0/0 table 8
  $

Quagga is obviously receiving the default route to the NAT box:

  # show ip route 0.0.0.0/0
  Routing entry for 0.0.0.0/0
    Known via "babel", distance 95, metric 0
      E.F.G.H inactive
      directly connected, coloquinte

  Routing entry for 0.0.0.0/0
    Known via "kernel", distance 0, metric 0, best
    * A.B.C.D, via eth0

Apparently, quagga is ignoring the table number when checking for
duplicates, and refusing to install a duplicate default route, although
the two routes are in different tables.  Is there any way to force it to
install the route?

Is that a bug?

-- Juliusz

Gmane