Re: [RFC] ifconfig: match by link-level address

From: Louis A. Mamakos (louie_at_TransSys.COM)
Date: 05/24/04

  • Next message: Louis A. Mamakos: "Re: [RFC] ifconfig: match by link-level address"
    To: Alex Semenyaka <flist@jabberwock.rinet.ru>
    Date: Mon, 24 May 2004 09:51:47 -0400
    
    

    > On Sun, May 23, 2004 at 07:37:37PM -0400, Louis A. Mamakos wrote:
    > > >>> This could be the first step towards teaching rc.conf about something like
    > > >>> network_interfaces_rename="hw-00:03:0d:08:dc:a7 sis0int"
    > > >> I don't really like the idea of adding magic values to the interface
    > > >> namespace that only work with ifconfig. If you want ifconfig to match
    > >> I agree, but there is another option: make such things not ifconfig-specific.
    > >> I mean that it could be done though renaming the interface into the some
    > >> lladdr-dependent name with fixed format. For example,
    > > This is all pretty interesting, though it seems like you'd only
    > > need to cobble together a shell script to do what you're after.
    >
    > You've absolutely right and I wanted to propose it just on the base of
    > currently existing functionality (independently of this thread). However if
    > there will be automatic renaming things would be easier. Thus I decided to
    > combine both approaches since it leads to simple solution.
    >
    > I would post my current changes (those giving the discussing functionality) to
    > the startup scripts as PR and send here the number. I'll do it if anybody will
    > express any interest in that. Actually those scripts could be changed in future
    > if ``ifconfig'' will provide such possibility out-of-box, and changes will be
    > seamless for users.

    This interface renaming operation is likely to only occur as the system
    boots, and probably is an "automated" process rather than one that involves
    human. Keeping with the decades-long UNIX tradition of using combinations
    of tools would lead you to writing a simple shell script, rather than going
    to all the trouble to extend the existing tool. Certainly there's no
    performance-related reason to do so. I guess I don't see how you might
    choose to extend ifconfig to implement some function that can't be done
    with some external tools. About the only ifconfig capability you need is
    a way to discover the link-level address (and hopefull media type), and
    a way to cause the renaming operation to occur.

    I'm not sure how much easier "automatic" renaming might be. You still
    need some ability to specify policy on what interfaces are renamed
    (e.g., only 100Base-T ethernet but not 802.11 wireless). Once you've
    opened that can of worms, doing the actual renaming is likely the easy
    part of the problem. There's already a bunch of code that iterates
    over network interface in /etc/rc.network (on 4-STABLE anyway).

    In the end, it's a matter of taste and opinion.

    louie

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Louis A. Mamakos: "Re: [RFC] ifconfig: match by link-level address"

    Relevant Pages

    • Re: changing extention
      ... another one using a shell script. ... eg. Reading a foo.c file and ... renaming it to foo.cpp using a script and this is read using a for ... nonstandard features. ...
      (comp.unix.shell)
    • Re: changing extention
      ... On 2008-03-24, sid wrote: ... another one using a shell script. ... eg. Reading a foo.c file and ... renaming it to foo.cpp using a script and this is read using a for ...
      (comp.unix.shell)
    • changing extention
      ... I want to know if it it possible to change a filename extention to ... another one using a shell script. ... eg. Reading a foo.c file and ... renaming it to foo.cpp using a script and this is read using a for ...
      (comp.unix.shell)
    • Re: changing extention
      ... sid wrote: ... another one using a shell script. ... eg. Reading a foo.c file and ... renaming it to foo.cpp using a script and this is read using a for ...
      (comp.unix.shell)
    • RE: Dual Ethernet NIC w/ failover
      ... the shell script de-configures the ... > interface, assuming the identity of the 1st interface. ... >> cards, however I haven't seen a lot of posts regarding the ... >> availability of dual ethernet cards with working failover ...
      (freebsd-isp)