Howto rename an interface
Paul Schenkeveld
fb-net at psconsult.nl
Tue May 6 09:22:00 PDT 2003
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 at softweyr.com
My $0.02.
Paul Schenkeveld, Consultant
PSconsult ICT Services BV
More information about the freebsd-net
mailing list