Subject: Re: "rotating" IPv4 addresses - bug or feature?
To: None <tech-net@netbsd.org>
From: Jukka Salmi <j+nbsd@2007.salmi.ch>
List: tech-net
Date: 07/11/2007 12:53:05
Alan Barrett --> tech-net (2007-07-11 11:12:12 +0200):
> On Wed, 11 Jul 2007, Jukka Salmi wrote:
>   [several ifconfig commands, then:]
> > $ ifconfig vr0 inet 192.168.0.1/24
> > $ ifconfig vr0
> > vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> > 	address: 00:0c:6e:74:f6:81
> > 	media: Ethernet autoselect (100baseTX full-duplex)
> > 	status: active
> > 	inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
> > 	inet alias 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
> > 	inet alias 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
> 
> This looks like a bug to me.  "ifconfig vr0 inet 192.168.0.1/24" should
> not have made 192.168.0.2 become the first address in the list; it
> should have made 192.168.0.1 the first adress in the list.

That's what I had expected, too.

I just noticed something what really looks like a bug to me:

$ ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	[...]
	inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
	inet alias 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
	inet alias 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255

$ ifconfig vr0 inet 192.168.0.1/24
$ ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	[...]
	inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
	inet alias 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
	inet alias 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255

$ ifconfig vr0 inet 192.168.0.1/24
$ ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	[...]
	inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
	inet alias 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255

Huh, 192.168.0.2 is gone...


Regards, Jukka

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