A question about handling a system with two wired network interfaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have a system with two ethernet sockets on the motherboard, and I have
until very recently been finding that my network at random failed to come
up during the boot process.

I have the ethernet cable plugged into only one of the two sockets, and
assign the names to the interfaces as eno1 and eno2 - because left to its
own it assigned one of them as name "eno1" and the other to "eth0" or
"eth1" at random between boots! I was surprised that it chose ethX at all
for the second name, given this is running with the new naming scheme!

However following the hints at:

https://wiki.archlinux.org/index.php/Udev#Network_device

I specify that udev fix the two interface names as eno1 and eno2 - but
still the network failed to come up sometimes at boot. It seemed to be pure
chance as to whether it came up on any particular boot. I tried both
NetworkManager as well as ifplugd/netcfg and both seemed to behave the same
way - at any one time I only had one or other scheme for getting the
network up.

What I then presumed was that although the same two names are always
assigned, the hardware mac address to which of the two physical network
ports was being assigned was being assigned differently to the two names -
i.e. sometimes being en01 and sometimes being eno2.  Why this matters is
that I assign a static ip address to eno1 only and don't use eno2. This
would only be an issue if there was more than one NIC in the system.

The system boots really fast as it has SSD drives, which possibly was not
allowing enough time for the name assignment, so I then found the advice at:

https://wiki.archlinux.org/index.php/Rename_network_interfaces

where it suggests editing the systemd unit file for in my case
NetworkManager service - which I then did and this finally seems to have
fixed the problem though I will still need to boot over a period of days to
check if the network comes up "every" time now. The wiki page refers to the
network service file, but I applied this to the NetworkManager service file.

So the question that I hope someone can answer is whether in the case of
multiple NICs in a system the new network names, although the same "set" of
names is used for all the cards in the system, will still need this systemd
unit file amendment - i.e. adding the two lines:

Requires=systemd-udev-settle.service
 After=systemd-udev-settle.service

to the [unit] section in order to get the correct name associated with the
same hardware mac address every boot?

If someone who understands these things in detail could confirm if my
understanding is correct I would appreciate it?

Many thanks.

-- 
mike c


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux