Not able to connect to the internet after configuring a static ip in centos 7

Issues related to configuring your network
shan2naruto
Posts: 19
Joined: 2017/11/24 12:10:18

Not able to connect to the internet after configuring a static ip in centos 7

Postby shan2naruto » 2017/12/03 17:25:29

hi,
i have created a fresh install of centos7 and was able to change the ip through nmcli commands and after changing it i couldn't ping to google dns or gateway don't know where iḿ going wrong can anybody help me out plus i would also like to learn on how to assign static ips too.

here are the snapshots of files for the VM iḿ working on.

hi,
i have created a fresh install of centos7 and was able to change the ip through nmcli commands and after changing it i couldn't ping to google dns or gateway don't know where iḿ going wrong can anybody help me out plus i would also like to learn on how to assign static ips too.

here are the snapshots of files for the VM iḿ working on.

since iḿ using a minimal install i was not able to copy and paste code so here are some snapshots.

Image

Image

Image

Image

hunter86_bg
Posts: 1038
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Not able to connect to the internet after configuring a static ip in centos 7

Postby hunter86_bg » 2017/12/03 21:51:56

What is the output of:

Code: Select all

ip route

Code: Select all

cat /etc/sysconfig/network-scripts/ifcfg-*

sc.shan@yahoo.com
Posts: 5
Joined: 2017/11/24 03:32:05

Re: Not able to connect to the internet after configuring a static ip in centos 7

Postby sc.shan@yahoo.com » 2017/12/13 06:30:38

check the /etc/resolv.conf if the dns ip is set.

if no,edit as follows and set name server IP address:
nameserver 8.8.8.8
nameserver 8.8.4.4

pjsr2
Posts: 296
Joined: 2014/03/27 20:11:07

Re: Not able to connect to the internet after configuring a static ip in centos 7

Postby pjsr2 » 2017/12/13 15:44:55

Apart from setting the static IP address, did you configure a suitable gateway address?