centos7 network configuration
$ vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
BOOTPROTO=static #static ip
ONBOOT=yes #boot start
IPADDR=192.168.2.186 #ip address
NETMASK=255.255.0.0 #Subnet mask
GATEWAY=192.168.1.10 #Gateway
dns settings
$ vim /etc/resolv.conf
nameserver 192.168.1.10
nameserver 8.8.8.8
nameserver 8.8.4.4
restart the network
$ service network restart