From: agryppa on
Hi,
my machine (gentoo linux) lists an unreachable net address of
127.0.0.0/8 of scope host.

****
localhost ~ # ip route show scope host
unreachable 127.0.0.0/8
****

Some people suggested that it is the /etc/init.d/network script that is
at fault, which states this:

===
einfo "Starting network"
routeflush
if [ "$RC_UNAME" = "Linux" ]; then
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
route add -net 127.0.0.0 netmask 255.0.0.0 \
gw 127.0.0.1 2>/dev/null
route add -net 127.0.0.0 netmask 255.0.0.0 \
gw 127.0.0.1 reject 2>/dev/null
else
ifconfig lo0 127.0.0.1 netmask 255.0.0.0 || cr=1
route -q add -inet 127.0.0.0 -netmask 255.0.0.0 \
127.0.0.1 reject || cr=1
fi
===

The internet connection, X server, pinging of local host works fine.
I would like however to figure out WHY the "unreachable" clause pops up.

Here is some more information:
********
localhost# ip route show table all
192.168.1.0/24 dev br0 scope link metric 6
unreachable 127.0.0.0/8 scope host
127.0.0.0/8 via 127.0.0.1 dev lo scope link
127.0.0.0/8 via 127.0.0.1 dev lo
default via 192.168.1.1 dev br0 metric 6
broadcast 192.168.1.0 dev br0 table local proto kernel scope link
src 192.168.1.12 broadcast 127.255.255.255 dev lo table local proto
kernel scope link src 127.0.0.1 broadcast 192.168.1.255 dev br0
table local proto kernel scope link src 192.168.1.12 local
192.168.1.12 dev br0 table local proto kernel scope host src
192.168.1.12 broadcast 127.0.0.0 dev lo table local proto kernel
scope link src 127.0.0.1 local 127.0.0.1 dev lo table local proto
kernel scope host src 127.0.0.1 local 127.0.0.0/8 dev lo table
local proto kernel scope host src 127.0.0.1 local ::1 via :: dev lo
proto none metric 0 mtu 16436 advmss 16376 hoplimit 4294967295 local
fe80::211:d8ff:fe1c:89e via :: dev lo proto none metric 0 mtu 16436
advmss 16376 hoplimit 4294967295 local fe80::211:d8ff:fe1c:89e via ::
dev lo proto none metric 0 mtu 16436 advmss 16376 hoplimit
4294967295 local fe80::dc7f:50ff:fe0a:2a1f via :: dev lo proto none
metric 0 mtu 16436 advmss 16376 hoplimit 4294967295 fe80::/64 dev
tap0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit
4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500
advmss 1440 hoplimit 4294967295 fe80::/64 dev br0 proto kernel metric
256 mtu 1500 advmss 1440 hoplimit 4294967295 ff00::/8 dev tap0 metric
256 mtu 1500 advmss 1440 hoplimit 4294967295 ff00::/8 dev eth0 metric
256 mtu 1500 advmss 1440 hoplimit 4294967295 ff00::/8 dev br0 metric
256 mtu 1500 advmss 1440 hoplimit 4294967295 unreachable default dev
lo table unspec proto kernel metric -1 error -101 hoplimit 255
*****

*****
localhost# ip route show table local
broadcast 192.168.1.0 dev br0 proto kernel scope link src
192.168.1.12 broadcast 127.255.255.255 dev lo proto kernel scope
link src 127.0.0.1 broadcast 192.168.1.255 dev br0 proto kernel
scope link src 192.168.1.12 local 192.168.1.12 dev br0 proto kernel
scope host src 192.168.1.12 broadcast 127.0.0.0 dev lo proto kernel
scope link src 127.0.0.1 local 127.0.0.1 dev lo proto kernel scope
host src 127.0.0.1 local 127.0.0.0/8 dev lo proto kernel scope host
src 127.0.0.1
****



Any clues, thank you in advance
Agryppa



From: Pascal Hambourg on
Hello,

agryppa a �crit :
> my machine (gentoo linux) lists an unreachable net address of
> 127.0.0.0/8 of scope host.
>
> ****
> localhost ~ # ip route show scope host
> unreachable 127.0.0.0/8
> ****
>
> Some people suggested that it is the /etc/init.d/network script that is
> at fault, which states this:
>
> ===
> einfo "Starting network"
> routeflush
> if [ "$RC_UNAME" = "Linux" ]; then
> ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
> route add -net 127.0.0.0 netmask 255.0.0.0 \
> gw 127.0.0.1 2>/dev/null
> route add -net 127.0.0.0 netmask 255.0.0.0 \
> gw 127.0.0.1 reject 2>/dev/null

It seems that it is the last command above that creates the unreachable
route.

> The internet connection, X server, pinging of local host works fine.

Yes, because the "local" table takes precendence over the "main" table.

> localhost# ip route show table local
[...]
> local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
From: agryppa on
On Sun, 13 Jun 2010 12:35:53 +0200
Pascal Hambourg <boite-a-spam(a)plouf.fr.eu.org> wrote:

> > ===
> > einfo "Starting network"
> > routeflush
> > if [ "$RC_UNAME" = "Linux" ]; then
> > ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
> > route add -net 127.0.0.0 netmask 255.0.0.0 \
> > gw 127.0.0.1 2>/dev/null
> > route add -net 127.0.0.0 netmask 255.0.0.0 \
> > gw 127.0.0.1 reject 2>/dev/null
>
> It seems that it is the last command above that creates the
> unreachable route.


OK, thank you for your input on this.
After the line has been commented with # sign, it seems that the issue
is now fixed. But questions remain.

Even before the fix the table all shows an unreachable entry at the
very end.


unreachable default dev lo table unspec proto kernel metric -1 error -101 hoplimit 255


Can this be somehow flushed?

Agryppa

From: Pascal Hambourg on
agryppa a �crit :
>
> Even before the fix the table all shows an unreachable entry at the
> very end.
>
> unreachable default dev lo table unspec proto kernel metric -1 error -101 hoplimit 255

It is an IPv6 (note "hoplimit" which is specific to IPv6) default route
which is present by default. Use -4 if you want to list only IPv4 routes.

> Can this be somehow flushed?

Never tried. Why would you need to do that ?
From: agryppa on
On Sun, 13 Jun 2010 19:50:06 +0200
Pascal Hambourg <boite-a-spam(a)plouf.fr.eu.org> wrote:

> > Can this be somehow flushed?
>
> Never tried. Why would you need to do that ?

It must be my perfectionism :-) I thought it was something that needs
fixing ...

thank you for your expert advice
I hope that a reboot won't bring the same issues, though :-)

Agryppa