RHEL7网卡命名规则
2019-10-21 00:00
471 查看
systemd 和 udev 引入了一种新的网络设备命名方式:一致网络设备命名(CONSISTENT NETWORK DEVICE NAMING)。根据固件、拓扑、位置信息来设置固定名字,带来的好处是命名自动化,名字完全可预测,在硬件坏了以后更换也不会影响设备的命名,这样可以让硬件的更换无缝化。带来的不利是新的设备名称比传统的名称难以阅读,比如心得名称是enp5s0。
默认情况下,systemd会按照以下规则为网卡命名:
- 规则1:将依据Firmware或BIOS提供的设备索引编号为网卡命名。(比如eno1)如果这两个值不可用或不适用则使用规则2。
- 规则2:将依据Firmware或Bios的PCI-E热插拔slot索引编号为网卡命名。(比如ens1)如果这两个值不可用或不适用则使用规则3。
- 规则3:将依据硬件连接器的物理位置进行命名。(比如enp2s0)如果适用则应用,否则则采用规则5。
- 规则4:将根据网卡接口的MAC地址进行命名,(比如enx78e7d1ea46da)默认将不采用该方式,但用户可配置启用该方式。
- 规则5:其他方法都失败的情况下,最后采用传统的(不可预测编号)内核命名方式。(比如eth0)
- 上面的所有命名规则依赖于biosdevname,改程序默认启用。
The names have two-character prefixes based on the type of interface:
-
en
for Ethernet, -
wl
for wireless LAN (WLAN), -
ww
for wireless wide area network (WWAN).
- o<index>
- on-board device index number
- s<slot>[f<function>][d<dev_id>]
-
hotplug slot index number. All multi-function PCI devices will carry the
[f<function>]
number in the device name, including the function0
device. - x<MAC>
- MAC address
- [P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]
-
PCI geographical location. In PCI geographical location, the
[P<domain>]
number is only mentioned if the value is not0
. For example:ID_NET_NAME_PATH=P1enp5s0
- [P<domain>]p<bus>s<slot>[f<function>][u<port>][..][c<config>][i<interface>]
-
USB port number chain. 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. If there are multiple USB devices in the chain, the default values for USB configuration descriptors
(c1)
and USB interface descriptors(i0)
are suppressed.
相关文章推荐
- RHEL7禁用网卡命名规则
- RHEL中网卡命名规则
- RHEL 7.3修改网卡命名规则为ethX
- RHEL7 的网卡命名规则
- CentOS7网卡命名规则
- RHEL 7/CentOS 7/Fedora 28 重命名网卡名称[附可行性脚本]
- 更新ARM虚拟机网卡名称使其符合命名规则
- rhel7修改网卡命名规则
- centos7系列之后网卡命名规则详解
- rhel7修改网卡命名规则
- RHEL7 -- RPM包命名规则
- RHEL在戴尔系统上p1p1 ......命名规则
- 多网卡命名规则
- Centos 7中的网卡一致性命名规则
- [RHEL7.1]修改网卡命名方式 eno16777763变为eth0
- centos7 网卡命名规则详解
- 网络配置管理之ip、ss、配置文件、网卡命名规则、nmcli
- RHEL6.5 让网卡命名从eth0开始
- CentOS7网卡的命名规则
- rhel7中网卡命名方式