PING (Packet Internet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices.
The application also allows you to reach host ports.
Example: -i 5 -a -s 800 hostname/ip
This command sends 800 bytes (-s 800) every 5 seconds (-i 5) and beeps (-a) when successful.