CentOS and Fedora (25 and earlier)

Step 1: Create the config file

First, make a copy of the source file so that you have a backup copy:

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bkp

Step 2: Edit the config file

You can now modify the eth0 file in order to replace the IP:

nano /etc/sysconfig/network-scripts/ifcfg-eth0
Append the following to the end of the file

IPADDR2=First IP Address
NETMASK2=255.255.255.255
IPADDR3=Next IP Address
NETMASK3=255.255.255.255
IPADDR4=Next IP Address
NETMASK4=255.255.255.255
IPADDR5=Next IP Address
NETMASK5=255.255.255.255

Step 3: restart network service

service network restart

 

Hasznosnak találta ezt a választ? 0 A felhasználók hasznosnak találták ezt (0 Szavazat)