Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 22:04:38 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Brooks Davis <brooks@FreeBSD.org>
Cc:        Adrian Chadd <adrian@freebsd.org>, freebsd-current@freebsd.org, Willy Offermans <Willy@offermans.rompen.nl>, freebsd-hardware@freebsd.org
Subject:   Re: control of order of inet devices
Message-ID:  <CD41C623-0BED-493D-B46F-447C3A240957@FreeBSD.org>
In-Reply-To: <20130416183618.GG98205@lor.one-eyed-alien.net>
References:  <20130416135621.GE3286@vpn.offrom.nl> <20130416154423.GD98205@lor.one-eyed-alien.net> <CAJ-Vmokde3ZYyB_uYZeThHcPWzP9=g=DzN-ESJCvmM%2BKntDpow@mail.gmail.com> <20130416183618.GG98205@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 16, 2013, at 20:36, Brooks Davis <brooks@FreeBSD.org> wrote:
> On Tue, Apr 16, 2013 at 10:08:00AM -0700, Adrian Chadd wrote:
>> Since people keep asking about this; maybe it's time we added a hint
>> to the bus code that allows for the unit to be set based on the pci
>> bus / slot / etc.
> 
> I don't see how that would address Willy's request.  Neither the unit
> number or the if_index of an interface effects its order in
> getifaddrs() output.
> 
> With modern bus hierarchies, you probably don't want to use the unit
> anyway as it loses too much information.  Some along the lines of
> Fedora's Consistent Network Device Naming would likely be more useful.
> That would be fairly easy to implement.

I've been using the ifconfig_XXX_name setting in rc.conf for years now,
which at works fine, at least for me.  E.g.:

ifconfig_em0_name="if_ext"
ifconfig_em1_name="if_lan"
ifconfig_ral0_name="if_wifi"

However, if bus enumeration would randomly swap em0 and em1, for
example, this would break down.  Linux usually just fixes a specific
interface name to a hardware address, e.g.
/etc/sysconfig/network-scripts/ifcfg-eth0 on a CentOS box has:

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:65:E4:E3"
...




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CD41C623-0BED-493D-B46F-447C3A240957>