Thursday, 26 January 2017

Ping vs Traceroute 

Ping

Ping (also written as PING or ping) is a utility that you use to determine whether or not a specific IP address is accessible. Ping works by sending a packet to a specified address and waiting for a reply. Ping is used primarily to troubleshoot Internet connections and there are many freeware and shareware Ping utilities available for download.


On a Windows PC you can run Ping using a command prompt. To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping followed by the destination server name or an IP address, for example, ping google.com


Ping Localhost

When setting up a network you can use the ping command to make sure all of the computers are "alive" (at least in the TCP/IP sense). To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping 127.0.0.1

If everything is OK, you should get the following response (or something similar):

Pinging 127.0.0.1 with 32 bytes of data

Reply from 127.0.0.1: bytes=32 time<10ms TTL=32
Reply from 127.0.0.1: bytes=32 time<10ms TTL=32
Reply from 127.0.0.1: bytes=32 time<10ms TTL=32
Reply from 127.0.0.1: bytes=32 time<10ms TTL=32

This means that TCP/IP is working on the machine that you are typing on. 127.0.0.1 is a special address that "loops back" to the machine you are pinging from. You can also type ping localhost and receive a similar response, since localhost and 127.0.0.1 mean the same thing.


Traceroute

Traceroute is a utility that traces a packet from your computer to an Internet host, but it will show you how many hops the packet requires to reach the host and how long each hop takes. If you're visiting a Web site and pages are appearing slowly, you can use traceroute to figure out where the longest delays are occurring. Traceroute utilities work by sending packets with low time-to-live (TTL) fields. The TTL value specifies how many hops the packet is allowed before it is returned. When a packet can't reach its destination because the TTL value is too low, the last host returns the packet and identifies itself. By sending a series of packets and incrementing the TTL value with each successive packet, traceroute finds out who all the intermediary hosts are.
The original traceroute is a UNIX utility, but nearly all platforms have something similar. Windows includes a traceroute utility called tracert. On a Windows PC you can run traceroute using a command prompt To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type tracert followed by the destination server name or an IP address, for example: tracert google.com


No comments:

Post a Comment