Subject: kern/13262: NETBSD adds alias route to device instead of lookback
To: None <firstname.lastname@example.org>
From: Ricardo Ryoiti Sugawara Junior <email@example.com>
Date: 06/20/2001 17:12:46
>Synopsis: NETBSD adds alias route to device instead of lookback
>Arrival-Date: Wed Jun 20 13:12:00 PDT 2001
>Originator: Ricardo Ryoiti Sugawara Junior
Intel Celeron with 128MB, intel i82557 ethernet...
System: NetBSD nbsd 1.5 NetBSD 1.5 (ARQUI) #4: Sun Mar 18 15:18:36 BRT 2001 root@nbsd:/usr/src/sys/arch/i386/compile/ARQUI i386
When addind an alias within the SAME SUBNET of the MAIN ip, NetBSD will add a route pointing to the device that holds the route of the subnet. The correct is to add a route pointing to the lookback device. As it does not happen, the IP and it's services (in my case, web-vhost) are inacessible LOCALLY BUT NOT FROM OUTSIDE. In explanation, from other machines it's ok, but when you try to ping or open connections to it from the machine that has the alias, you're unable to do anything.
Add a alias within the same subnet of your main IP address and try to ping it. In my case the cfg was:
fxp0 - IP: 184.108.40.206 (WORKS OK)
ALIAS: 220.127.116.11 (DOES NOT WORK)
The netstat -rn -f inet says that 18.104.22.168 has a route pointing to fxp0, while 22.214.171.124 points to lo0 (there're other aliases with differents subnets where it's IP points to lookback and it works ok).
delete the route that points you alias to your device, in my case:
route delete 126.96.36.199
and add a route that points it to the lookback device:
route add 188.8.131.52 127.0.0.1
And try to ping it .. it will work ok now.