Updated: February 8th, 2017

Today I was setting up a new machine (running OpenSUSE 12.1, but it's not really important), and after switching the network configuration from DHCP to static IP, lost all connectivity, in and out. /etc/init.d/network restart seemed to list the right IP, yet I was getting

"unknown host"


"Network is unreachable"

errors while pinging. I double and triple checked all the settings – DNS and gateway were set up right. I even rebooted, but nothing worked.

Then I vaguely remembered that I ran into the same issue a few years prior and also spent hours trying to figure out what was going wrong. The solution was so incredibly simple that my geek cred should have been docked 10 points. But what was it?.. And then it finally hit me.

Let's see… check ifconfig… yup, the network interface has no IP even though I set it and it even showed up during the network restart command.

ifup eth0

Check ifconfig again – there it goes, and the network is finally operational. Damn you, whoever wrote the network start script, for not dealing with this situation properly or at least issuing a warning that the interface was not up.

Hopefully, I won't have to waste time solving this problem next time it occurs, if I remember that I already blogged about it. Perhaps it will save you some time too.

● ● ●
Artem Russakovskii is a San Francisco programmer and blogger. Follow Artem on Twitter (@ArtemR) or subscribe to the RSS feed.

In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.

  • Djay


    I am facing a similar issue as you have mentioned above but there is a slight difference –

    my problem is that on subnet is pingable from my linux host but others aren't.
    i.e my linux host has an ip 172.23.130.xx
    all IP series in this range i.e. 130.xx range are pingable both ways.

    BUT, all IPs or eg. 172.24.134.xx series are shown as "netowrk is unreachable"

    is there a way to fix this please?
    i am using RHEL5 32-bit OS.


  • Auto Credit Bad Loans

    Thanks for sharing great articles.

  • Artem Russakovskii your article is life saving for me; it redirects the conversation, spotlighting scientific innovators working to improve people’s lives. The result is more than a portrait of brilliant minds—it’s a reminder of the infinite possibilities for doing well when we tap into our own empathy and wisdom.

  • Artem Russakovskii, you deserve praise keep up the good work, will look forward for your future work!

  • Thanks for sharing valuable information.

  • Luke

    I have done all the above but still cant work.