1

usually i create /etc/sysconfig/network-scripts/ifcfg-eth0:1 and /etc/sysconfig/network-scripts/ifcfg-eth0:2 but i seen in internet that it is deprecated using eth0 :1

so what can i use to the VPS use the additional IPs?

usually my files was:

DEVICE=eth0
BOOTPROTO=static
IPADDR=164.132.193.xxx
NETMASK=255.255.255.255
ONBOOT=yes
GATEWAY=164.132.192.1 

and the new ones

in ifcfg-eth0:1

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=91.134.28.xxx
NETMASK=255.255.255.255
ONBOOT=yes

and in ifcfg-eth0:2 :

DEVICE=eth0:2
BOOTPROTO=static
IPADDR=91.134.158.xxx
NETMASK=255.255.255.255
ONBOOT=yes

how should i do now? to use the additional IPs since that is deprecated?

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

but i don't know the additional ip gateways...

DiogoSaraiva
  • 389
  • 3
  • 16

1 Answers1

2

It's actually super simple. Try something like:

DEVICE=eth0
BOOTPROTO=static
IPADDR=164.132.193.xxx
IPADDR2=91.134.28.xxx
IPADDR3=91.134.158.xxx
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=164.132.192.1 
Dok
  • 1,110
  • 1
  • 7
  • 13