схемы именования сетевых устройств (Network device naming schemes)
Именование (Naming)
All names start with a two-character prefix that signifies the
interface type.
Table 1. Two character prefixes based on the type of interface
┌───────┬───────────────────────┐
│Prefix
│ Description
│
├───────┼───────────────────────┤
│en
│ Ethernet │
├───────┼───────────────────────┤
│ib
│ InfiniBand │
├───────┼───────────────────────┤
│sl
│ Serial line IP (slip) │
├───────┼───────────────────────┤
│wl
│ Wireless local area │
│ │ network (WLAN) │
├───────┼───────────────────────┤
│ww
│ Wireless wide area │
│ │ network (WWAN) │
└───────┴───────────────────────┘
The udev net_id
builtin exports the following udev device
properties:
ID_NET_NAME_ONBOARD=prefixo
number
This name is set based on the numeric ordering information
given by the firmware for on-board devices. The name consists
of the prefix, letter o
, and a number specified by the
firmware. This is only available for PCI devices.
ID_NET_LABEL_ONBOARD=prefix label
This property is set based on textual label given by the
firmware for on-board devices. The name consists of the
prefix concatenated with the label. This is only available
for PCI devices.
ID_NET_NAME_MAC=prefixx
AABBCCDDEEFF
This name consists of the prefix, letter x
, and 12
hexadecimal digits of the MAC address. It is available if the
device has a fixed MAC address. Because this name is based on
an attribute of the card itself, it remains "stable" when the
device is moved (even between machines), but will change when
the hardware is replaced.
ID_NET_NAME_SLOT=prefix[P
domain]s
slot[f
function][n
port_name|d
dev_port],
ID_NET_NAME_SLOT=prefixv
slot,
ID_NET_NAME_SLOT=prefix[P
domain]s
slot[f
function][n
port_name|d
dev_port]b
number,
ID_NET_NAME_SLOT=prefix[P
domain]s
slot[f
function][n
port_name|d
dev_port]u
port...[c
config][i
interface],
ID_NET_NAME_SLOT=prefix[P
domain]s
slot[f
function][n
port_name|d
dev_port]v
slot
This property describes the slot position. Different schemes
are used depending on the bus type, as described in the table
below. In case of USB, BCMA, and SR-VIO devices, the full
name consists of the prefix, PCI slot identifier, and USB or
BCMA or SR-VIO slot identifier. The first two parts are
denoted as "..." in the table below.
Table 2. Slot naming schemes
┌────────────────────────────────────────────────────────────┬──────────────────────────┐
│Format
│ Description
│
├────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix [P
domain] s
slot [f
function] [n
port_name | d
dev_port] │ PCI slot number │
├────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix v
slot │ VIO slot number (IBM │
│ │ PowerVM) │
├────────────────────────────────────────────────────────────┼──────────────────────────┤
│... b
number │ Broadcom bus (BCMA) core │
│ │ number │
├────────────────────────────────────────────────────────────┼──────────────────────────┤
│... u
port... [c
config] [i
interface] │ USB port number chain │
├────────────────────────────────────────────────────────────┼──────────────────────────┤
│... v
slot │ SR-VIO slot number │
└────────────────────────────────────────────────────────────┴──────────────────────────┘
The PCI domain is only prepended when it is not 0. All
multi-function PCI devices will carry the f
function number in
the device name, including the function 0 device. For
non-multi-function devices, the number is suppressed if 0.
The port name port_name is used, or the port number d
dev_port
if the name is not known.
For BCMA devices, the core number is suppressed when 0.
For USB devices the full chain of port numbers of hubs is
composed. If the name gets longer than the maximum number of
15 characters, the name is not exported. The usual USB
configuration number 1 and interface number 0 values are
suppressed.
SR-IOV virtual devices are named based on the name of the
parent interface, with a suffix of v
and the virtual device
number, with any leading zeros removed. The bus number is
ignored.
In some configurations a parent PCI bridge of a given network
controller may be associated with a slot. In such case we
don't generate this device property to avoid possible naming
conflicts.
ID_NET_NAME_PATH=prefixc
bus_id,
ID_NET_NAME_PATH=prefixa
vendormodeli
instance,
ID_NET_NAME_PATH=prefixi
addressn
port_name,
ID_NET_NAME_PATH=prefix[P
domain]p
buss
slot[f
function][n
phys_port_name|d
dev_port],
ID_NET_NAME_PATH=prefix[P
domain]p
buss
slot[f
function][n
phys_port_name|d
dev_port]b
number,
ID_NET_NAME_PATH=prefix[P
domain]p
buss
slot[f
function][n
phys_port_name|d
dev_port]u
port...[c
config][i
interface]
This property describes the device installation location.
Different schemes are used depending on the bus type, as
described in the table below. For BCMA and USB devices, PCI
path information must known, and the full name consists of
the prefix, PCI slot identifier, and USB or BCMA location.
The first two parts are denoted as "..." in the table below.
Table 3. Path naming schemes
┌──────────────────────────────────────────────────────────────────────┬──────────────────────────┐
│Format
│ Description
│
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix c
bus_id │ CCW or grouped CCW │
│ │ device identifier │
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix a
vendor model i
instance │ ACPI path names for │
│ │ ARM64 platform devices │
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix i
address n
port_name │ Netdevsim (simulated │
│ │ networking device) │
│ │ device number and port │
│ │ name │
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│prefix [P
domain] p
bus s
slot [f
function] [n
phys_port_name | d
dev_port] │ PCI geographical │
│ │ location │
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│... b
number │ Broadcom bus (BCMA) core │
│ │ number │
├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤
│... u
port... [c
config] [i
interface] │ USB port number chain │
└──────────────────────────────────────────────────────────────────────┴──────────────────────────┘
CCW and grouped CCW devices are found in IBM System Z
mainframes. Any leading zeros and dots are suppressed.
For PCI, BCMA, and USB devices, the same rules as described
above for slot naming are used.