“No Route To Host” Error And Solution – POFTUT

“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 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

The 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 8.8.8.8
Remote Host or IP Address Is Offline
Remote Host or IP Address Is Offline

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 8.8.8.8 23
Trying To Connect Wrong Port
Trying To Connect Wrong Port

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
Service Do Not Running
Service Do Not Running

We will use Get-Service PowerShell commandlet to check Apache2.2 service. For more information about Get-Service look following the tutorial.

Windows Service Tutorial

PS> Get-Service Apache2.2
Service Do Not Running
Service Does Not Run

Solutions for this problem is starting services with the related commands like below.

$ sudo systemctl start sshd

OR

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
We Can Not Access To The Internet
We Can Not Access To The Internet

Talk with the system administrator or ISP.

LEARN MORE  What is DHCP and How It Works?

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 8.8.8.8. More DNS servers can be found in the following tutorial.

Popular Free DNS Services Around The World

Leave a Comment