The content of the article
The ping, traceroute, and whois commands are among the first things novice admins learn about. Many who do not specialize in networks are limited to them, and completely in vain. Using standard tools, you can extract much more information about the problem than it might seem.
ping example.com known to everyone, even a person far from networks. It sends ICMP echo packets to the remote host, which, in theory, it should respond with the same packet.
However, this protocol is not just called the Internet Message Control Protocol. Its functions are far from being only diagnostic, but diagnostic functions are much wider than "answered – did not answer."
What can ping say?
Often, if the destination host is unreachable, you can really only get from ping
request timeout and nothing else. If the successful response always comes from the destination host itself, then delivery error messages are from intermediate routers. By standard intermediate routers may, but are not required to notify, the sender. Often they do not notify – for performance reasons, and there is nothing to blame them for.
But if you got an answer from an intermediate router, it is usually informative. For example, the answer
destination host unreachable should be sent only when the host is on the same local network as the router and is not responding. The easiest way to see this error is to ping a deliberately non-existent address on your own network: for example, if your network 192.168.0.0/24 and the host 192.168.0.200 are not in it, execute
Such an answer can only come from the last router on the way to the host.
network unreachable indicates the absence of a route to the specified network at one of the hosts on the way. This error can occur anywhere in the path, so you need to pay attention to the sender.
Most often you yourself have this problem: the route settings have flown or the host has not received the route from the DHCP server. But such an answer may come from an intermediate router:
From 192.0.2.100 icmp_seq=1 Destination Net Unreachable
If you see such a picture, something seriously went wrong. If the host is reachable from other networks, it is possible that the provider has a problem with the BGP settings. I have at least once encountered the fact that a major provider mistakenly filtered routes from a network that he considered reserved for future use, although at that time IANA had already passed it to RIPE NCC for half a year and many people received addresses from it.
If you don’t want to be like that provider, you can use automatically updated lists of nonexistent addresses like Cymru bogon reference
destination host/net prohibited means the packet was dropped by the firewall rule. However, no one is obliged to answer the sender in this way or to answer at all. For example, in Linux, rules of the form
iptables -j REJECT give out by default
destination port unreachableunless explicitly specified
--reject-with, and you can specify any type, even
But it's all about simple
ping no options. Some problems are best identified by additional options.
Continuation is available only to participants
Materials from the latest issues become available separately only two months after publication. To continue reading, you must become a member of the Xakep.ru community.
Join the Xakep.ru Community!
Membership in the community during the specified period will open you access to ALL Hacker materials, increase your personal cumulative discount and allow you to accumulate a professional Xakep Score!
I am already a member of Xakep.ru