On Apr 16, 2013, at 20:36, Brooks Davis <bro...@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"
...

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

Reply via email to