Testing Network Connectivity with Ping

After you've finished your network configurations, setting them either with sysinstall or with /etc/netstart, you will want a quick way to make sure the settings are correct. The easiest solution is the ping program, a simple ICMP-based tool that checks for echoes from a specified host and reports the round-trip time it takes each packet to get to the host and back.

The use of ping is pretty simple. You can run it against either an IP address or a hostname (or /etc/hosts alias); it will run until you interrupt it with Ctrl+C:

 # ping fred PING fred (114.235.123.11): 56 data bytes 64 bytes from 114.235.123.11: icmp_seq=0 ttl=243 time=485.344 ms 64 bytes from 114.235.123.11: icmp_seq=1 ttl=243 time=351.589 ...

Get FreeBSD® Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.