udev: renamed network interface eth0 to eth1

RHEL6 에서 KVM등을 이용하여 가상서버를 운영시 마스터 이미지를 통해 새로운 VM을 만들면
해당 VM의 네트워크 디바이스명이 eth0가 아닌 eth1 이나 eth2등으로 변경되어 진다.

최초 상태인 eth0로 원복하기 위해서는 아래 절차가 필요하다.

 # vi /etc/udev/rules.d/70-persistent-net.rules
————————————————————————————-

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x1af4:0x1000 (virtio-pci)
# SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”52:54:00:78:10:fb”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″  -> 이줄 주석 처리

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:16:3e:65:03:d7″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

위의 설정 행 중 NAME 값을 eth0로 변경..

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:16:3e:65:03:d7″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

————————————————————————————–
리부팅하면 된다.

—————————————————————————————

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

2 Responses

  1. 2022년 6월 22일

    3intelligence

  2. 2023년 1월 26일

    1granddaughter

페이스북/트위트/구글 계정으로 댓글 가능합니다.