본문 바로가기
  • AI (Artificial Intelligence)
Skills/RedHat, CentOS

Red Hat / CentOS: Swap / Change Ethernet Aliases

by 로샤스 2014. 1. 29.

Red Hat / CentOS: Swap / Change Ethernet Aliases

by  on JANUARY 14, 2009 · 14 COMMENTS· LAST UPDATED JANUARY 14, 2009

in , , 

Q. My Ethernet aliases are randomly switched and they are bound to the wrong interface. My eth0 became eth1 and eth1 become eth0. This is causing all sort of trouble for services and firewall configurations. How do I swap back and make sure Ethernet aliases works correctly under CentOS Linux server?

A. It is possible to bind the MAC address to the network interfaces in configuration files. This will ensure that eth0,eth1 are assigned the way you want it.

Open each interfaces configuration file:

  1. /etc/sysconfig/network-scripts/ifcfg-eth0 - eth0 configuration file
  2. /etc/sysconfig/network-scripts/ifcfg-eth1 - eth1 configuration file

Open file for eth0 using vi, type:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Add the following line:

HWADDR=<MAC address of the network interface> 

Here is my sample config file:

# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:19:B1:2A:BA:B8
IPADDR=10.10.11.24
NETMASK=255.255.255.192
ONBOOT=yes

Save and close the file. Update /etc/sysconfig/network-scripts/ifcfg-eth1 file with correct HWADDR entry. Once done restart networking or just reboot the server:
# reboot

 

 

참고 : http://www.cyberciti.biz/faq/rhel-fedora-centos-howto-swap-ethernet-aliases/

 

 

 

 

 

 

'Skills > RedHat, CentOS' 카테고리의 다른 글

가상머신 버추얼박스 : CentOS 설치  (2) 2014.04.21
CentOS 5.5에서 kvm 설치  (0) 2014.04.21
CentOS 6.2 에서 KVM 설치  (0) 2014.04.21
CentOS 6.4 네트워크 설정  (1) 2014.04.21
CentOS 설치 시 참고할 점  (0) 2014.04.19

댓글