Configuring secondary IPv4 on Linux CentOS 7.

shape
shape
shape
shape
shape
shape
shape
shape

In today’s tutorial, I’m going to show you how to configure a secondary IP on Linux CentOS 7. In two previous posts, I talked a bit about using two IPs on the same interface, I showed you how to configure it on Windows and Linux Ubuntu, and today I want to show you this same configuration for Linux CentOS 7. If you want to know more about using two IPs on the same interface, and learn how to configure it on Ubuntu and Windows, check out my other two posts at the links below.

https://blog.masterdaweb.com/windows-server/configurar-segundo-endereco-ipv4-na-placa-de-rede-windows/
https://blog.masterdaweb.com/linux-2/configurar-segundo-endereco-ipv4-na-placa-de-rede-linux/

In CentOS we have a utility called nmtui, using this utility it becomes extremely simple and fast to configure your secondary IP, when using it a graphical interface is opened to perform the configuration, in the command terminal type nmtui

# O comando abaixo abre o utilitário de configuração de rede.
nmtui
After opening nmtui, select the Edit a connection option to configure the secondary IP.
In connection editing, choose the network interface you want to configure, in my case the interface is eth0, once you have selected the interface, go to the edit option.
Follow the steps shown in the image above to configure your secondary IP address. Once configured, go to the ok option at the bottom of the screen and confirm your configuration, then exit the configuration utility.

Use the systemctl restart network command to restart the network service.

# Comando para reiniciar o serviço de rede.
systemctl restart network

Your secondary IP is now configured in CentOS.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest news

Latest news directly from our blog.