Setup IP Address and Network Connection on CENTOS 7

Standard

Edit ifcfg file

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Add this

TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=62f47c6d-cf65-409f-bbd6-696db494d74c
DEVICE=eth0
ONBOOT=yes
IPADDR=73.123.136.53
NETMASK=255.255.255.248
GATEWAY=73.123.136.49
DNS1=8.8.8.8
DNS2=8.8.4.4

And then run command

service network restart

ping google.com