Jump to content
Sign in to follow this  
brent

How to set a static IP in Centos7

Recommended Posts

navigate to the following location.

/etc/sysconfig/network-scripts/

in this location you will find your NIC file. modify the file with your editor of choice.

BOOTPROTO=dhcp

To:

BOOTPROTO=static

Now you'll need to add the entries to set not only the IP address, but the netmask, gateway, and DNS addresses. At the bottom of that file, add the following:

IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=1.0.0.1
DNS2=1.1.1.1
DNS3=8.8.4.4

Save the file

restart networking

sudo systemctl restart network

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×