CentOS7網絡卡命名規則

2021-09-20 09:02:03 字數 926 閱讀 1151

centos6之前基於傳統的命名方式如:eth1,eth0....

centos7提供了不同的命名規則,預設是基於韌體、拓撲、位置資訊來分配。這樣做的優點是命名是全自動的、可預知的,缺點是比eth0、wlan0更難讀。比如enp5s0

systemd對網路裝置的命名方式 en

乙太網ethernet

wl無線區域網

wlan

ww無線廣域網

wwlan

format

description

o整合裝置索引號

s擴充套件槽的索引號

x s基於mac進行命名

p spci擴充套件匯流排

1.編輯核心引數

在grub_cmdline_linux中加入net.ifnames=0即可

[root@centos7 ~]$vim /etc/default/grub

grub_cmdline_linux="crashkernel=auto net.ifnames=0 rhgb quiet"

2.為grub2生成配置檔案

編輯完grub配置檔案以後不會立即生效,需要生成配置檔案。

[root@centos7 ~]$grub2-mkconfig -o /etc/grub2.cfg
3.作業系統重啟

[root@centos7 ~]$reboot
4.驗證

CentOS7 網絡卡命名

在進行centos7的pxe安裝測試中發現了網絡卡命名不再遵從來有的命名規則而啟用了最新的命名方式,官網文件描述如下 在 red hat enterprise linux 7 中,目前 方案 1 合併韌體或者 bios 的名稱為板載裝置提供索引號的名稱,例如 eno1。如果韌體資訊適用且可用,則 方...

Centos7 網絡卡配置

進入網絡卡配置檔案目錄 cd etc sysconfig network scripts編輯配置檔案 vim ifcfg ens33type ethernet proxy method none browser only no bootproto static 使用靜態ip位址,預設為dhcp ip...

CentOS7網絡卡配置

安裝完centos之後,通過ip addr命令檢視ip資訊 root localhost yum.repos.d ip addr 1 lo mtu 65536 qdisc noqueue state unknown group default qlen 1000 link loopback 00 0...