Connectivity Testing with Ping, Telnet, Trace Route and NSlookup

Scan and Shield for your WordPress site.
 
Connectivity Testing with Ping, Telnet, Trace Route or NSlookup

This article will help you use various commands to test and diagnose connectivity. These commands are entered in either a Command Prompt Window for Microsoft Operations Systems or a Terminal Window for Mac. The two sections below will explain how to open a Command Prompt / Terminal Window. Click the links below to jump to a specific section.

Open a Command Prompt for Windows

Windows XP, Vista:

1. Click Start button
2. Click on the "Run" menu item
3. Type "cmd" and press enter

Windows 7:

1. Click Start button
2. In the Search box, type "command"
3. Click on the Command Prompt in the search results listing.

Windows 8:

1. Swipe up from the bottom of the Start screen and then tap Search. (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.)

2. Enter command prompt in the search box, tap or click Apps, and then tap or click Command Prompt.

Command Prompt Window Example:







Open a Terminal Window for Mac


Mac OS X

1. Open your Applications Folder
2. Click Utilities
3. Click on Terminal

Terminal Service Window Example:



Ping

The ping command verifies connectivity by sending Internet Control Message Protocol (ICMP) echo packets to a host and listening for an echo reply. Times on the Internet can range from 80ms (milliseconds) to 250ms, which is considered normal during peak hours. You can use the ping utility to test both the host name and IP address of the host for DNS resolution. A successful IP ping and failed host name ping could indicate name resolution issues.
 
Command Prompt / Terminal Window Usage:

Enter Ping followed by the Fully Qualified Domain Name (FQDN) or IP address of the server you want to test. 

Ping www.domain.com
Ping 123.123.123.123

You may wish to use the –t command line switch to send continuous echo requests to a host. This may be useful when testing for a server to be restarted and start responding again. 

Ping 123.123.123.123 –t



Telnet


The Telnet command is used to test a variety of services for connectivity. You can use it to test for SMTP, SQL or Remote Desktop connectivity. This is a good test to use for service or port blocks resulting from a firewall configuration.

Command Prompt / Terminal Window Usage:

Enter TELNET, followed by the Fully Qualified Domain Name (FQDN) or IP address of the server you want to connect to - and then the port that the service uses.

TELNET mail.domain.com 25
TELNET 123.123.123.123 3389


The response of a successful connection will be different for each service, but a failed connection will always respond with a variation of the following message: "Could not open connection to the host, on port n: Connect failed"


Trace Route

Trace Route command displays the path a packet takes to reach a destination from the machine that it is executed on. It does this by sending Internet Control Message Protocol (ICMP) echo request messages to the destination. The path is displayed as a list in the order of which it heard back from each node that it passed through on its way to the destination. For example, going from a site in Arizona to a site in California, your request for information will go through many different pieces of equipment and companies. The numbers on the trace show the time it's taking to travel to each of those locations. Times on the Internet can range from 80ms (milliseconds) to 250ms, which is considered normal during peak hours. Any time that is higher than 250ms should be further investigated by the Internet Service Provider.

A Trace Route will include at least 4 pieces of information for each hop; the number of the hop, the Round Trip Time (RTT is displayed in milliseconds or ms) it takes to get from the interface of the current hop and then back again to your machine, the IP address of the interface for that hop and the hostname corresponding to the IP address of the hop. The default is to send out 3 packets to each hop. This is done in case a packet is lost and allows you to get an idea of whether or not there is a variance in the time for a specific hop.

A high number on the first external hop from you machine is a good indication of possible Local Area Network (LAN) issues.

An asterisk (*) indicates an echo request that was lost. These can be the result of security implementations of firewalls or Access Control List (ACL’s). Additionally, routers may be configured not to respond to this type of traffic. You may see a row of three asterisks with no IP address or hostname. The trace may then continue responding normally again and display the destination results.

Windows Command Prompt Usage:

Enter TRACERT followed by the Fully Qualified Domain Name (FQDN) or IP address of the server you want to test. 

TRACERT domain.com 

You can see the output results in the following example:

Tracing route to domain.com over a maximum of 30 hops:
  1    <1 ms    <1 ms    <1 ms  111.111.111.111
  2    <1 ms    <1 ms    <1 ms  222.222.222.222
  3     1 ms     1 ms     1 ms  111.222.111.222
  4     1 ms     1 ms    12 ms  222.111.222.111
  5     *         *          *        Request timed out.
  6    14 ms    13 ms    13 ms  domain.com
 
Trace complete.

 
MAc OS Terminal Window Usage:
 
Type TRACEROUTE followed by an -I and the Fully Qualified Domain Name (FQDN) or IP address of the server you want to test.
  • NOTE: -I is an uppercase i. 
Ex:  traceroute -I www.webcontrolcenter.com 
 
 


The Nslookup command allows you to displays information that you can use to diagnose Domain Name System (DNS) infrastructure. It is helpful when you want to query a specific DNS record such as a Host A, MX and NS records to name a few.

Command Prompt / Terminal Window Usage:

1. Type: nslookup and then press ENTER.
2, Type: set type=MX and then press ENTER.
3. Type the domain name and then press ENTER. 

Or use the single line command:

1.  nslookup -querytype=mx domain.com

Add Feedback