tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Interface name aliases (was: Specifying names for tap interfaces)



On Wed, Jun 20, 2012 at 04:13:43PM +0200, Edgar Fuß wrote:
> > I think we could have both a device name and a device name alias for an
> > interface (lets call them xname and xalias for now). The xname would still
> > be as it is righ now (i.e. bge0 or tap3, bridge1, ...)
> I like that idea, but one may have to think very carefully about
> some details.
> 
> Suppose you have bge0 aliased as en0 and wm0 as en1.
> 
> Should the output of ifconfig bge0 (or -a) show something like
>       name-alias: en0

Yes, I think ifconfig should show it, of course.

> ?
> 
> What should ifconfig en0 do? Give an error or behave like ifconfig bge0?

Give an error. If you want to use bge0's alias, use 'ifconfig alias:en0'
(or whatever - you get the idea: if you want to use the alias instead of
the name, explicitely say it is an alias).

> 
> What should ifconfig -l output? bge0 and wm0 or en0 and en1 or both?

Good question, I didn't think of this case. At first glance, I'd say
ifconfig -l should show only bge0 and wm0, and another option lists
aliases. Or maybe we don't need to have a list of aliases at all ...

> 
> How should "block all on bge0; pass all on en0" behave?

That would be:
block all on bge0
pass all on alias:en0

well, it would be identical to
block all on bge0
pass all on bge0

the last matching rule wins

> 
> This is the usual problem of "take x" and "enumerate and pick x" potentially
> behaving differently (like "ls CamelCase" and "ls | grep CamelCase" on a
> case-preserving file system).

Sure. I think that most of this can be avoided if we make clear what is
a name and what is an alias, so you can't use one for the other.
This is different namespaces, so you have to tell which one you want
to use (or list).

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index