Subject: Re: ifconfig and aliases
To: None <tls@rek.tjls.com>
From: Christian E. Hopps <chopps@merit.edu>
List: tech-net
Date: 07/20/1999 22:34:39
Thor Lancelot Simon <tls@rek.tjls.com> writes:

> On Tue, Jul 20, 1999 at 12:39:28AM +0200, Jens A Nilsson wrote:
> > Darren Reed <darrenr@reed.wattle.id.au>,wrote on Jul 20, 1999 at 08:24 +1000: 
> > > In some email I received from Jens A Nilsson, sie wrote:
> > > > 
> > > > I don't understand "ifconfig lo0 127.0.0.1 netmask 0xffff0000"
> > > > changes the netmask correctly.
> > > 
> > > Why should changing the netmask require you to specify the IP# ?
> > 
> > Because the netmask belongs to that IP address, but if you don't
> > expect an interface to have more than one IP address I can see your
> > point. Ifconfig should not discard a command such as
> > "ifconfig lo0 netmask 0xffff0000", it should either complain or
> > change the netmask of the primary IP address.
> 
> There is no "primary IP address".  The IP addresses are stored in a hash
> table; there's some old code that still thinks there's a "primary IP address"
> but it's deceived by a hack.

So we have no idea what IP gets written into a packet sent out a
specific interface with more then 1 IP anymore?

Thats whats I've been calling the primary-ip in my head at least.  I
understand the semantics of this weren't well documented; however, I
believe it used to be a deterministic thing.

If this isn't the case maybe we should add it back in (and better
define primary IP in the process).

Chris.