Using any network interface whatsoever (solution?)
Darren Pilgrim
darren.pilgrim at bitfreak.org
Sun Apr 9 05:50:28 UTC 2006
Mike Meyer wrote:
> In <44385525.8000203 at bitfreak.org>, Darren Pilgrim <darren.pilgrim at 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.
More information about the freebsd-hackers
mailing list