© cbpix, 123RF.com

© cbpix, 123RF.com

Discovering device names

Find Nemo!

Article from ADMIN 14/2013
By
Ethernet devices in Linux have always been called eth0 and nothing else. All of a sudden, this universal truth has lost its validity, and Linux administrators need to understand why and how.

Recently, a customer asked me what was going on with his system. All of a sudden, he no longer had an eth0; instead, he was seeing strange names like em1 or p3p1 at the console. He wanted to know exactly what was happening.

The explanation is fairly simple. The rule-based udev subsystem is responsible for naming. If all criteria for a rule match a network device found at boot time, the device is typically given the defined name, such as eth<X>. Here's an example:

# grep eth0 /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f0:de:f1:d5:c1:25", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

The rule says that a network device with the stated MAC address should be given a device name of eth0 and thus be the first device visible on the system. The name in the file is arbitrary. If you like, you can call the card public or private. This principle works to a certain extent. The downside is that you don't know which card exactly this is on the system. The only thing that is clear is that it is the card with the stated MAC address; whether this is also the first network device on the system remains unclear. For system administrators, this situation has always been a big worry. If you've ever stood in front of a server with a dozen network ports looking for eth0 , you will know exactly what I mean.

Danger of Confusion

The situation is aggravated in network installations where the TFTP boot request is sent on eth0, but the installer later sends the DHCPDISCOVER message via a different network card identified as eth0. This situation is really fun to troubleshoot.

I would like the name I see on the system to be

...
Use Express-Checkout link below to read the full article (PDF).

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Udev with virtual machines
    For many cloud admins, the kernel's udev system and associated rules equate to infinite renumbering of network interfaces and manual adjustment. We show how to keep on top of these tasks without deleting system files en masse.
  • Virtual networks with Hyper-V in Windows Server 2016
    Microsoft provides some interesting virtualization features in current and future versions of Windows Server. You can connect or isolate virtual machines, and Windows Server 2016 even supports virtual switches.
  • Software-defined networking with Windows Server 2016
    Windows Server 2016 takes a big step toward software-defined networking, with the Network Controller server role handling the centralized management, monitoring, and configuration of network devices and virtual networks. This service can also be controlled with PowerShell and is particularly interesting for Hyper-V infrastructures.
  • Managing networks in Windows Server vNext
    We look at a new component in Windows Server vNext – the Network Controller server role.
  • Controlling virtual machines with VNC and Spice
    Administrators on Linux virtual machines tend to use VNC to transfer the graphical system to Virtual Machine Manager or a VNC client. One alternative is Spice: If the guest system is running the QXL driver, you can look forward to fast graphics and audio pass through.
comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=