Subject: mutating IPv4 aliases on NetBSD 2 systems
To: None <tech-net@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: tech-net
Date: 02/24/2006 13:51:04
Hi,

I'm seeing very strange (at least to me) behaviour on two i386 systems
running NetBSD 2.1_STABLE. They have one ethernet interface each, and
they both use IPv4 aliases. Since the problem is the same on both
systems, I'll describe it for only one of them.

The interface is configured as follows:

$ cat /etc/ifconfig.fxp0
inet 212.254.26.75/28 media autoselect
inet 212.254.26.66/32 alias
inet 212.254.26.69/32 alias
up

This worked fine so far, until today (uptime was about 26 days) I
noticed that running wol(1) (a wake-on-lan tool, pkgsrc/net/wol) didn't
work as usual: it somehow did not manage to send the magick packet,
but did not print an error message; ifconfig(8) revealed:

$ ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 00:02:a5:1c:cb:58
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet 212.254.26.66 netmask 0xffffffff broadcast 212.254.26.66
	inet alias 212.254.26.69 netmask 0xffffffff broadcast 212.254.26.69
	inet alias 212.254.26.75 netmask 0xfffffff0 broadcast 212.254.26.79

Hmm, this is not what I had expected! Notice the addresses don't match
the configuration: 212.254.26.75 is an alias now, and 212.254.26.66
is not an alias anymore! At least the netmasks and broadcast addresses
did not change...

Restarting the system fixed the problem:

$ ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 00:02:a5:1c:cb:58
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet 212.254.26.75 netmask 0xfffffff0 broadcast 212.254.26.79
	inet alias 212.254.26.66 netmask 0xffffffff broadcast 212.254.26.66
	inet alias 212.254.26.69 netmask 0xffffffff broadcast 212.254.26.69

That's what I would have expected before. And suddenly wol(1) worked
again...

Any idea what could be the source of this problem? I did not yet restart
the other system, i.e. I still have a system in this strange condition
available to do some tests. Help is appreciated!


Regards, Jukka

P.S.: I put an `ifconfig -a' to /etc/daily.local now; let's see for
how many days the recently restarted system keeps its network
configuration...

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~