Home  │ 
 

Network commands in Windows XP: an introduction

Topics on this page:

[1] Introduction

[2] The Commands

 

1. Introduction

This is merely a simple introduction to some basic networking commands useful for troubleshooting in Windows XP (and other versions of Windows). Some have similarities to equivalent commands in Unix. There are many others available for advanced network users (more are included in Windows XP Support Tools) but they will not be covered here. Networking is a huge subject and you need to consult other sources of information for an adequate understanding of the technology and protocols.

These commands are launched from the command prompt window. You will find the details of all the syntaces if you type /? after the command name in the command window so they won't be repeated here.

 

2. The commands

ping

This is perhaps the first command to try for troubleshooting. It sends a small packet to the remote computer and see if it returns (and the time it takes). Note, however, many routers and firewalls can be configured to ignore these packets so the absence of a positive answer does not always indicate loss of connection. Microsoft website, for example, would not respond. For added security you might wish to set your firewall not to respond to ping commands.

 

ipconfig

The command ipconfig /all shows the basic TCP/IP information (IP address, DNS and DHCP) for each of your installed network interface card (NIC) adaptor. You can install the old Windows 98 winipcfg.exe utility in Windows XP if you like its GUI.

It is useful to show and check your computer's assigned IP address, whether it is a public IP (assigned by your ISP) or a private internal IP (assigned by your router in your LAN) because private IPs must belong to specific ranges. This command is often one of the first to use for network troubleshooting.

ipconfig /release will release the IP addresses.

ipconfig /renew renew all the IP addresses. Both commands are useful for troubleshooting networking problems.

 

netstat

This commands shows the details of all your network connections, including IP addresses, connection status and ports.

netstat -ano shows the process ID (PID) as well. Launch the Windows Task Manager to match the PID numbers to the applications using particular TCP and UDP ports.

If you have unusual connections (suspicious of Trojans) then examine the details very carefully.

I also find the information useful and interesting when using Bit Torrent.

 

tracert

This command (trace route) traces the route from the local all the way to the destination computer. It displays each stage of the packet transmission and when it fails to reach the destination, where it ends. It is useful for troubleshooting network connections to remote computers.

 

pathping

This combines the features of ipconfig and tracert and displays the results in a more intuitive manner.

 

Net

There are over 20 commands under this umbrella and include some of the most powerful tools.

Net send is the command used for sending messages using the Windows Messenger service (and pop-up Messenger spam) in networked computers. To stop receiving Messenger spam temporarily, type: stop net send; to stop it permanently, disable Messenger service in System Services (disabled by default in Windows XP SP2, as Microsoft probably has finally accepted this reality).

Net start service_name and Net stop service_name starts and stops Windows system services respectively.

Net user displays or (with switches) modifies local or domain account and passwords. The following three commands modify settings that cannot be done elsewhere in Windows XP. More details can be found by typing net help commandname.

Net user <username> /Expires:date sets the expire date for the user specified.

Net user <username> /Passwordreq:yes specifies the user account must have a non-blank password.

Net user <username> /Times:days,start time-finishing time restricts the days and time when a user is allowed to logon. Note, however, that this won't kick the user off if the user is already logged on when the specified time expires (this can be done in Windows servers).

Net Localgroup displays and modifies local security groups. You can use it to add or delete members or groups. More details can be found by typing: net help localgroup.

 

 

Other commands

The list is not exhaustive but includes:

arp

finger

ftp

getmac

hostname

tftp

nbstat

netsh

nslookup

telnet

 

Go to TOP

 

Copyright © 2004 by Kilian. All my articles including graphics are provided "as is" without warranties of any kind. I hereby disclaim all warranties with regard to the information provided. In no event shall I be liable for any damage of any kind whatsoever resulting from the information. The articles are provided in good faith and after some degree of verification but they may contain technical or typographical errors. Links to other web resources may be changed at any time and are beyond the control of the author. Articles may be added, removed, edited or improved at any time. No support is provided by the author.

This is not an official support page for any products mentioned. All the products mentioned are trademarks of their companies. Edit the registry at your own risk and back up first.

Last updated 5 Oct 2004