Latest tutorial: Premium Flash Files | Ask Tutorial5! | Subscribe to RSS Register Login Find Hobbies
Advertisement

Get tutorials on EMail




Do you need more help? You can now Ask Tutorial5! and get free support - Ask a question now!

Basic command line networking

(7 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


Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 23 June 2007 )