Bug 1121435 - Can't rename network device back to eth0.
Summary: Can't rename network device back to eth0.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: biosdevname
Version: 20
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Praveen K Paladugu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 00:13 UTC by Amadeus W.M.
Modified: 2014-07-22 14:16 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-22 14:16:18 UTC


Attachments (Terms of Use)

Description Amadeus W.M. 2014-07-21 00:13:36 UTC
Description of problem:

Can't rename network device back to eth0.

Version-Release number of selected component (if applicable):
systemd-208-19.fc20.x86_64

How reproducible:
Try to do any of the alternatives described here:
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/


Steps to Reproduce:

1. Try to mask udev rules from /usr/lib/udev/rules.d by creating links to /dev/null in /etc/udev/rules.d:

[root@phoenix ~]# ls -l /etc/udev/rules.d/
total 8
lrwxrwxrwx. 1 root root   9 Jul 20 13:52 60-net.rules -> /dev/null
-rw-r--r--. 1 root root 151 Jul  6 20:31 70-persistent-net.rules
lrwxrwxrwx. 1 root root   9 Jul 20 10:36 80-net-name-slot.rules -> /dev/null
-rw-r--r--. 1 root root 352 Apr  3 04:36 98-kexec.rules

Reboot, no eth0.

2.

Boot with net.ifnames=0:

[root@phoenix ~]# dmesg | grep net.ifnames
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.15.6-200.fc20.i686+PAE root=UUID=aa696c85-f1d4-4bf3-9a93-b011ec8e9a6a ro vconsole.font=latarcyrheb-sun16 rhgb quiet net.ifnames=0

Still no eth0.

3.

Remove biosdevname alltogether:

[root@phoenix ~]# rpm -q biosdevname
package biosdevname is not installed

Still no eth0.

4. Disable NetworkManager.service and enable and start network.service, to rule out any NetworkManager problems: 

[root@phoenix ~]# systemctl is-enabled NetworkManager.service 
disabled
[root@phoenix ~]# systemctl status network.service 
network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: active (exited) since Sun 2014-07-20 19:40:56 EDT; 28min ago
  Process: 602 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Jul 20 19:40:44 phoenix systemd[1]: Starting LSB: Bring up/down networking...
Jul 20 19:40:50 phoenix network[602]: Bringing up loopback interface:  [  OK  ]
Jul 20 19:40:56 phoenix network[602]: Bringing up interface eth0:  [  OK  ]
Jul 20 19:40:56 phoenix systemd[1]: Started LSB: Bring up/down networking.
Hint: Some lines were ellipsized, use -l to show in full.

No eth0.



Actual results:[root@phoenix ~]# /sbin/ifconfig
em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.40  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20c:f1ff:febc:29fe  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:f1:bc:29:fe  txqueuelen 1000  (Ethernet)
        RX packets 209  bytes 28736 (28.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 230  bytes 53448 (52.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 4  bytes 240 (240.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 240 (240.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



Expected results:

em1 should be eth0.


Additional info:

[root@phoenix ~]# uname -a
Linux phoenix 3.15.6-200.fc20.i686+PAE #1 SMP Fri Jul 18 03:01:10 UTC 2014 i686 i686 i386 GNU/Linux

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-07-21 02:11:06 UTC
em1 is a biosdevname. If you see it, it means that you probably have some biosdevname rules installed (/lib/udev/rules.d/71-biosdevname.rules?).

Comment 2 Harald Hoyer 2014-07-22 08:48:56 UTC
or your /etc/sysconfig/network-scripts/ifcfg-* have the MAC and "em1" name configured

Comment 3 Amadeus W.M. 2014-07-22 12:40:52 UTC
[root@phoenix ~]# rpm -q biosdevname
package biosdevname is not installed

[root@phoenix ~]# ls /lib/udev/rules.d/71*
/lib/udev/rules.d/71-seat.rules
[root@phoenix ~]# 


After a discussion on the fedora general discussion list it turned out that I did not have DEVICE=eth0 in my ifcfg-eth0 file. I did have though NAME=eth0 and I thought that was sufficient. Once I added DEVICE=eth0, the name did change. Here is my ifcfg-eth0 now:


[root@phoenix ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0"
UUID="8b3948d3-4447-4016-8d24-1e26f65a3008"
ONBOOT="yes"
HWADDR=00:0C:F1:BC:29:FE
IPADDR=192.168.1.40
PREFIX=24
GATEWAY=192.168.1.1
DNS1=192.168.1.1
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
DEVICE=eth0                        # <=== original did not have this
NM_CONTROLLED=no


The ifcfg-eth0 was copied from ifcfg-em1 which was automatically generated and edited by me in the current form. Perhaps the DEVICE option should generated by whatever creates ifcfg-em1, because this is something obscure and easy to miss.

So this ticket can be closed.


Note You need to log in before you can comment on or make changes to this bug.