Redhat 6.3 Interfaces name keep changing
I am using Redhat Enterprise Linux 6.3. I dont have any problem if RHEL shows ethx or either emx. This time the RHEL is showing the interfaces as emx. I am contineously watching that my em1 or em2 or em3 keep changing its names. For example when I reboot my Linux box the em1 shows Auto_em1 and sometime it come back to em1 after reboot. I got tense to watch it. same is with em2 and other NICs. How can I make the NICs name persistent.
|
What is in /etc/udev/rules.d/70-persistent-net.rules?
|
Hello smallpond. Thanks for your reply
# cat /etc/udev/rules.d/70-persistent- 70-persistent-cd.rules 70-persistent-net.rules # cat /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 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:40", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_em1" # PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:17:95:38:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p1p2" # PCI device 0x14e4:0x1659 (tg3) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:18:1c:51:ea", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p3p1" # PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:42", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_em2" # PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:40", ATTR{type}=="1", KERNEL=="eth*", NAME="em1" # PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:17:95:38:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p1p1" ============================= ============================= ONE THING I WOULD LIKE TO ADD HERE IS THAT IF I RUN THE ifconfig COMMAND I CAN ONLY SEE ONE ENTRY FOR em1, WHICH IS em1 BUT IN THE ABOVE COMMAND I CAN SEE TWO ENTRIES WHICH ARE em1 AND Auto_em1 # ifconfig Auto_em2 Link encap:Ethernet HWaddr 00:24:E8:2E:AB:42 inet addr:172.16.201.9 Bcast:172.16.201.255 Mask:255.255.255.0 inet6 addr: fe80::224:e8ff:fe2e:ab42/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6108250 errors:0 dropped:0 overruns:0 frame:0 TX packets:3392579 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4847130781 (4.5 GiB) TX bytes:1195256546 (1.1 GiB) Interrupt:48 Memory:d8000000-d8012800 Auto_p1p1 Link encap:Ethernet HWaddr 00:15:17:95:38:B4 inet addr:172.16.31.31 Bcast:172.16.31.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:fe95:38b4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:17143 errors:0 dropped:0 overruns:0 frame:0 TX packets:653 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1268582 (1.2 MiB) TX bytes:61712 (60.2 KiB) Interrupt:35 Memory:df280000-df2a0000 Auto_p1p2 Link encap:Ethernet HWaddr 00:15:17:95:38:B5 inet addr:172.16.201.4 Bcast:172.16.201.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:fe95:38b5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:174908 errors:0 dropped:0 overruns:0 frame:0 TX packets:2130 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:14833405 (14.1 MiB) TX bytes:155778 (152.1 KiB) Interrupt:46 Memory:df2c0000-df2e0000 Auto_p3p1 Link encap:Ethernet HWaddr 00:10:18:1C:51:EA inet addr:172.16.205.2 Bcast:172.16.205.255 Mask:255.255.255.0 inet6 addr: fe80::210:18ff:fe1c:51ea/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:394 errors:0 dropped:0 overruns:0 frame:0 TX packets:793 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:27813 (27.1 KiB) TX bytes:77673 (75.8 KiB) Interrupt:40 em1 Link encap:Ethernet HWaddr 00:24:E8:2E:AB:40 inet addr:172.16.119.12 Bcast:172.16.119.255 Mask:255.255.255.0 inet6 addr: fe80::224:e8ff:fe2e:ab40/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:626410 errors:0 dropped:0 overruns:0 frame:0 TX packets:327828 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:56414720 (53.8 MiB) TX bytes:88510771 (84.4 MiB) Interrupt:36 Memory:d6000000-d6012800 em3 Link encap:Ethernet HWaddr 00:24:E8:2E:AB:44 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:32 Memory:da000000-da012800 em4 Link encap:Ethernet HWaddr 00:24:E8:2E:AB:46 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:42 Memory:dc000000-dc012800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:6387 errors:0 dropped:0 overruns:0 frame:0 TX packets:6387 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3111452 (2.9 MiB) TX bytes:3111452 (2.9 MiB) p4p1 Link encap:Ethernet HWaddr 00:10:18:1A:F0:E1 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:38 |
1. how many eth NICs are actually installed (inc built-in to motherboard) ?
2. what files have you got in /etc/sysconfig/network-scripts ? 3. do the eth-ifcfg* files have NM_CONTROLLED=no or 'yes' ? Personally I've got Centos 6.5 and always turn off Network Manager; always seems to cause more problems than it solves. |
network manager is always a royal PITA and i remove it not just disable it on my CentOS system.
|
You might have biosdevname installed which actually changes the name to something like em1, em2, etc.
You can try to drop biosdevname package and name the interfaces as you wish in /etc/udev/rules.d/70-persistent-net.rules, then reboot. Anyway, the /etc/udev/rules.d/70-persistent-net.rules seems to have been generated manually, not by write_net_rules. |
Quote:
|
@ chrism01
1. how many eth NICs are actually installed (inc built-in to motherboard) ? 8 NIC 2. what files have you got in /etc/sysconfig/network-scripts ? # ls -l total 212 -rw-r--r-- 3 root root 259 Mar 7 01:03 ifcfg-Auto_em1 -rw-r--r-- 3 root root 245 Mar 7 01:03 ifcfg-Auto_em2 -rw-r--r-- 3 root root 254 Mar 7 01:03 ifcfg-Auto_p1p1 -rw-r--r-- 3 root root 254 Mar 7 02:26 ifcfg-Auto_p1p2 -rw-r--r-- 3 root root 254 Mar 7 01:03 ifcfg-Auto_p3p1 -rw-r--r--. 1 root root 254 Apr 27 2012 ifcfg-lo lrwxrwxrwx. 1 root root 20 Mar 5 12:12 ifdown -> ../../../sbin/ifdown -rwxr-xr-x. 1 root root 627 Apr 27 2012 ifdown-bnep -rwxr-xr-x. 1 root root 5569 Apr 27 2012 ifdown-eth -rwxr-xr-x. 1 root root 781 Apr 27 2012 ifdown-ippp -rwxr-xr-x. 1 root root 4168 Apr 27 2012 ifdown-ipv6 lrwxrwxrwx. 1 root root 11 Mar 5 12:12 ifdown-isdn -> ifdown-ippp -rwxr-xr-x. 1 root root 1481 Apr 27 2012 ifdown-post -rwxr-xr-x. 1 root root 1064 Apr 27 2012 ifdown-ppp -rwxr-xr-x. 1 root root 835 Apr 27 2012 ifdown-routes -rwxr-xr-x. 1 root root 1370 Apr 27 2012 ifdown-sit -rwxr-xr-x. 1 root root 1434 Apr 27 2012 ifdown-tunnel lrwxrwxrwx. 1 root root 18 Mar 5 12:12 ifup -> ../../../sbin/ifup -rwxr-xr-x. 1 root root 11919 Apr 27 2012 ifup-aliases -rwxr-xr-x. 1 root root 859 Apr 27 2012 ifup-bnep -rwxr-xr-x. 1 root root 10488 Apr 27 2012 ifup-eth -rwxr-xr-x. 1 root root 11971 Apr 27 2012 ifup-ippp -rwxr-xr-x. 1 root root 10401 Apr 27 2012 ifup-ipv6 lrwxrwxrwx. 1 root root 9 Mar 5 12:12 ifup-isdn -> ifup-ippp -rwxr-xr-x. 1 root root 727 Apr 27 2012 ifup-plip -rwxr-xr-x. 1 root root 954 Apr 27 2012 ifup-plusb -rwxr-xr-x. 1 root root 2364 Apr 27 2012 ifup-post -rwxr-xr-x. 1 root root 4154 Apr 27 2012 ifup-ppp -rwxr-xr-x. 1 root root 1925 Apr 27 2012 ifup-routes -rwxr-xr-x. 1 root root 3499 Apr 27 2012 ifup-sit -rwxr-xr-x. 1 root root 2488 Apr 27 2012 ifup-tunnel -rwxr-xr-x. 1 root root 3770 Apr 27 2012 ifup-wireless -rwxr-xr-x. 1 root root 4623 Apr 27 2012 init.ipv6-global -rwxr-xr-x. 1 root root 1125 Apr 27 2012 net.hotplug -rw-r--r--. 1 root root 11736 Apr 27 2012 network-functions -rw-r--r--. 1 root root 29853 Apr 27 2012 network-functions-ipv6 3. do the eth-ifcfg* files have NM_CONTROLLED=no or 'yes' ? # cat ifcfg-Auto_em1 ifcfg-Auto_em2 ifcfg-Auto_p1p1 ifcfg-Auto_p1p2 ifcfg-Auto_p3p1 TYPE=Ethernet DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME=em1 UUID=4c16caff-1771-422a-a0d4-352e26cecf5c ONBOOT=yes BOOTPROTO=dhcp DEVICE='em1 ' USERCTL=no HWADDR=00:24:e8:2e:ab:40 PEERROUTES=yes LAST_CONNECT=1394027965 NM_CONTROLLED=yes PEERDNS=yes TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME=em2 UUID=7c09cada-65d9-40c2-9c42-d84481bea658 ONBOOT=yes IPADDR=172.16.201.9 PREFIX=24 DEVICE=Auto_em2 USERCTL=no HWADDR=00:24:E8:2E:AB:42 LAST_CONNECT=1394135400 HWADDR=00:15:17:95:38:B4 TYPE=Ethernet BOOTPROTO=none IPADDR=172.16.31.31 PREFIX=24 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="Auto p1p1" UUID=02e3b6ad-6995-44ee-92ab-2f894fb6bf71 ONBOOT=yes LAST_CONNECT=1394131800 DEVICE=Auto_p1p1 USERCTL=no TYPE=Ethernet BOOTPROTO=none IPADDR=172.16.201.4 PREFIX=24 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="Auto p1p2" UUID=8ee8833f-8dcd-4d95-9f79-5200e29e9c15 ONBOOT=yes DEVICE=Auto_p1p2 USERCTL=no HWADDR=00:15:17:95:38:B5 LAST_CONNECT=1394140812 TYPE=Ethernet BOOTPROTO=none IPADDR=172.16.205.2 PREFIX=24 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="Auto p3p1" UUID=34d62299-f14b-4e3e-8b56-a9c2ecd27f64 ONBOOT=yes HWADDR=00:10:18:1C:51:EA LAST_CONNECT=1394124754 DEVICE=Auto_p3p1 USERCTL=no |
First of all I am very thankful to all in giving reply to my query.
If I do chkconfig NetworkManager off and reboot the node. Will changing of em1 to Auto_em1 and again Auto_em1 to em1 will be stopped ? OR in parallel with above activity should I remove the file /etc/udev/rules.d/70-persistent-net.rules and reboot the node and makesure the em1 should be em1 and em2 should be em2 instead of Auto_em1 and Auto_em2 under the file /etc/udev/rules.d/70-persistent-net.rules ? What should I do ? Should I do both activities or only first ? ====================================================================================== ====================================================================================== In parallel I installed a new RHEL 6.3 and run the chkconfig NetworkMonitor off and reboot the node then I am not able to see the file ( /etc/udev/rules.d/70-persistent-net.rules). See the below for reference: # pwd /etc/udev/rules.d # ls -l total 48 -rwxr-xr-x. 1 root root 708 Mar 8 18:27 40-VxVM.rules -r--r-----. 1 root root 187 Oct 22 02:21 45-disk_reservation.rules -rw-r--r--. 1 root root 1652 Aug 25 2010 60-fprint-autosuspend.rules -rw-r--r--. 1 root root 1060 Jun 29 2010 60-pcmcia.rules -rw-r--r--. 1 root root 316 Apr 6 2012 60-raw.rules -rwxr-xr-x. 1 root root 1066 Oct 23 17:43 60-vxca.rules -rw-r--r--. 1 root root 1406 Mar 8 17:29 70-persistent-cd.rules -rw-r--r--. 1 root root 320 May 9 2012 90-alsa.rules -rw-r--r--. 1 root root 83 Apr 1 2011 90-hal.rules -rw-r--r--. 1 root root 53 Oct 21 2011 91-drm-modeset.rules -rw-r--r--. 1 root root 292 May 25 2012 98-kexec.rules -rw-r--r--. 1 root root 54 Nov 3 2011 99-fuse.rules But the same file exist on my LIVE node. See the result of my LIVE node # pwd /etc/udev/rules.d # ls -l total 52 -rwxr-xr-x 1 root root 708 Mar 5 18:02 40-VxVM.rules -r--r----- 1 root root 187 Oct 22 02:21 45-disk_reservation.rules -rw-r--r--. 1 root root 1652 Aug 25 2010 60-fprint-autosuspend.rules -rw-r--r--. 1 root root 1060 Jun 29 2010 60-pcmcia.rules -rw-r--r--. 1 root root 316 Apr 6 2012 60-raw.rules -rwxr-xr-x 1 root root 1066 Oct 23 17:43 60-vxca.rules -rw-r--r--. 1 root root 1406 Mar 5 12:21 70-persistent-cd.rules -rw-r--r-- 1 root root 1504 Mar 7 02:01 70-persistent-net.rules -rw-r--r--. 1 root root 320 May 9 2012 90-alsa.rules -rw-r--r--. 1 root root 83 Apr 1 2011 90-hal.rules -rw-r--r--. 1 root root 53 Oct 21 2011 91-drm-modeset.rules -rw-r--r--. 1 root root 292 May 25 2012 98-kexec.rules -rw-r--r--. 1 root root 54 Nov 3 2011 99-fuse.rules # cat 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 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:40", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_em1" # PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:17:95:38:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p1p2" # PCI device 0x14e4:0x1659 (tg3) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:18:1c:51:ea", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p3p1" # PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:42", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_em2" # PCI device 0x14e4:0x1639 (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:e8:2e:ab:40", ATTR{type}=="1", KERNEL=="eth*", NAME="em1" # PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:17:95:38:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="Auto_p1p1" ================================================================ ================================================================ Please Advise. |
That's really odd about the new install; check the other dir with the ifcfg-* files.
Assuming you've got NetworkManager (not monitor) turned off, try manually setting up one NIC and plugging it in and bringing it up. |
That's really odd about the new install; check the other dir with the ifcfg-* files.
Whats odd ? ======================== Assuming you've got NetworkManager (not monitor) turned off, try manually setting up one NIC and plugging it in and bringing it up. Yes the same I did and seems the problem resolved. What could be the necessary things we need to configure manually in the ifcfg-em* file. |
These links may help
http://www.sysarchitects.com/em1_to_eth0 http://linux.dell.com/files/whitepap...g_in_linux.pdf Interestingly enough, I didn't have to do anything special on my Centos 6.5 system to get eth style names. |
All times are GMT -5. The time now is 05:07 AM. |