This document summarizes how network interfaces are identified in Windows and Linux. In both systems, key fields are used to uniquely specify an interface, although the implementations differ.
In Windows, the IP_ADAPTER_ADDRESSES structure is used to represent network interfaces. The following fields contribute to interface identification:
-
AdapterName
- A system-generated, permanent identifier for the network adapter.
- Example:
\Device\NPF_{F4B4E5C2-3B1A-4F89-A9B3-123456789ABC}
- It is not intended for display; rather, it is used internally and by system APIs.
-
FriendlyName
- A user-friendly, human-readable name for the adapter, intended for display in user interfaces (e.g., in
ipconfig
or the Network Connections folder). - Example:
"Local Area Connection * 10"
or"Wi-Fi"
- This field is read-only from the IP Helper API and may be set by the driver or system configuration.
- A user-friendly, human-readable name for the adapter, intended for display in user interfaces (e.g., in
-
PhysicalAddress
- The Media Access Control (MAC) address of the adapter.
- It is used both for interface identification and for networking communication at the data-link layer.
These fields together allow both internal processes and end users to uniquely identify and differentiate between multiple network interfaces.
In Linux, network interfaces are represented by the net_device structure, which is used by the kernel’s network stack. The following fields are relevant for interface identification:
-
name
- The system-assigned name for the interface (e.g.,
eth0
,wlan0
, or the newer predictable naming likeenp3s0
). - This name is used internally and by standard networking commands (e.g.,
ip link show
) to refer to the device.
- The system-assigned name for the interface (e.g.,
-
dev_addr
- The hardware address (MAC address) of the network interface.
- This serves a similar purpose to the PhysicalAddress field in Windows.
-
ifalias
- An optional field that can store a descriptive label for the interface.
- It can be set using a command such as:
sudo ip link set dev enp3s0 alias "Local Area Connection"
- While the alias is stored in the kernel (and visible with
ip -d link show
), it is less commonly used by standard user-space tools compared to the interface name.
-
Windows:
- AdapterName provides a permanent, system-level identifier.
- FriendlyName offers a human-readable label for user interfaces.
- PhysicalAddress supplies the MAC address used in communication.
-
Linux:
- name serves as the unique, system-assigned identifier (e.g.,
eth0
,wlan0
,enp3s0
). - dev_addr is the hardware (MAC) address.
- ifalias allows for an optional, descriptive label, though it is primarily used for internal or debugging purposes.
- name serves as the unique, system-assigned identifier (e.g.,
Both operating systems use similar pieces of information (a unique name, a MAC address, and an optional descriptive label) to identify network interfaces. However, the fields and mechanisms differ due to the distinct design philosophies and implementations of Windows and Linux networking subsystems.
Prepared for sharing with the community to highlight cross-platform interface identification techniques.