centos 클론시 ip 주소 맥어드레스 변경처리. > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

centos 클론시 ip 주소 맥어드레스 변경처리.

페이지 정보

profile_image
작성자 미친새
댓글 0건 조회 19,831회 작성일 20-02-21 12:35

본문

After cloning a VMWare image I had noticed that my CentOS Linux server renamed eth0 as eth1, eth1 as eth2 and so on. This is due to wrong or duplicate mac address. To fix this problem login to your CentOS Linux server using console and type the following commands:

# cd /etc/udev/rules.d
 # cp 70-persistent-net.rules /root/
 # rm 70-persistent-net.rules
 # reboot
 This file was automatically generated by the /lib/udev/write_net_rules program, run by the persistent-net-generator.rules rules file. Simple delete it and reboot the system to recreate the same. This should fix the problem:
# /sbin/ifconfig | grep "^eth"
 Sample outputs:


 

eth0      Link encap:Ethernet  HWaddr 00:0C:29:F3:E4:14
eth1      Link encap:Ethernet  HWaddr 00:0C:29:F3:E4:1E

You need to remove the MAC address in /etc/sysconfig/networking-scripts/ifcfg-eth*. To find out current MAC address, enter:
# ifconfig -a | grep eth1 | grep HWaddr | awk '{ print $5}'
 # ifconfig -a | grep eth2 | grep HWaddr | awk '{ print $5}'
 Update your /etc/sysconfig/networking-scripts/ifcfg-eth0 with eth1 HWaddr (MAC address), enter:
# cat /etc/sysconfig/networking-scripts/ifcfg-eth0
 Sample outputs:
 
DEVICE="eth0"
BOOTPROTO="dhcp"
NM_CONTROLLED="yes"
ONBOOT="yes"
HWADDR="00:0C:29:69:0C:4A"
 

Save and close the file. Restart the network service, enter:
# service network restart
 You can verify new settings with the following commands:
# /sbin/ifconfig -a
 # route -n

More About udev

udev is the device manager for the Linux kernel series 2.6.xx. udev loads all modules asynchronously in a different order. This can result in devices randomly switching names. My guess is my network card switched names or renamed eth0 and eth1 as eth1 and eth2.

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

공지사항

  • 게시물이 없습니다.

접속자집계

오늘
1,485
어제
1,914
최대
5,296
전체
1,480,779
Copyright © 소유하신 도메인. All rights reserved.