I have multiple identical appliances runing CentOS 7 with four on-board NICs. To maintain a similar feel to an older version of the appliance running RHEL6 (i.e.,
ethX), I want to use the network naming scheme used by RHEL6. I also want to minimize the number of changes required after creating a generic system disk for use on each appliance.
If I understand the naming scheme in CentOS 7, the naming scheme is consistent based on hardware location so if the hardware is identical, I'll have the same network interface names for each instance of the appliance.
Due to customer demands, I need to make the appliance's network interfaces have the same name on the CentOS 7 and RHEL6 versions.
One approach is to extend the kernel command line with
net.ifnames=0 as described here and then create my own
ifcfg-ethX files. However, as near as I can tell, doing so requires manual modification of the configuration file. This is further complicated by the legacy ordering being fixed but arbitrary so I would have to modify these files for each system. :-/
One thought I had was to use the CentOS 7 naming scheme but then add an alias to each so that the arbitrary naming scheme could by applied based on hardware location. Is it possible to do this?
Any other ideas on how I can get two names to the same device and IP address?
NOTE: I am not asking how to add multiple IP addresses to the same device which is fairly straightforward.
EDIT: I really need to rename it but would like to do so programatically.