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:

  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.
 

最新文章

  1. iOS一些系统事件的生命周期
  2. 微软Sql server analysis service数据挖掘技术
  3. js setTimeout 与 setInterval 以及 for 循环 刷新UI
  4. ubuntu 切换工作区域
  5. ListView item 中TextView 如何获取长按事件
  6. 第23讲 UI_布局 之相对布局
  7. 【luogu P1396】营救
  8. Java 多线程入门
  9. Golang中WaitGroup使用的一点坑
  10. JavaScript 代码简洁之道
  11. vue.js 2.0(1)
  12. [转帖]AMOLED的技术和OLED有哪些联系和区别
  13. 3D游戏的角色移动和旋转
  14. nginx配置静态资源访问
  15. JQuery简易轮播图
  16. wamp支持win10吗?怎么设置?
  17. linux xml
  18. mysql数据导入导出与数据表优化
  19. debian开启cgroup memory子系统
  20. vc 关于局部刷新

热门文章

  1. 利用nodejs读取数据库数据生成树结构的json数据
  2. Android的开机流程及对应源码位置分析
  3. 包含日志文件getshell
  4. 洛谷P1628 合并序列
  5. Linux系统里让vim支持markdown格式的语法高亮
  6. Mac终端给命令设置别名alias的办法
  7. Resize a UIImage the right way
  8. 测试类执行报错:AttributeError: &#39;Testlei&#39; object has no attribute &#39;test_cases&#39; 和data,unpack用法解析
  9. 两个input标签之间间隙问题的解决
  10. js的正则表达式总结