“No Route To Host” Error And Solution
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 decides the route to the destination according to their routing tables. If destination route do not exists in the routers routing table it will return “no route to host error” with ICMP protocol.
Reasons and Solutions
No Router To Host error is 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 a offline position. It can not 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 18.104.22.168
Solution is contacting to the remote system administrator and talking about the situation of the system.
Trying To Connect Wrong Port
While trying to connect remote system with the given port we may use wrong port number which is not serving. Double check the port number while connecting remote systems.
$ telnet 22.214.171.124 23
Solution is providing the correct port we want to access.
Service Do Not Running
Another reason may the service we want to access is not running. So the port will not opened 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 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 with our network and systems. We can check this with the simple
ping command like below.
$ ping google.com
Talk with system administrator or ISP.
Remote System Firewall Block
Firewalls are main utility used for secure systems. Servers or corporate networks generally utilize firewalls to prevent access 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 is 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
126.96.36.199 . More DNS servers can be found in the following tutorial.