Web lists-archives.com

Re: All of my enoX interfaces are mapped to eth0

On Mon 02 Apr 2018 at 11:34:40 (-0400), David Parker wrote:
> I don't normally set IP addresses on interfaces which I know to be offline,
> so perhaps my methodology here was flawed.  In this case, I set IP
> addresses on eno2, eno3, and eno4 to test whether or not they were actually
> discrete interfaces, or if they were all somehow mapped to the one
> interface which was actually connected.
> Normally, I only set IP addresses on interfaces which are already
> connected, but in that case I will stop seeing a ping response from any IP
> on an interface which is subsequently disconnected, regardless of whether
> or not I have multiple interfaces on the same subnet.
> The reason I was trying to figure out whether or not they were actually
> mapped to the same physical interface was that I needed to setup a bonded
> interface.  A quick unload/reload of the network driver resulted in a
> correct mapping (eno1->eth0, eno2->eth1, etc.) and then I was able to set
> up the bonded interface in active/passive failover mode just fine.  So it's
> all set now.

That seems an odd solution to me, which might work in your particular
case because of the hardware you're using (which has four sequential
MAC addresses) but would be unwise in the general case. The enoN names
are stable whereas the ethN names are assigned in a race.

Although the ethN race has been consistent for you, you can see the
race at work in their renaming. The second log showed the kernel kept
reusing eth0 because the renaming was winning against discovery,
whereas the first log showed discovery winning against renaming.

The gap between renaming the two interfaces on this laptop varies from
0.014 to 0.292 seconds as a lot is going on around the same time.