How to Test Network Connectivity

Test TCP Connectivity

nc -z -v <hostname/ip> <port>

Test UDP Connectivity

nc -z -v -u <hostname/ip> <port>