:: Re: [DNG] Predictable Network Inter…
Inizio della pagina
Delete this message
Reply to this message
Autore: Rainer Weikusat
Data:  
To: dng\@lists.dyne.org
Oggetto: Re: [DNG] Predictable Network Interface Names - Stupid or good idea?
Jude Nelson <judecn@???> writes:
>> Isn't the initial identification of network adapters and assignment
> originally handled by the Kernel or is this another urban myth that I have
> mistakenly hung on to?
>
> Yes--network interfaces are given a monotonically-increasing sequence
> number as they are enumerated (e.g. the X in ethX and wlanX). However, X
> isn't guaranteed to refer to the same NIC across boots.


A network device name is assigned whenever the corresponding driver
calls register_netdev. Each driver can request his own interface name
prefix but conventionally, most use eth. In order to enable
prefix-sharing, the kernel assigns a running number together with the
prefix. This means that which ethX refers to which physical interface
depend on the order the init code of the various drivers is executed.

A specific ethX will continue to refer to the same physical interface
unless either the hardware configuration is changed, thus causing the
kernel to detect interfaces in a different order, or - in the relative
rare case that more than one network driver actually has to be loaded,
if the order in which the drivers call their init routines
changes. There's nothing which would stop "driver loading support
software" from ensuring that this won't happen gratuitiously.