How to add a secondary or extra IP in CentOS 7 using nmtui

nmtui (Network Manager Text user interface) is a command line program available in RHEL/CentOS 7 to configure IP address. This is a text based UI which allows you to add IP addresses to your server's network interfaces.

To install nmtui, run

yum install NetworkManager-tui -y

If it wasn't already installed you will need to start the NetworkManager by running:

[[email protected] ~]# systemctl start NetworkManager

The simply run command nmtui to open the user interface:

[[email protected] ~]# nmtui

 

nmtui

hit enter under "Edit a connection":

nmtio 1

Select the desired connection, move using the arrows or tab to edit and hit enter:

nmtui

Now, say we want to add IP 10.10.10.18 to the eth0 interface, we move down to IPv4 CONFIGURATION, right under Addresses we go to <Add...> then hit enter and simply enter the desired IP address:

nmtio

We then go all the way down and hit enter on OK:

nmtui

We can then go back and then Quit:

Once we're back in the linux shell we simply restart the network interface by running:

systemctl restart network

 

 

  • centos 7, extra IP, secondary IP
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

ownCloud Auto Install Script on Debian 7

Here is an easy way to install ownCloud on Debian 7 with a script, but first, for those who...

NGINX – Allow access only to certain IPs

Nginx has a nice module that not many people know about, it basically enables us...

How to configure NTP client in CentOS

What's NTP? NTP stands for Network Time Protocol, and it is an Internet protocol used to...

Initial Server Setup on CentOS 6

Here are some recommendations to setup your VPS or server when you first get it, some of these...

How To Install nginx on CentOS

What is NGINX? Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP,...