Dear Folks,
After replacing the second network card with a new one, NetworkManager refuses to listen to the startup scripts (shown below). It always calls the new interface eth2, not eth1.
1. Where does NetworkManager hold its definitions of network interfaces?
2. Does the UUID have something to do with my problem? How does this get generated? Should I uses uuidgen to make a new one for eth1?
I would really like to understand NetworkManager, but it makes things more complicated for me on this machine.
$ ls /etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-lo
$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Networking Interface DEVICE=eth0 BOOTPROTO=none HWADDR=00:24:1D:1F:7E:77 ONBOOT=yes TYPE=Ethernet NM_CONTROLLED=yes USERCTL=no IPV6INIT=no IPADDR=192.168.0.1 NETMASK=255.255.255.0 PREFIX=24 NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
$ cat /etc/sysconfig/network-scripts/ifcfg-eth1 # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. DNS1=192.168.0.1 DOMAIN=optusnet.com.au DEVICE=eth1 BOOTPROTO=dhcp TYPE=Ethernet # My old card that I replaced 2009-09-13 # HWADDR=00:d0:b7:5c:25:58 HWADDR=00:B0:C4:02:D5:FD ONBOOT=yes USERCTL=no IPV6INIT=no NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 PEERDNS=no PEERROUTES=yes
I am now using Fedora 12; the same problem existed with Fedore 11.
I fixed things after boot with: /sbin/ip link set down dev eth2 /sbin/ip link set name eth1 dev eth2 /sbin/ifup eth1
So now (until next reboot) I have:
$ ip link ls dev eth1 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:b0:c4:02:d5:fd brd ff:ff:ff:ff:ff:ff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 25 Nov 2009, Nick Urbanik wrote:
After replacing the second network card with a new one, NetworkManager refuses to listen to the startup scripts (shown below). It always calls the new interface eth2, not eth1.
- Where does NetworkManager hold its definitions of network interfaces?
Edit: /etc/udev/rules.d/70-persistent-net.rules
Delete line ending with NAME="eth1" Rename line ending with NAME="eth2" to NAME="eth1" Reboot.
Gabriel
- --
// Gabriel VLASIU // // OpenGPG-KeyID : 0xE684206E // OpenGPG-Fingerprint: 0C3D 9F8B 725D E243 CB3C 8428 796A DB1F E684 206E // OpenGPG-URL : http://www.vlasiu.net/public.key
On Wed, 25 Nov 2009 06:26:09 +1100 Nick Urbanik wrote:
I would really like to understand NetworkManager, but it makes things more complicated for me on this machine.
For a change this particular problem has nothing to do with NetworkManager :-). Look in /etc/udev/rules.d/ for a file named something like 70-persistent-net.rules
It has a udev rule fixing the ethernet interface name based on the MAC. If you replace a NIC, the name always gets changed until you edit this file and remove the old interface and change the named of the new interface (and reboot).
Dear Gabriel, Tom and Dennis,
Thank you very much for your helpful replies.
On 24/11/09 22:47 +0200, Gabriel VLASIU wrote:
On Wed, 25 Nov 2009, Nick Urbanik wrote:
After replacing the second network card with a new one, NetworkManager refuses to listen to the startup scripts (shown below). It always calls the new interface eth2, not eth1.
- Where does NetworkManager hold its definitions of network interfaces?
Edit: /etc/udev/rules.d/70-persistent-net.rules
Delete line ending with NAME="eth1" Rename line ending with NAME="eth2" to NAME="eth1" Reboot.
Thank you very much. My own problem is solved, but my understanding is incomplete.
Now I need to find the documentation for this and read it. There is not a huge amount of detail here: file:///usr/share/doc/udev-145/writing_udev_rules/index.html#example-netif
Why does this override the /etc/sysconfig/network-scripts/ifcfg-eth*? And since it does, the jurisdiction of the ifcfg-eth* scripts seems encroached.
It seems confusing to me.
I need to understand how this gets written. I suppose I need to read the startup scripts and try to understand the division of labour between NetworkManager, udev and /etc/sysconfig/network-scripts/*.
I wish there was documentation that shows how these all coexist and cohere together. Does such documentation exist?