Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   systemd.net-naming-scheme    ( 7 )

схемы именования сетевых устройств (Network device naming schemes)

  Name  |  Description  |    Naming    |  History  |  Examples  |  See also  |  Note  |

Именование (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=prefixonumber 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=prefixxAABBCCDDEEFF 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[Pdomain]sslot[ffunction][nport_name|ddev_port], ID_NET_NAME_SLOT=prefixvslot, ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]bnumber, ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]uport...[cconfig][iinterface], ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]vslot 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 [Pdomain] sslot [ffunction] [nport_name | ddev_port] │ PCI slot number │ ├────────────────────────────────────────────────────────────┼──────────────────────────┤ │prefix vslot │ VIO slot number (IBM │ │ │ PowerVM) │ ├────────────────────────────────────────────────────────────┼──────────────────────────┤ │... bnumber │ Broadcom bus (BCMA) core │ │ │ number │ ├────────────────────────────────────────────────────────────┼──────────────────────────┤ │... uport... [cconfig] [iinterface] │ USB port number chain │ ├────────────────────────────────────────────────────────────┼──────────────────────────┤ │... vslot │ SR-VIO slot number │ └────────────────────────────────────────────────────────────┴──────────────────────────┘ The PCI domain is only prepended when it is not 0. All multi-function PCI devices will carry the ffunction 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 ddev_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=prefixcbus_id, ID_NET_NAME_PATH=prefixavendormodeliinstance, ID_NET_NAME_PATH=prefixiaddressnport_name, ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port], ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]bnumber, ID_NET_NAME_PATH=prefix[Pdomain]pbussslot[ffunction][nphys_port_name|ddev_port]uport...[cconfig][iinterface] 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 cbus_id │ CCW or grouped CCW │ │ │ device identifier │ ├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤ │prefix avendor model iinstance │ ACPI path names for │ │ │ ARM64 platform devices │ ├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤ │prefix iaddress nport_name │ Netdevsim (simulated │ │ │ networking device) │ │ │ device number and port │ │ │ name │ ├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤ │prefix [Pdomain] pbus sslot [ffunction] [nphys_port_name | ddev_port] │ PCI geographical │ │ │ location │ ├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤ │... bnumber │ Broadcom bus (BCMA) core │ │ │ number │ ├──────────────────────────────────────────────────────────────────────┼──────────────────────────┤ │... uport... [cconfig] [iinterface] │ 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.