Windows Network Diagnostic Commands and the Command Prompt

Prepared by Floyd Jay Winters September, 2000.  Updated July, 2003.

HOME

 

Peer to Peer

Using Windows to configure computers to share resources without a server

 

To use the command prompt for commands below: Click Start, choose Run, and type cmd.

PING

Packet Internet Groper - sends a packet an address to test if address is accessible  (95/98/NT/XP)

TRACERT

Traces a packet from your computer to an Internet host showing each hop (95/98/NT/2000/XP)

IPCONFIG

Shows IP address, subnet mask, default gateway and more (NT/98/2000/XP)

ARP

Address Resolution Protocol - converts an IP Address into a physical address (95/98/NT/2000/XP)

TELNET

A terminal emulation program to connect your computer to a remote server, requires logon

NBTSTAT

NetBIOS statistics such as adapter status, names, cache, sessions (95/98/NT/2000)

NETSTAT

Displays protocol statistics and current TCP/IP network connections (95/98/NT/2000)

NETVIEW

Displays a list of computers in a specified workgroup (98/NT/2000)

NET HELP

Displays current network settings, users, workgroups, resources… (95/98/NT/2000)

NET SEND

Send a message to a computer name (NT/98/2000/XP)

SET

Display computer environment variables, such as User Domain and User Name (NT/98/2000/XP)

ROUTE

Manipulates network routing tables, route print shows active routes, metrics. (98/2000)

FTP

Transfers files to and from a computer running an FTP server service (NT/98/2000/XP)

MSCONFIG

Displays (allows edit) Config.sys, Autoexec.bat, System.ini, Win.ini, and Startup Files (98/XP)

WINIPCFG

Graphical display of MAC and IP address, Subnet Mask, Gateway (95/98)

WINMSD

Graphical display of Microsoft Diagnostics - IRQs, Memory, Devices ... (NT)

 

C:\>ping 10.164.50.1

Pinging 10.164.50.1 with 32 bytes of data:

Reply from 10.164.50.1: bytes=32 time=8ms TTL=255

Reply from 10.164.50.1: bytes=32 time=9ms TTL=255

Reply from 10.164.50.1: bytes=32 time=7ms TTL=255

Reply from 10.164.50.1: bytes=32 time=8ms TTL=255

 

Ping statistics for 10.164.50.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)

Approximate round trip times in milli-seconds:

    Minimum = 7ms, Maximum =  9ms, Average =  8ms

or

Reply from 24.164.33.237: Destination host unreachable.

Request timed out.

You can also ping a domain, such as C:\>ping www.mccfl.edu

Top

=======================================================

C:\>tracert 24.94.158.57

Tracing route to gsra-srp60.tampabay.rr.com [24.94.158.57]

over a maximum of 30 hops:

  1     9 ms     9 ms     9 ms  10.164.50.1

  2     9 ms     7 ms     8 ms  24.164.33.234

  3    10 ms     9 ms    10 ms  24.164.33.237

  4    10 ms    12 ms    10 ms  gsra-srp60.tampabay.rr.com [24.94.158.57]

Trace complete.

Top

=======================================================

C:\>ipconfig/all

1 Ethernet adapter :

        Description . . . . . . . . : 3Com EtherLink PCI

        Physical Address. . . . . . : 00-50-DA-C4-C6-A0

        DHCP Enabled. . . . . . . . : Yes

        IP Address. . . . . . . . . : 24.164.50.26

        Subnet Mask . . . . . . . . : 255.255.254.0

        Default Gateway . . . . . . : 24.164.50.1

        DHCP Server . . . . . . . . : 24.92.1.154

        Primary WINS Server . . . . :

        Secondary WINS Server . . . :

        Lease Obtained. . . . . . . : 07 03 03 5:15:36 AM

        Lease Expires . . . . . . . : 07 03 03 9:15:36 AM

 

ipconfig will even tell you if your cable is disconnected, below is an XP screen:

C:\>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

        Media State . . . . . . . . . . . : Media disconnected

Also know /release and /renew

Top

=======================================================

C:\>arp -a

Interface: 24.164.50.26 on Interface 0x2000003

  Internet Address      Physical Address      Type

  24.164.50.1           00-01-42-1d-b1-54     dynamic

Top

=======================================================

C:\>telnet 10.164.50.1

User Access Verification

 

Username:

Top

=======================================================

C:\>nbtstat -n

Node IpAddress: [24.164.50.26] Scope Id: []

            NetBIOS Local Name Table

   Name               Type         Status

-------------------------------------------

WINTERSDELL900 <00>  UNIQUE      Registered

WINTERS        <00>  GROUP       Registered

Top

=======================================================

C:\>netstat -a

 

Active Connections

 

  Proto  Local Address          Foreign Address        State

  TCP    wintersdell:137        WINTERSDELL:0          LISTENING

Top

=======================================================

C:\>net help

For more information about a specific Microsoft NET

command, type the command name followed by /?

(for example, NET VIEW /?)

 

NET CONFIG   Displays your current workgroup settings.

NET DIAG     Runs the Microsoft Network Diagnostics program to

             display diagnostic information about your network.

NET HELP     Provides information about commands and error messages.

NET INIT     Loads protocol and network-adapter drivers without

             binding them to Protocol Manager.

