Persist IP address alias across reboots in CentOS/RHEL 6 using "ip" command

prl77 asked:

I’ve always used the ifcfg-eth0:1 alias files to create additional addresses. However, in recent rhel documentation, it states that:

As the ip command of the iproute package now supports assigning multiple address to the same interface it is no longer necessary to use this method of binding multiple addresses to the same interface.

Furthermore, numerous answers and comments on this site mention that ifconfig is deprecated and that “ip” should be used instead. I’m fine using it for live changes, but how do I persist the changes across reboots without using the alias files?

My answer:

Put them in /etc/sysconfig/network-scripts/ifcfg-eth0, with a 2 or 3 etc. after them, such as:


Unfortunately this seems to be undocumented (or I can’t find it right now; it looks like Red Hat rearranged their web site yet again).

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.