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

Get tutorials on EMail




Basic command line networking

(25 votes)
Written by Michael D   
In this tutorial I will focus on the main built-in networking applications that you can find in any distribution of Microsoft Windows 2000. I used them on a Windows 2000 SP4, but it's quite the same in all versions.

Firstly, to access all this you need to enter the Command Prompt (MS-DOS shell). You probably know to do this, but if you don't just go to Start Menu > Run and type cmd or command and a black screen with a prompt should appear.netcmds_01.jpg

1) Netstat.exe

As the name implies, netstat.exe gives you the current status of your network connections. Typed without any parameters, it will show the active connections like shown bellow ("mihaidobos" is the hostname of my computer).netcmds_02.jpg

Note that you can see here information on all open connections, their protocol, ports, hosts and state. The state parameters like "established" or "time wait" are explained in the Transmission Control Protocol Tutorial.

The most important parameters of this command are netstat.exe /a - that will show all connections, netstat.exe /e that will show Ethernet connection(s) statistics and netstat.exe /s that will show per-protocol statistics. Please note that there are other parameters not so useful. A complete list and description can be seen by typing netstat.exe /? . Keep in mind that this can be done for any command (command.exe /? will show all options).

netcmds_03.jpg

2) Ipconfig.exe

Probably the most useful command provided by Microsoft, Ipconfig.exe is used to check the network settings or repair a connection. The most used option is /all. Bellow you can see a ipconfig.exe /all example; I added an effect to the private content of the shot since it's not really the objective of this tutorial to tell you my MAC address or IP.
netcmds_ipconf.jpg

If using a DHCP connection (this concept will be covered in another tutorial) you can release your IP address by typing ipconfig.exe /release or renew it by typing ipconfig.exe /renew.

Also some useful commands are the /displaydns option which will show you the Domain Name Service (DNS) names cached in your PC's memory and ipconfig.exe /flushdns which will empty this cache. This can get pretty handy if you start getting "Could not resolve hostname" errors and you don't know why.

3) Nslookup.exe

This command is used to resolve a hostname to an IP. The syntax is nslookup.exe <domain>.

Eg :

C:\>nslookup Google.jp

Non-authoritative answer:

Name: Google.jp

Addresses: 66.102.7.104, 72.14.203.104, 72.14.235.104

4) Net.exe

This command is used usually to access and maintain a Microsoft File/Printer Sharing environment, or to send text using Windows Messaging Service. The syntax is net.exe <command> <options>. You can see a screenshot bellow:

netcmds_netstat01.jpg
For other troubleshooting commands, please read the Command-line network diagnose tutorial.


Subscribe now via RSS feed and get all the new tutorials

written by nyakaho kisike , October 26, 2007

it is nice and i need more ideas how to use dos cmd in network especial on troubleshooting.
written by Limpho Temeki , February 07, 2008

how do i use basic command?
written by Ranjit S , May 29, 2008

thanks

how can i change ip address using msdos prompt.??
written by sk , December 29, 2008

pls told me some important command for networking
written by nil madhab bag , June 13, 2009

pls tell me how i configer lan through the dos command?
written by nz , June 18, 2009

I want to know more command for Networking . pls send to my mail ,thz
written by kumar roushan , August 31, 2009

sir, i want to learn complet dos,please give me proper notes,with example,analysation on my given e-mail id.very early please.
i am unable to understand output related to few commads like net etc.so please explain every thing.
thankyou.
written by madusanka , November 03, 2009

how to change ip ang defalt gateway in command line
written by Mohd.jiwakamlanie , November 04, 2009

for changing ip..u must using C application..and create for the code.. Like *********... if u want to buy from me... Just sent email to me at This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
written by Rakesh , November 11, 2009

I need to learn networking from basic. So send me a tutorial a day so that I can learn fast. I am a student of networking. I infact joined last week, so help me.
written by gobi , April 09, 2010

verry nice please send some more cmd for networking troubleshoot thanks
written by Sanjay Kumar Yadav , August 14, 2010

i will remove a programme in add/remoove.but when i installed another programme ,frist programme will be show and second programme not installed.

Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 23 June 2007 )