Add Static IP to CentOS 7

I am spinning up a few CentOS 7 Servers in preparation for a Kubernetes/OpenShift Lab I am planning on running

There are a few ways to add a Static IP to a CentOS box.  Here I will use the Network Manager TUI.


Type nmcli d to show your Interface/s – This is useful to know and will also show which Interface/s are connected


Type  nmtui


This will provide a graphical interface to edit IP and Hostnames

Select Edit a connection and OK


Select the correct Interface and select Edit


From here we can add Static (Manual) details like: IP Address, Gateway, DNS etc..

I have Ignored IPv6 and Selected Require IPv4 addressing for this connection6

OK out once you have made change and select Back to come out of the next screen


Whilst here I changed the Hostname


Once you have finished, exit out of Network Manager TUI

I restarted my Network: systemctl restart network


and checked the IP address was set correctly: ip addr show dev ens33 (Or your interface name)



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s