Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Apr 2006 22:50:27 -0700
From:      Darren Pilgrim <darren.pilgrim@bitfreak.org>
To:        Mike Meyer <mwm@mired.org>
Cc:        hackers@freebsd.org
Subject:   Re: Using any network interface whatsoever (solution?)
Message-ID:  <4438A0A3.3050600@bitfreak.org>
In-Reply-To: <17464.31976.938131.944829@bhuda.mired.org>
References:  <C05CAC06.C0BD%ceri@submonkey.net>	<20060407225742.GA21619@odin.ac.hmc.edu>	<20060407230247.GH16344@submonkey.net>	<4437C9F6.5000008@samsco.org>	<17463.65076.117616.563302@bhuda.mired.org>	<20060408224140.GA15366@outcold.yadt.co.uk>	<17464.17494.251794.271711@bhuda.mired.org>	<44385525.8000203@bitfreak.org> <17464.31976.938131.944829@bhuda.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer wrote:
> In <44385525.8000203@bitfreak.org>, Darren Pilgrim <darren.pilgrim@bitfreak.org> typed:
 >>
>> If you add something to /etc/rc.d so that a sh-ified version of this script 
>> runs after all interfaces have attached but before any numbering or cloning 
>> takes place you can have lines like this in /etc/rc.conf:
>>
>> ifconfig_PublicLAN="inet a.b.c.d/24"
>>
>> That's far better than trying to remember what's on em0.
> 
> That's certainly true. But is there an advantage to tieing the
> PublicLAN name to a MAC address as opposed to em0?

The network interface name the user sees becomes tied directly to the 
physical device by way of a unique, configuration-independent identifier.

The probe order and driver name become transparent to the network configuration.

You could test two different drivers on the same hardware and you wouldn't 
have to duplicate or modify your ifconfig lines in /etc/rc.conf, just run:

	/etc/rc.d/netif stop PublicLAN
	kldunload olddriver
	kldload newdriver
	/etc/rc.d/netif start PublicLAN

Within the currently available capabilities, we get the network interface 
equivalent of disk volume labels.


[ Proposed use of PCI addresses instead of MAC addresses. ]
> The real problem with what I proposed is that you have to arrange to
> search config information for things that may not be tied to a pci
> bus. That could get real messy.

Right, it doesn't scale to ISA or USB devices.  The prior probably isn't a 
big deal these days, but I imagine compatibility with USB devices is fairly 
important.




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