NIC named ETH0

Issues related to configuring your network
Post Reply
smpoole7
Posts: 85
Joined: 2009/01/16 17:08:46
Contact:

NIC named ETH0

Post by smpoole7 » 2018/11/13 19:33:17

OK, been Googlin' and trying different things for a while and I'm stumped. I installed CentOS from a live image, so I had the NetworkManager when I started up. I disabled it and edited the if-xxx config files. (Network Manager wants to undo everything that I require, including dnsmasq doing DNS "spoofing.")

One of the brain-dead, insane pieces of software that I need to install (it's a proprietary, "binary blob") wants the name "eth0" for the interface, and ifcfg-eth0, ifup-eth0, etc. in /etc/sysconfig/network-scripts. First, my vitals ...

Code: Select all

[root]# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 
[root]# uname -a
Linux mail.site.tld 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
My most recent Google took me back here, to the thread viewtopic.php?t=55551&start=10. I had already followed the links suggested in that thread. I've done the ifcfg-eth0 stuff (I had to create the files), and I've added the line in rules.d. See below.

Code: Select all

[root]# cat 70-persistent-net.rules 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="08:00:27:bb:c3", ATTR{type}=="1", KERNEL=="eth", NAME="eth0"

[root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
GATEWAY=192.168.1.254
PEERDNS=no
IPV6INIT=no
BROWSER_ONLY=no
HWADDR=08:00:27:BB:C3:CE
DNS2=8.8.8.8
PROXY_METHOD=none
DNS1=127.0.0.1
IPV6_ADDR_GEN_MODE=stable-privacy
NAME="eth0"
BOOTPROTO=none
IPV6_FAILURE_FATAL=no
TYPE=Ethernet
PREFIX=24
AUTOCONNECT_PRIORITY=-999
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPADDR=192.168.1.230
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
ONBOOT=yes
DNS3=8.8.4.4
... and after reboot, I still see:

Code: Select all

[root]# ifconfig                                                                                                                   
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500                                                                              
        inet 192.168.1.230  netmask 255.255.255.0  broadcast 192.168.1.255                                                                
        inet6 fe80::a00:27ff:febb:c3ce  prefixlen 64  scopeid 0x20<link>                                                                  
        inet6 2602:301:7780:6f70:a00:27ff:febb:c3ce  prefixlen 64  scopeid 0x0<global>                                                    
        ether 08:00:27:bb:c3:ce  txqueuelen 1000  (Ethernet) ... (snip)


By the way, I've disabled IPV6 and selinux as well. (Also required by the brain dead software.) I'm about to blow up this install and just redo with the regular DVD, minimal server option. That has worked for me on other installs. If you see anything wrong in those files, point it out to me and thanks a million.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: NIC named ETH0

Post by TrevorH » 2018/11/13 21:27:15

It's in the CentOS 7 FAQ: append net.ifnames=0 biosdevname=0 to your kernel command line (and to the installer kernel command line if you want it this way from the start) and it will use the old style naming.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

smpoole7
Posts: 85
Joined: 2009/01/16 17:08:46
Contact:

Re: NIC named ETH0

Post by smpoole7 » 2018/11/14 00:46:23

Thanks, Trevor. I forgot to mention that above, but I've done that.

Code: Select all

[root]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
I ran grub-config, and I saw that line in the output, so I believe it's active:

Code: Select all

linux16 /boot/vmlinuz-3.10.0-862.14.4.el7.x86_64 root=UUID=9446f7bf-11e4-4511-9460-c15575148cd8 ro rhgb quiet net.ifnames=0 biosdevname=0
Like I said, I hate it, but I think I just need to reinstall without Network Manager. I think that's what hosed me.

smpoole7
Posts: 85
Joined: 2009/01/16 17:08:46
Contact:

Re: NIC named ETH0

Post by smpoole7 » 2018/11/14 05:07:51

OK, after a full reinstall, and following (again) the directions on changing /etc/default/grub and re-running grub2-mkconfig. I disabled the horrible NetworkManager (gag) and enable "network" with systemctl, and of course, I renamed the ifcfg- file to "ifcfg-eth0."

It works now.

I don't know if it was something from the Live DVD that I used the first time, but there was no ifcfg-enus03 (or whatever it was) file in /etc/sysconfig/network-scripts when I installed from the live DVD. I created one, but apparently couldn't get the network system to see it.

This time, doing a minimal install from the full DVD ISO, it was in there. I edited the "DEVICE=" line to say "eth0" and renamed it to ifcfg-eth0. She happy. We happy.

Thanks again.

Post Reply