NET LOGOFF   Breaks the connection between your computer and

             the shared resources to which it is connected.

NET LOGON    Identifies you as a member of a workgroup.

NET PRINT    Displays information about print queues

             and controls print jobs.

NET START    Starts services.

NET STOP     Stops services.

NET TIME     Displays the time on or synchronizes your computer's

             clock with the clock on a Microsoft Windows for

             Workgroups, Windows NT, Windows 95, or NetWare time server.

NET USE      Displays information about connections;

             Connects or disconnects from a shared resource.

NET VER      Displays the type and version number of the

             workgroup redirector you are using.

NET VIEW     Displays a list of computers that share resources or

             a list of shared resources on a specific computer.

Top

=======================================================

C:\>net view

Servers available in workgroup WINTERS.

Server name            Remark

------------------------------------------

\\WINTERSDELL          DellPentium

The command was completed successfully.

Top

=======================================================

C:\>net send CAD21 Hi Eric

The message was successfully send to CAD21.

 

C:\>net send /domain “Test is now over” will send to all computers in domain

Top

=======================================================

C:\>Set

...

USERDNSDOMAIN=mcc.cc.fl.us

USERDOMAIN=MCC

USERNAME=winterf

USERPROFILE=C:\Documents and Settings\winterf

windir=C:\WINNT

Top

=======================================================

C:\>route print

Active Routes:

 

Network Address          Netmask  Gateway Address    Interface  Metric

        0.0.0.0          0.0.0.0      10.80.208.1   10.80.220.20   1

    10.80.208.0    255.255.240.0     10.80.220.20   10.80.220.20   1

   10.80.220.20  255.255.255.255        127.0.0.1      127.0.0.1   1

 10.255.255.255  255.255.255.255     10.80.220.20   10.80.220.20   1

      127.0.0.0        255.0.0.0        127.0.0.1      127.0.0.1   1

      224.0.0.0        224.0.0.0     10.80.220.20   10.80.220.20   1

255.255.255.255  255.255.255.255     10.80.220.20        0.0.0.0   1

Top

=======================================================

C:\>ftp home.tampabay.rr.com

Connected to home.tampabay.rr.com.

220 home.tampabay.rr.com NcFTPd Server (licensed copy) ready.

User (home.tampabay.rr.com:(none)): smithjim

331 User smithjim okay, need password.

Password:

230-You are user #21 of 250 simultaneous users allowed.

230-

230 Restricted user logged in.

ftp> ?

Commands may be abbreviated.  Commands are:

!            delete        literal      prompt       send

?            debug         ls           put          status

append       dir           mdelete      pwd          trace

ascii        disconnect    mdir         quit         type

bell         get           mget         quote        user

binary       glob          mkdir        recv         verbose

bye          hash          mls          remotehelp

cd           help          mput         rename

close        lcd           open         rmdir

ftp> send ResumeWebPage.htm

200 PORT command successful.

150 Opening ASCII mode data connection.

226 Transfer completed.

ftp: 32432 bytes sent in 0.02Seconds 1621.60Kbytes/sec.

ftp> quit

221 Goodbye.

C:\>

Top

=======================================================

Configuring a Peer to Peer Network

1. Connections:

  a. Make the sure NIC (adaptor) card and its driver have been installed and configured.

  b. Make sure the proper cable is used: patch cable if you use a hub; crossover for NIC to NIC

2. Configuration:

To successfully set up a network you need a Client (to access resources on a network), a Service (for file and printer sharing), and a Protocol (for communications).

  a. Right-click Network Neighborhood or My Network Places and choose Properties. If there is not a Local Area Connection click Create a new connection and use the wizard to create your network connection.

  b. Right-click the Local Area Connection.

  c. Make sure Network Neighborhood or My Network Places Properties has Client for Microsoft Networks installed to allow your computer to use resources on a Microsoft Network. If the client is not there, click the Install button, and choose the Client.

  d. Make sure Network Neighborhood or My Network Places Properties has the TCP/IP Protocol added to allow you to communicate and connect to the Internet. If the protocol is not there, click the Install button, and choose the Protocol. Then make sure the protocol is properly configured:

On the main General tab, select the Protocol, and click the Properties button.

Are the TCP/IP properties set correctly to

Obtain an IP address automatically

And

Obtain a DNS server address automatically?

Or enter a Static address on a Peer to Peer NOT connected to the Internet and not using a DNS server.

  e. Configure File and Printer Sharing for Microsoft Networks.

Depending on version of Windows, select File and Printer Sharing:

On the General tab, click the Install button, choose Service, click the Add button, and select File and Printer Sharing for Microsoft Networks.

or Open Network and Dial-up Connections.

Right-click connection, click Properties and select File and Printer Sharing.

  f. Make sure the proper Folders are shared (Right-click the folder and choose Sharing)

  g. Right-click My Computer, choose Properties, choose the Computer Name tab or Network Identification, make sure you have properly given Workgroup name for a Peer to Peer network, or a Domain name for a Client Server network.

Note: if you set static network IP addresses and they are on different networks, (ex: 192.168.1.1 is on a different network than 192.162.1.3) the machines may not be able to communicate with each other.

Top

=======================================================