[nog] Strange linux routing issue

Boyan Krosnov boyan at krosnov.org
Tue Jul 30 15:13:24 EEST 2019


> We ended up with the following situation:
> # ip r g 12.12.12.10
> 12.12.12.10 dev lo src 12.12.12.146

ip rule list on my laptop:
0:    from all lookup local
32766:    from all lookup main
32767:    from all lookup default

Translation: when performing route look up, first check the 'local' 
table, then check 'main' table, then check the 'default' table. The 
first matching route is used.

Longest prefix match rule works only within tables.

> Even thou, at the same time we have:
> # ip r l|grep '^12.12.12.10'
> 12.12.12.10 via 10.0.0.6 dev eth0  src 10.0.0.1 cache

ip route list, show only the 'main' table.

Try 'ip route list table local', which apparently contains the 'dev lo' 
route matching above.

Cheers,
BK



More information about the Nog mailing list