While trying to ping or connect a remote host I can an error “no route to host”. How can I debug this error and solve it? As we know IP networks are constructed hop by hop which means there are different intermediate routers transmit packets between two remote hosts. These routers decide the route to the destination according to their routing tables. If destination route does not exist in the routers routing table it will return “no route to host error” with ICMP protocol.
Reasons and Solutions
No Rout To Host error is a very generic error but we will try to list some of the causes of the error.
Remote Host or IP Address Is Offline
The first reason may be the remote system is not running or in an offline position. It can not be connected to the network or internet. This can be tested with the
traceroute command which will try to access remote system hope by hope but will also check each intermediate hop status.
$ traceroute 220.127.116.11
The solution is contacting the remote system administrator and talking about the situation of the system.
Trying To Connect Wrong Port
While trying to connect the remote system with the given port we may use the wrong port number which is not serving. Double-check the port number while connecting remote systems.
$ telnet 18.104.22.168 23
The solution is providing the correct port we want to access.
Service Does Not Run
Another reason may the service we want to access is not running. So the port will not open too. We can check service availability for Linux and Windows with the following ways.
$ sudo systemctl status sshd
We will use
Get-Service PowerShell commandlet to check
Apache2.2 service. For more information about
Get-Service look following the tutorial.
PS> Get-Service Apache2.2
Solutions for this problem is starting services with the related commands like below.
$ sudo systemctl start sshd
PS> Start-Service Apache2.2
We Can Not Access To The Internet
We have mainly talked about the remote system problems for
No route to host but in some cases, the problem may be related to our network and systems. We can check this with the simple
ping command like below.
$ ping google.com
Talk with the system administrator or ISP.
Remote System Firewall Block
Firewalls are main utility used for security systems. Servers or corporate networks generally utilize firewalls to prevent access to internal systems and ports. So this can prevent to access our target host. Contact with the remote network administrator.
DNS Cannot Be Resolved
If we are using domain names which are translated by DNS servers this can create problems. If the DNS named is not resolved properly we may not access to the remote system. Change DNS servers like
22.214.171.124. More DNS servers can be found in the following tutorial.