Subject: kern/13262: NETBSD adds alias route to device instead of lookback
To: None <>
From: Ricardo Ryoiti Sugawara Junior <>
List: netbsd-bugs
Date: 06/20/2001 17:12:46
>Number:         13262
>Category:       kern
>Synopsis:       NETBSD adds alias route to device instead of lookback
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 20 13:12:00 PDT 2001
>Originator:     Ricardo Ryoiti Sugawara Junior
>Release:        1.5

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: (WORKS OK)
The netstat -rn -f inet says that has a route pointing to fxp0, while 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
and add a route that points it to the lookback device:
route add
And try to ping it .. it will work ok now.