About nixCraft

Topics

No Route to Host error and solution

Posted by Vivek Gite [Last updated: October 16, 2007]

I am getting error that read as No Route to Host. I am trying to ping my ISP gateway as well as DNS server but I am getting this error. How do I solve this problem?

This problem indicate networking conflicts or some sort of networking configuration problem.

Here are things to check:

Can you ping to your local router interface (such as 192.168.1.254)?

Make sure your card (eth0) is properly configured with correct IP address and router address. Use ifconfig command to configure IP address and route command to setup correct router address. If you prefer to use GUI tools:

Use above two GUI tools to setup correct IP address, DNS address and router address.

b) Make sure firewall is not blocking your access

iptables is default firewall on Linux. Run following command to see what iptables rules are setup:
# /sbin/iptables -L -n

You can temporary clear all iptables rules so that you can troubleshoot problem. If you are using Red Hat or Fedora Linux type command:
# /etc/init.d/iptables save
# /etc/init.d/iptables stop

If you are using other Linux distribution type following commands:
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X

c) Finally make sure you are using a router and not a proxy server. Proxy servers are good for Internet browsing but not for other work such as ftp, sending ICMP request and so on.

See also:

E-mail this to a Friend    Printable Version

You may also be interested in other helpful articles:

Discussion on This Article:

  1. CALLISTO MUPFUNYE Says:

    I’m using Redhat 7.3 and running sendmail for my email but the emails are not getting out the email server which is my linux 7.3 box and if I run the command # sendmail -v -q from the command prompt, it tries to send but with an error message saying “no route to host” ?

    SOS

  2. nixcraft Says:

    Make sure you have correct routing setup. Also check file /var/log/message for details.

    Make sure you have correct DNS setup. Finally some ISP do block access to 3rd party SMTP server to avoid spam.

    On a side note RH7.2 is outdated get latest version such as CentOS 4.x or Fedora Core.

  3. Ajayan Alphonse Says:

    hi
    very useful , my problem solved against no route to host

  4. Kumar Says:

    with regards to your suggestion “Make sure you have correct routing setup. Also check file /var/log/message for details.” above, could you tell me how to look and setup routing.
    Thanks
    Kumar

  5. Kumar Says:

    In the error logs I see this.
    bound to 192.168.0.165 — renewal in 294 seconds.

    Do I have to make any changes in the DHCP server.

    Thanks

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags: , , , , , , , , , , , , ,

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Powered by Open source software.