This is the config on /etc/sysconfig/network-scripts/ifcfg-eth0:


and also resolv.conf:


Now I don't have ping and cant wget google.com:

From x.x.x.y icmp_seq=1 Destination Net Unreachable


# curl http://google.com
curl: (6) Couldn't resolve host 'google.com'


# nslookup google.com
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached

# dig ns.google.com @

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 <<>> ns.google.com @
;; global options: +cmd
;; connection timed out; no servers could be reached

closed as unclear what you're asking by roaima, Jeff Schaller, Isaac, Thomas, telcoM Jan 20 at 12:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you ping your gateway?? Are your Gateway and your static IP address in the same subnet and Address Class? – eyoung100 Mar 12 '16 at 6:10
  • Yes I can ping the gateway...Yes they are.. IP:a.a.a.a Gateway:a.a.a.b – MLSC Mar 12 '16 at 6:12
  • I'm assuming here since you are being rather vague, that your Gateway is a.a.a.1, which means your IP address should be a.a.a.x where x is between 2 and 254. Am I still correct? – eyoung100 Mar 12 '16 at 6:21
  • Yes. You are correct//// – MLSC Mar 12 '16 at 6:25
  • 1
    Can you see your default route in ip -d route? – Rui F Ribeiro Mar 12 '16 at 7:04

As was mentioned already in the comments, you should check your default route. This can be achieved with e.g. $ ip r. You should see something like this:

$ ip r
default via dev eth1 dev eth1  proto kernel  scope link  src dev eth1  scope link  metric 1001

Note: The default value could also be indicated with an address of

Should you find that you're missing the default route from your system, do

$ ip r add default via dev eth1

Obviously, you should replace your own values for the IP address of your Router/Gateway and the dev argument (eth1) as the name of your desired interface name.


Should probably be a comment, but is just too long. This is meant to be the start of a network troubleshooting check list, please add/correct as needed.

This are symptoms of a hosed setup. Please check the manual pages of the commands mentioned.

Check the cables are firmly set, see if the idiot lights (if available) blink on both ends.

What does ip link list say? Any NO CARRIER means a card that isn't connected. If your card isn't listed, it is probably broken.

What does ip route list say?

Ask nmcli what it thinks about the setup (it has lots of functions, check it's manual). Check at least nmcli g, nmcli d, and nmcli c

nm-online should try to set up networking, if it doesn't it might give some more information.


I faced the same issue, My problem was typo in gateway ip insted of "" it was "" after correcting it got fixed.


since the DNS is not accessible the problem cannot be grounded,

Try pinging dns


If it is pinging then the issue is that either you need configure some proxy or gateway or need to avail some additional settings to access dns from your service provider With above stated issue it actually should not work, So ping your gateway

ping x.x.x.y (your gateway ip address)

in case, if it is pinging then you need to do traceroute/tracepath to gateway

in linux traceroute x.x.x.y (your gateway ip)

in windows tracert x.x.x.y

Normally the issue can be tracked here if your gateway is not getting pinged(if it keeps on showing asterisk signs then your gateway is not accessible) If it is showing that it is reaching the gateway in somehops

try traceroute

Here you'll know the ip which is actually troubling you. Based on that we can conclude, what you need to configure additionally

Not the answer you're looking for? Browse other questions tagged or ask your own question.