location of 70-persistent-net.rules in Centos 7

Centos 7 and Redhat 7 by defaults uses biosdevname

rpm -qi biosdevname-0.5.0-10.el7.x86_64
Summary     : Udev helper for naming devices per BIOS names
Description :
biosdevname in its simplest form takes a kernel device name as an
argument, and returns the BIOS-given name it "should" be.  This is necessary
on systems where the BIOS name for a given device (e.g. the label on
the chassis is "Gb1") doesn't map directly and obviously to the kernel
name (e.g. eth0).

There is one more method to control network link names in RHEL/CentOS 7 with systemd.

Create new dir if it is absent:

mkdir /etc/systemd/network

Create new rule file in it. File extension must be .link, or it will be ignored

cat /etc/systemd/network/10-lan0.link
   [Match]
   MACAddress=00:50:56:b7:65:2b

   [Link]
   Name=lan0

Create configuration file for this interface:

cat /etc/sysconfig/network-scripts/ifcfg-lan0 
   IPADDR="192.168.6.8"
   GATEWAY="192.168.6.254"
   NETMASK="255.255.255.0"
   BOOTPROTO="static"
   DEVICE="lan0"
   ONBOOT="yes"
   IPV6INIT="no"

Here systemd.link(5) you could read description how to create custom rules, there are many options for naming. Also there are some examples. Unfortunately this man page systemd.link(5) is absent in RHEL7, but is works.

Here you could read about new common naming policy of network interfaces. You may change this policy for some interfaces in system or for all interfaces.

Tags:

Udev

Centos7