Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2003 18:21:49 +0200
From:      Paul Schenkeveld <fb-net@psconsult.nl>
To:        Wes Peters <wes@softweyr.com>
Cc:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Subject:   Re: Howto rename an interface
Message-ID:  <20030506182149.A57876@psconsult.nl>
In-Reply-To: <200305060841.40502.wes@softweyr.com>; from wes@softweyr.com on Tue, May 06, 2003 at 08:41:40AM -0700
References:  <_MzYgD.A.O9P._h8s-@coal.sentex.ca> <200305042117.39042.wes@softweyr.com> <20030505114756.K53365@beagle.fokus.fraunhofer.de> <200305060841.40502.wes@softweyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi All,

On Tue, May 06, 2003 at 08:41:40AM -0700, Wes Peters wrote:
> On Monday 05 May 2003 02:49, Harti Brandt wrote:
> > On Sun, 4 May 2003, Wes Peters wrote:
> >
> > >On Sunday 04 May 2003 11:18, Jeremy Chadwick wrote:
> >
> > > All of the system startups need to refer to these ports by function, 
> > > not by some silly number assigned as a side effect of the PCI bus
> > > probing order.
> > >
> > > This almost begs for some simple alias that can be programmatically
> > > (or via a command line utility) added to the interface so the
> > > association with the device type isn't lost.  That bears some
> > > thought.  An interface label, as it were...
> >
> > Perhaps an if_alias field in struct ifnet, setable via ifconfig? This
> > would just nicely map to the alias name field in the SNMP interface
> > MIB.
> 
> That's what I was thinking, but that's just the beginning of the project.  
> The next step is to make references to the alias, i.e. from ifconfig, 
> ipfw, ipfilter, etc. recognize the alias or label as well as the device 
> name.  I'll ask the boss if I can do this on St. Bernard's ticket. ;^)

Ok, ifconfig, ipfw, ipfilter and many others can be changed to understand
both the original interface name and the alias when specified on the
commandline.

But what would ifconfig -l, ifconfig -a, netstat -i and others output
and what would ipmon log about blocked packets?  The original name,
the alias or both?

I am not really against interface aliases and I can see the benefits
for simplified configuration of similar machines (I'm facing the
same issues with many multi-homes machines I manage that are
conceptually the same but have slightly different mixes of
interfaces that you described a few messages ago).  But being able to
have aliases so configuration scripts can use the logical name does
not solve all problems.

Perhaps commands reporting interface names should have a flag to
choose for physical names or logical names (eg. 'ifconfig -l -P' or
'ifconfig -l -L') and messages that get logged somewhere could
output both the physical and logical names like this:

    May  6 18:16:50 firewall ipmon[54]: 18:16:49.563047 dc7/ext0 @0:17 b
    xx.xx.xx.xx,1030 -> xx.xx.xx.xx,1434 PR udp len 20 404 IN

I separated the physical name and logical names by a slash and not a
space so that it still counts as a single word for compatibility.

> -- 
> 
>         Where am I, and what am I doing in this handbasket?
> 
> Wes Peters                                               wes@softweyr.com

My $0.02.

Paul Schenkeveld, Consultant
PSconsult ICT Services BV



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030506182149.A57876>