RHEL7网卡命名规则

systemd 和 udev 引入了一种新的网络设备命名方式:一致网络设备命名(CONSISTENT NETWORK DEVICE NAMING)。根据固件、拓扑、位置信息来设置固定名字,带来的好处是命名自动化,名字完全可预测,在硬件坏了以后更换也不会影响设备的命名,这样可以让硬件的更换无缝化。带来的不利是新的设备名称比传统的名称难以阅读,比如心得名称是enp5s0。

默认情况下,systemd会按照以下规则网卡命名:

  • 规则1:将依据Firmware或BIOS提供的设备索引编号为网卡命名。(比如eno1)如果这两个不可用或不适用则使用规则2。
  • 规则2:将依据Firmware或BiosPCI-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:

  1. en for Ethernet,
  2. wl for wireless LAN (WLAN),
  3. ww for wireless wide area network (WWAN).
The names have the following types:
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 function 0 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 not 0. 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网卡命名规则

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

栗子博客 软件 RHEL7网卡命名规则 https://www.lizi.tw/soft/16754.html

常见问题
  • 1、杰齐1.7仅适用于PHP5.2 2、需Zend支持 3、尽量使用宝塔面板 4、尽量使用Windows 系统,关关对Linux支持不太友好。
查看详情

相关文章

评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

RHEL7网卡命名规则-海报

分享本文封面