Hello,
I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 stopped working as expected. Kernel started to give the message below:
kernel: udev: renamed network interface eth2 to eth2-eth1
There is no any eth2 or eth2-eth1 in /etc/sysconfig/network-scripts/. I really don't know where it is coming from.
config -a:
eth0 Link encap:Ethernet HWaddr 52:54:00:E0:5A:C5 inet addr:10.0.0.32 Bcast:10.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8293 errors:0 dropped:0 overruns:0 frame:0 TX packets:6440 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:831687 (812.1 KiB) TX bytes:6358220 (6.0 MiB)
eth1 Link encap:Ethernet HWaddr 52:54:00:B5:B6:D1 inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:934 (934.0 b) TX bytes:462 (462.0 b)
eth2-eth1 Link encap:Ethernet HWaddr 52:54:00:B5:B6:D1 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)
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:37 errors:0 dropped:0 overruns:0 frame:0 TX packets:37 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3642 (3.5 KiB) TX bytes:3642 (3.5 KiB)
And below is /etc/udev/rules.d/70-persistent-net.rules:
# net device () (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:e0:5a:c5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# net device () SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:b5:b6:d1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
Here is the relevant excerpt from the xml on the host: <interface type='bridge'> <mac address='52:54:00:e0:5a:c5'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='bridge'> <mac address='52:54:00:b5:b6:d1'/> <source bridge='br1'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface>
I really don't understand what is really going on. I would appreciate any help hint.
All the best.
Vreme: 11/05/2011 01:10 AM, Mufit Eribol piše:
Hello,
I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 stopped working as expected. Kernel started to give the message below:
kernel: udev: renamed network interface eth2 to eth2-eth1
There is no any eth2 or eth2-eth1 in /etc/sysconfig/network-scripts/. I really don't know where it is coming from.
Your eth1 is being automaticaly renamed to eth2-eth1 for some reason. Have you changed anything in config(s) connected to eth1?
Are name and device name in ifcfg-ethX consistent? Have you reshufled your configs and left loose end somewhere?
Do you maybe have NetworkManager still active?
On 11/04/11 5:32 PM, Ljubomir Ljubojevic wrote:
Do you maybe have NetworkManager still active?
is there any documentation on how to work with NetworkManager in shell-only mode? the RHEL manuals I looked at all seemed to assume you're running a GUI console, which I never do on my servers.
On Fri, 04 Nov 2011 17:42:03 -0700 John R Pierce pierce@hogranch.com wrote:
is there any documentation on how to work with NetworkManager in shell-only mode? the RHEL manuals I looked at all seemed to assume you're running a GUI console, which I never do on my servers.
I'd recommend the same treatment for network manager as we used for sendmail all those years back: # yum -y remove NetworkManager
And then configure your network the old, verified, stable and trusted way, by editing the ifcfg files. The whole idea of having something running on a *server* that can change your networks settings for whatever reason is horribly wrong.
To answer your question, there exist something called nm-cli, but I found it to be not of much use.
On 11/04/11 6:29 PM, Jure Pečar wrote:
I'd recommend the same treatment for network manager as we used for sendmail all those years back: # yum -y remove NetworkManager
And then configure your network the old, verified, stable and trusted way, by editing the ifcfg files. The whole idea of having something running on a *server* that can change your networks settings for whatever reason is horribly wrong.
great. how do I do dhcp (client) without NetworkManager ? Most all my lab servers are configured via DHCP reservations.
and where IS the docs on what-all goes in ifcfg-eth0 or whatever now days? again, the RHEL6 manuals seem to skip over these details.
John R Pierce wrote:
On 11/04/11 6:29 PM, Jure Pečar wrote:
I'd recommend the same treatment for network manager as we used for sendmail all those years back: # yum -y remove NetworkManager
And then configure your network the old, verified, stable and trusted way, by editing the ifcfg files. The whole idea of having something running on a *server* that can change your networks settings for whatever reason is horribly wrong.
great. how do I do dhcp (client) without NetworkManager ? Most all my lab servers are configured via DHCP reservations.
and where IS the docs on what-all goes in ifcfg-eth0 or whatever now days? again, the RHEL6 manuals seem to skip over these details.
BOOTPROTO=dhcp
it's documented same as in previous versions in /usr/share/doc/initscripts-*/sysconfig.txt
Vreme: 11/05/2011 02:52 AM, John R Pierce piše:
On 11/04/11 6:29 PM, Jure Pečar wrote:
I'd recommend the same treatment for network manager as we used for sendmail all those years back: # yum -y remove NetworkManager
And then configure your network the old, verified, stable and trusted way, by editing the ifcfg files. The whole idea of having something running on a *server* that can change your networks settings for whatever reason is horribly wrong.
great. how do I do dhcp (client) without NetworkManager ? Most all my lab servers are configured via DHCP reservations.
and where IS the docs on what-all goes in ifcfg-eth0 or whatever now days? again, the RHEL6 manuals seem to skip over these details.
Removing NetworkManager (only sane solution for server):
http://wiki.libvirt.org/page/Networking#Disabling_NetworkManager
On 05.11.2011 02:32, Ljubomir Ljubojevic wrote:
Vreme: 11/05/2011 01:10 AM, Mufit Eribol piše:
Hello,
I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 stopped working as expected. Kernel started to give the message below:
kernel: udev: renamed network interface eth2 to eth2-eth1
There is no any eth2 or eth2-eth1 in /etc/sysconfig/network-scripts/. I really don't know where it is coming from.
Your eth1 is being automaticaly renamed to eth2-eth1 for some reason. Have you changed anything in config(s) connected to eth1?
Are name and device name in ifcfg-ethX consistent? Have you reshufled your configs and left loose end somewhere?
Do you maybe have NetworkManager still active?
Thank you for the responses.
There is no NetworkManager installed.
Perhaps I should give some more info. It is a two-gateway machine. I have following lines in my rc.local:
# routing and default gateway for each interface ip route add 10.0.0.0/24 dev eth0 src 10.0.0.32 table T1 ip route add default via 10.0.0.11 table T1 ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2 table T2 ip route add default via 192.168.2.1 table T2 # regular routes ip route add 10.0.0.0/24 dev eth0 src 10.0.0.32 ip route add 192.168.2.0/24 dev eth1 src 192.168.2.2 # default gateway ip route add default via 10.0.0.11 # rules ip rule add from 10.0.0.32 table T1 ip rule add from 192.168.2.2 table T2
But again, the system was working before fine. The problematic interface is 192.168.2.2 (eth1).
In network-scripts directory, I have 2 eth configuration files, nothing else (apart from lo of course).
eth0: DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=52:54:00:E0:5A:C5 TYPE=Ethernet BOOTPROTO=none IPADDR=10.0.0.32 PREFIX=24 DNS1=127.0.0.1 #DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 PEERDNS=no
eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=52:54:00:B5:B6:D1 TYPE=Ethernet BOOTPROTO=none IPADDR=192.168.2.2 PREFIX=24 DNS1=127.0.0.1 #DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 PEERDNS=no
network: NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=www.onart.com.tr GATEWAY=10.0.0.11
Thank you for your support.
Am 05.11.2011 07:15, schrieb Mufit Eribol:
On 05.11.2011 02:32, Ljubomir Ljubojevic wrote:
Vreme: 11/05/2011 01:10 AM, Mufit Eribol piše:
Hello,
I have a CentOS 6 VM on a CentOS 6 host. This VM has two ethernet interfaces, eth0 and eth1. It was working nice. All of a sudden eth1 stopped working as expected. Kernel started to give the message below:
Hi Mufit,
renaming of interfaces most likely comes from udev rules. Find rule 70 network in /etc/udev.d/rules, it is recreated upon restart. Delete it then reboot. Maybe this helps.
Rainer