KISS Networking With CentOS 7

Home » CentOS » KISS Networking With CentOS 7
CentOS 5 Comments

Hi,

I’m currently experimenting with CentOS 7 on a couple of installations. I’m reasonably proficient with CentOS 5.x and 6.x.

I’d like to manage networking using a more traditional approach (Keep It Simple Stupid). Here’s what I tried so far, starting from a minimal install:

Install net-tools (to be able to use ifconfig).

Get rid of NetworkManager:

# yum remove NetworkManager*

Add ‘net.ifnames=0’ and ‘biosdevname=0’ to kernel boot options to name interfaces eth0, eth1, etc.

Edit ‘/etc/sysconfig/network-scripts/ifcfg-eth{0,1}’ like I did under previous versions.

Eventually, edit ‘/etc/udev/rules.d/70-persistent-net.rules’ to switch interfaces:

# /etc/udev/rules.d/70-persistent-net.rules
#
# eth0
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, \
ATTR{address}==”00:1e:c9:42:84:7b”, ATTR{type}==”1″, \
KERNEL==”eth*”, NAME=”eth0″
# eth1
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, \
ATTR{address}==”00:30:f1:6a:2f:40″, ATTR{type}==”1″, \
KERNEL==”eth*”, NAME=”eth1″

So far, no way to bring either eth0 or eth1 up. What am I doing wrong here? Is NetworkManager now a mandatory part of the base system? Some other mistake somewhere else? I’m a bit puzzled here.

Cheers,

Niki

Microlinux – Solutions informatiques 100% Linux et logiciels libres
7, place de l’église – 30730 Montpezat Web : http://www.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32

5 thoughts on - KISS Networking With CentOS 7

  • Le 10/02/2015 15:35, Niki Kovacs a écrit :

    I’ll answer that myself, after some more experimenting. Apparently, reverting to the traditional ethX interface naming scheme creates some unexpected behavior. I decided to keep the new persistent naming scheme
    (enp2s0 and enp3s1 on my server), and from there, everything works like expected.

    Niki


    Microlinux – Solutions informatiques 100% Linux et logiciels libres
    7, place de l’église – 30730 Montpezat Web : http://www.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32

  • No, FreeBSD names make sense, giving you an idea of what driver is being used.

    I’ve also never found FreeBSD nics to change after installation.
    That is, if the card was bge0, it stayed bge0 after reboots.

    Granted, if you move the drive to a machine with a different brand of NIC, you’ll have to edit /etc/rc.conf to reflect the new name.

    Scott Robbins PGP keyID EB3467D6
    ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
    gpg –keyserver pgp.mit.edu –recv-keys EB3467D6

  • Sorry, no, I was talking about FreeBSD. Most of what runs on boot and services are defined in /etc/rc.conf, as well as networking.

LEAVE A COMMENT