COLO.in.th > คลังความรู้ > CentOS 7 > How to change a network interface name on CentOS 7


How to change a network interface name on CentOS 7




วิธีการเปลี่ยน ชื่อ Interface ของ Centos 7

**คำเดือน**
การแก้ไขอาจจะมีปัญหาอาจจะหลุดการเชื่อมต่อผ่าน internet เผื่อกรณีมีปัญหา โดยทำหน้าเครื่องหรือใช้งาน KVM over IP

เพิ่มในส่วน net.ifnames=0 biosdevname=0 ที่ไฟล์ /etc/default/grub (ตามรูป)
nano /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto net.ifnames=0 biosdevname=0 rhgb qu$
Change Interface name

สั่ง regenerate GRUB configuration with updated kernel parameter
grub2-mkconfig -o /boot/grub2/grub.cfg

แก้ไขชื่อ Interface
cd /etc/sysconfig/network-scripts
cp ifcfg-eno1 ifcfg-eth0
cp ifcfg-eno2 ifcfg-eth1
cp ifcfg-enp1s0f0 ifcfg-eth2
cp ifcfg-enp1s0f1 ifcfg-eth3

แก้ไขชื่อ DEVICE ให้ถูกต้อง
ifcfg-eth0 เดิม  DEVICE=eno1 เป็น  DEVICE=eth0
ifcfg-eth1 เดิม  DEVICE=eno2 เป็น  DEVICE=eth1
ifcfg-eth2 เดิม  DEVICE=enp1s0f0 เป็น  DEVICE=eth2
ifcfg-eth3 เดิม  DEVICE=enp1s0f1 เป็น  DEVICE=eth3


service network restart หรือ reboot server

**กรณี Mac Address เรียงลำดับไม่ถูกต้องสามารถดูวิธีแก้ไขได้ที่นี้
https://www.colo.in.th/knowledgebase/90/Problem-Interface-name-not-sorted-Centos7.html

ตัวอย่าง eth0 คู่กับ eth2 และ eth1 คู่กับ eth3



บทความนี้มีประโยชน์กับคุณหรือไม่ ?

บันทึกสู่รายการโปรดของฉัน บันทึกสู่รายการโปรดของฉัน    พิมพ์หัวข้อนี้ พิมพ์หัวข้อนี้

Also Read
Problem Interface name not sorted Centos7 (ดูรายละเอียด: 1332)
วิธีใช้งาน Crontab (Cron Jobs) For Linux Server (ดูรายละเอียด: 1599)
วิธิใช้งาน Ceph Storage (ดูรายละเอียด: 3249)
การติดตั้ง Ceph Storage บน Centos 7 (ดูรายละเอียด: 5527)
How to Stop and Disable Firewalld on CentOS 7 (ดูรายละเอียด: 1636)

Powered by WHMCompleteSolution

ภาษา: