User Tools

Site Tools


wiki:interface_renaming_scripts

This is an old revision of the document!


Interface Renaming Scripts Jun 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



wiki/interface_renaming_scripts.1529400961.txt.gz · Last modified: 2023/03/09 22:35 (external edit)