Latest tutorial: Making a Movieclip face another Movieclip or point on the stage | Ask Tutorial5!
 

Command-line network diagnose

(10 votes)
Written by Michael D   
In this tutorial we will talk about the PING command and the Tracert command. Please note that these are valid in both Microsoft Windows (we'll focus on this) and Linux environments (for Linux tracert.exe becomes traceroute).

To use them, first open a command-line interface like MS-DOS prompt (Start menu - Run - type cmd).

Ping

The ping command is used to test the end-to-end connectivity between any two hosts on the network or the Internet. It works by sending a packet that requests an echo from its destination host. If the sender receives the echo in a small amount of time (milliseconds), the network connectivity is good; if it comes in seconds or not at all, then probably there is a problem on the way to the host. Note that there are software or hardware firewalls (traffic filters) available that block the host from replying with that echo; this is a protection method against Denial of Service (DoS) attacks. So firstly make sure that the host you are pinging doesn't have something like this, or it's useless. Now let's look at Microsoft's ping.exe utility and explain the main options that come with it:

ping.exe_options.jpg

- t pings the target until stopped (by pressing CTRL+C) - note that pinging for a long period a host could be interpreted like an attack from your address

- n pings the target n times (by default is 4)

- l <size> - sets the buffer size - by default it's 32 bytes of data; you can make it up to 65500 bytes; note that this too could be considered an attack since the destination host could get flooded by large amounts of data coming (remember that it replies with an echo to every package). This was is a classic DoS attack method used before; dial-up users or other low-bandwidth devices froze when received this type of flood. Don't try it; it's almost useless now.

- w - timeout in milliseconds; it describes the amount of time that the sender will wait for the echo from the recipient.

For a full options list, type ping.exe /? like shown above.

A good way to test the network connectivity is by using the default values; so just type ping.exe hostname like in the screenshot bellow:

ping.exe_google.jpg

 

Another good way to see what's wrong in your network is to use tracert.exe (traceroute in Linux). It shows all nodes the packet travels from sender to destination (also reffered as "hops" in the network), the domains if available, IP addresses and the amount of time in milliseconds that took the reach that specific node. It could get quite handy if you don't know where the problem is when pinging a server in your network and getting no reply from it. See the screenshot bellow for a detailed look on the command. I applied an effect on my server's IP address for privacy reasons.

tracert_google.com.jpg



Subscribe now via RSS feed and get all the new tutorials

written by k.Arun , October 19, 2007

how can send message to one clinte ,domain,workgroup From Server
written by Shilpa , October 20, 2007

I want more such dos commands for network diagnosis. Please let me know if anybody knows.
written by Mihai Dobos , October 22, 2007

Hello Arun

If you want to send a message to users in a Microsoft Network, you can use the "net" command from the prompt. This uses a messanging protocol that must be started on the reciever's PC; this is not a big problem, since the service is started by default every time your Windows loads.

The syntax for this command is

net send IP|HOST|/DOMAIN/USER message

For example, net send 192.168.0.101 Hello! will generate a popup window on that computer with the 'Hello' message.


Mihai D.


written by Mihai Dobos , October 22, 2007

Hello Shilpa


This is a full list of the most used networking commands on Windows XP :

- net - used to start, stop and access networking operations

- ipconfig - view networking configuration

- ping - test ICMP connectivity between hosts and networks

- tracert - test ICMP connectivity and problems step by step to the destination network

- nbtstat - protocol statistics on TCP/IP

- route - add, delete or view TCP/IP routing configuration

- getmac - view MAC address information for local interfaces

- arp - information on Address Resolution Protocol table

- netstat - information on current TCP/IP connections and their state.


For any detailed information on syntax, type "command /?" at the command prompt.


Mihai D.


written by Daniel , January 04, 2008

i want to send a message to my freinds computer, how do i find out his net send IP?
written by jim yeater , January 18, 2008

yea tracert in command prompt says 'tracert' is not recognized as an internal or external command, operable program or batch file. you help would be realy greatfull thank you..
written by ayu , April 14, 2008

i try to use the net send command and try to send to my own computer,but the message 'sending files is no longer suuported'. How can i send message to other computer in the network?
written by Hafizur Rehman , May 19, 2008

my windows xp working very slow can i improve performance by editing in registry please help me
written by varun khatri , June 28, 2008

I tried to connect another computer on network through
"Computer Managemant" but i`m unable to access the Advanced properties.

written by Ravi , October 08, 2008

Whenever user is doing testing in networking what all are the essential things that are need to be tested and what all are the most usefull commands for testers?
written by Joshua Sinkfield , November 15, 2008

Is a download required for the support of the file "net send". Also, getmac is not a command on my Command Prompt Version 5.1.2600 Windows XP 2001.
written by Murthy , February 03, 2009

1. I want to send a message to my freinds computer, how do i? and how i can find out his net send IP?

written by Jedi Master , June 10, 2009

In order to send messeges over the network with "net send" you must first enable the "messenger" service on the computers involved, afaik with the introduction of XP the messenger service is disabled by default so viruses and spyware cannot popup crap on your screen :)
written by Sith Lord , June 10, 2009

DISCLAIMER:

Just remember, enabling this service may enrage your IT department. Be prepared for full thier full wrath!!!

End of DISCLAIMER

Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 23 June 2007 )