Adding a new IP to a Redhat Linux system
- April 17th, 2010
- Write comment
Copy an existing configuration file
Head into the directory housing the config scripts:
cd /etc/sysconfig/network-scripts
And create a duplicate from an already working entry:
cp ifcfg-eth0 ifcfg-eth0:1
Amend the new file
Open the file for editing:
nano ifcfg-eth0:1
Alter the IP address, subnet mask etc as required, it’ll look a little like this:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:25:64:3B:3F:DF
IPADDR=212.84.187.130
NETMASK=255.255.255.248
ONBOOT=yes
Bring the new interface up
Simply run:
ifup eth0:1