Add an extra IPv4 address Print

  • ips, ip, centos, ips not added, ip address, ip addresses
  • 0

Extra IPv4 addresses aren't configured automatically. Find the address, netmask and gateway in the control panel, and the interface name with ip a (usually eth0 or ens18).

Test it (lost on reboot):

ip addr add EXTRA_IP/NETMASK dev eth0

Ubuntu and Debian with netplan (permanent). Add the address to the addresses: list in the netplan config file (the .yaml file in the netplan folder inside etc), then run:

netplan apply

AlmaLinux and Rocky Linux (permanent). Find the connection name with the first command, then use it in the other two:

nmcli con show
nmcli con mod "CONNECTION" +ipv4.addresses EXTRA_IP/NETMASK
nmcli con up "CONNECTION"

An extra IPv4 can't become the main IP of the server.


Was this answer helpful?

« Back