A reply to ping confirms one thing: the request reached the host and the reply came back. It says nothing about the site on the server or about the settings after a reboot.
ping sends ICMP echo requests — ICMP is the network's service protocol — and prints every reply. The line 2 packets transmitted, 2 received means both requests got through and both replies came back.
A site or SSH on the server are separate programs, and ping never touches them: they are checked by their ports, in the next module. An address set with ip will not come back by itself after a reboot.
Failures differ too. Network is unreachable is printed at once: the client has no way to the address. 100% packet loss means the requests went out and nothing came back: the host does not exist, is off, or the replies are dropped.
ping to the server printed 2 packets transmitted, 2 received. What follows from this?
Several options are correct.
-
ip address addchanges the current network state. After a reboot the address comes from the configuration, which may say something else. -
SSH is a separate program on its own port, and
pingnever touches it. Ports are checked separately, in the module on ports.
The ICMP replies show that there is a path to the server and that the server answered. The programs on the server and whether the settings persist are checked separately.
Key points
-
2 receivedmeans the requests reached the host and the replies came back. -
Network is unreachablemeans the client has no way to the address;100% packet lossmeans the requests went unanswered. -
A
pingreply does not check the programs on the server.