Sunday, April 14, 2019

How to resolve "Destination Host Unreachable" Issue in Linux | Karan Rajpoot

                                                       Destination Host Unreachable in Linux

Error: - icmp_seq=2 Destination Host Unreachable


Cause: - When you are trying to ping Linux machine from one node to another node then you may face issue "destination host unreachable", the reason behind this issue is the selection of network while creation of Linux machine.


Solution: - To resolve this issue you need to select the proper network selection.


Example: - In this case, there are two machine prod and dr, When I was tried to ping dr machine from prod then I faced below issue. I checked so many things like firewall, etc/hosts file entries and so on, but didn't get resolution then, at last, I checked my network configuration and found it was set as NAT. I have changed the Network from NAT to the host-only adapter and then tried again finally, that issue has been resolved.


Before changing the network from NAT to Host-only adapter.


[root@prod Desktop]# ping dr
PING dr.radical.com (192.168.2.21) 56(84) bytes of data.
From prod.radical.com (192.168.2.20) icmp_seq=2 Destination Host Unreachable
From prod.radical.com (192.168.2.20) icmp_seq=3 Destination Host Unreachable
From prod.radical.com (192.168.2.20) icmp_seq=4 Destination Host Unreachable
^C
--- dr.radical.com ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4307ms
pipe 3

Network changes from NAT to Host-only adapter.




After changing the network from NAT to Host-only adapter.


[root@prod Desktop]# ping dr
PING dr.radical.com (192.168.2.21) 56(84) bytes of data.
64 bytes from dr.radical.com (192.168.2.21): icmp_seq=1 ttl=64 time=1004 ms
64 bytes from dr.radical.com (192.168.2.21): icmp_seq=2 ttl=64 time=4.63 ms
64 bytes from dr.radical.com (192.168.2.21): icmp_seq=3 ttl=64 time=0.865 ms
^C
--- dr.radical.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2389ms

rtt min/avg/max/mdev = 0.865/336.723/1004.676/472.316 ms, pipe 2


Hope this blog will help you!!


No comments:

Post a Comment