CentOS :: Add Additional IP(s)
Posted by , Last modified by on 13 May 2012 02:21 AM
In this Example we are using a minimal install of CentOS 6.2. The most basic setup and the one we typically install
First, Login as root
change directory to where the network interfaces are located
Just verify what adapters are in this directory (by issuing a ls) as some servers have more then one Ethernet card. In this example we only have one and we are concerned with ifcfg-eth0
Verify the Adapter (ifcfg-eth0) setting by viewing (cat/more/less) the file. We are just making sure there are the most basic settings because we are going to use this one as a template for the other bound IP's. Please also verify the netmasking in your configuration making sure its setup properly. In this example we are using a /29 so it will be 255.255.255.248
For this example ill be adding 3 more ip addresses. For each IP you will need a config file for this. Since ifcfg-eth0 is taken the would be numbered accordingly:
cp ifcfg-eth0 ifcfg-eth0:0
The entries we need to change are the DEVICE="" and IPADDR=""
The modified entries are below:
After this has been done, issue a service network restart; then ping one of the ips you added, if you have done everything correctly it will ping.
As always if you have additional questions please EMail support.