Interface Renaming Scripts

June 2018

For anyone that has used CentOS/Red Hat prior to version 7, or indeed other versions of Linux, the norm for network interface naming is to use eth0, eth1, eth2 etc.
CentOS 7 changed this naming convention, for two main reasons.

1. Security (knowing particular interface names is considered a security risk).
2. Deterministic Naming. While the interfaces names used have always been the same, the
mapping has been a bit hit and miss, and so on 10 identical servers, while the names are
the same, eth0 may not always be the same physical interface (like Windows it can move).

Today we are looking at a couple of scripts written by an engineer here at work (not by me). While these scripts can work very well, there are a couple of things to be aware off.
Firstly the two scripts, these are:

1. store_macaddr_mapping.sh - stores server MAC addresses for use by the rename_network_interfaces.sh script.
2. rename_network_interfaces.sh - renames the interfaces using the information generated
by store_macaddr_mapping.sh