Operating System - Linux
1748185 Members
4055 Online
108759 Solutions
New Discussion юеВ

Re: NICS in ethtool and ifconfig - What is 'eth#'

 
SOLVED
Go to solution
Michael Steele_2
Honored Contributor

NICS in ethtool and ifconfig - What is 'eth#'

Merry Christmas to All Including you Chanakah Folk and Here's the business;

Is this generality true:

"...All linux NICs use the naming pattern of "...eth#..."..."

Since all of the below are reported by "...ifconfig -a..." and are invalid for one reason are another when used with 'ethtool':

__tmp1618119500 Link encap:Ethernet (* ???? *)

lo Link encap:Local Loopback

sit0 Link encap:IPv6-in-IPv4

But these will always work with 'ethtool':

eth0, eth1, eth2....

An explanation please? I'm just looking for speed and duplex and auto-negotiation across 200 linux boxes and this popped up.
Support Fatherhood - Stop Family Law
3 REPLIES 3
rick jones
Honored Contributor

Re: NICS in ethtool and ifconfig - What is 'eth#'

I suspect that ethtool will work with just about any interface name that points at a real interface (well at least a LAN one). That said, the bit about "all linux NICs use the naming pattern or eth#" is something one cannot really count on. If some of the discussion in the linux "netdev" mailing list is any indication, the "eth" monopoly may be broken in the future and a LAN interface may have a name other than eth - even if it is Ethernet.
there is no rest for the wicked yet the virtuous have no pillows
Matti_Kurkela
Honored Contributor
Solution

Re: NICS in ethtool and ifconfig - What is 'eth#'

> Is this generality true:
> "...All linux NICs use the naming pattern of "...eth#..."..."

I would rather say: the overwhelming majority of wired Ethernet NIC drivers on Linux use a default interface naming pattern of "eth#". But the sysadmin can change this name, by using udev rules or the nameif command.

Some major Linux distributions (I know of at least RHEL, SLES and Debian) are using persistent interface name assignment: Debian and SLES will both auto-generate an udev rule that will persistently assign the interface name to a NIC, while RHEL creates a HWADDR= line in each generated /etc/sysconfig/network-scripts/ifcfg-* file.

As a result, a given physical NIC will always receive the same interface name, even if the hardware configuration is modified (NICs added/removed or the ordering of PCI cards is changed). If the interface names are not correctly assigned by kernel defaults, the system startup scripts will automatically use the "nameif" command to swap the names around.

(NOTE: on RHEL. there is also a MACADDR= configuration setting, which _assigns_ a specified MAC address to a network interface. Using HWADDR= and MACADDR= together on the same interface is not advisable and will lead to great confusion.)

Of course, the sysadmin is free to customize the name assignment information, or even to establish a custom naming scheme for NICs on his/her system. Predictably, actually doing this tends to uncover bugs in software that makes too many assumptions about NIC naming.

On one hand, the persistent assignment system makes Linux systems work more reliably when new NICs are added to an existing system. On the other hand, it requires an extra step to change the MAC address in the appropriate location when replacing a broken NIC.

> __tmp1618119500 Link encap:Ethernet (* ???? *)

This looks like an interface naming conflict: according to configuration, two different NICs are supposed to have the same interface name, or one interface has persistent name assignment information but the other hasn't. In these situations, the "nameif" command aborts in mid-operation, leaving one of the interfaces with a temporary name.

If you need to swap the names of two NICs with each other, you must explicitly specify the desired name<->MAC relationships for both NICs, otherwise you'll again get to see these temporary names.

If this is actually a wired Ethernet NIC and ethtool won't accept this name, I think you've uncovered a bug in ethtool.

In my opinion, when you see a temporary interface name like this, something is not right. You should investigate the situation and fix any conflicts or incomplete name swaps.

> lo Link encap:Local Loopback

This is not a physical NIC but the loopback interface, which should always have the IP address 127.0.0.1 (and IPv6 address ::1, if you have IPv6 enabled).

Because this is not a physical interface, it has no settings for ethtool to change.

> sit0 Link encap:IPv6-in-IPv4

This is a IPv6-in-IPv4 tunnel endpoint: it is a virtual interface, similar to VPN tunnel endpoints. Again, because it isn't a physical NIC, it has no settings that ethtool could manipulate.

"ethtool" is a tool for configuring the hardware settings of physical Ethernet interfaces - so it makes sense it will be useless for non-Ethernet or non-physical network interfaces.

MK
MK
Michael Steele_2
Honored Contributor

Re: NICS in ethtool and ifconfig - What is 'eth#'

Good Job Matt - Above and Beyond
Support Fatherhood - Stop Family Law