Subject: kern/13262: NETBSD adds alias route to device instead of lookback
To: None <gnats-bugs@gnats.netbsd.org>
From: Ricardo Ryoiti Sugawara Junior <root@nbsd.arqui.g12.br>
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
>Closed-Date:
>Last-Modified:
>Originator: Ricardo Ryoiti Sugawara Junior
>Release: 1.5
>Organization:
>Environment:
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
>Description:
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.
>How-To-Repeat:
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: 200.231.171.9 (WORKS OK)
ALIAS: 200.231.171.5 (DOES NOT WORK)
The netstat -rn -f inet says that 200.231.171.5 has a route pointing to fxp0, while 200.231.171.9 points to lo0 (there're other aliases with differents subnets where it's IP points to lookback and it works ok).
>Fix:
delete the route that points you alias to your device, in my case:
route delete 200.231.171.5
and add a route that points it to the lookback device:
route add 200.231.171.5 127.0.0.1
And try to ping it .. it will work ok now.
>Release-Note:
>Audit-Trail:
>Unformatted: