DOS/Windows IP Commands

To run the following commands in Windows XP/Vista click start, then choose run, type "cmd" and press return.  This will bring up the command prompt window.

Command Function Options
PING Verifies and tests connectivity [-t] [-a] [-n] [-l] [-f] [-i] [-v] [-r] [-s] [-j] [-k]
WinIPCFG Displays the current TCP/IP configuration and information on windows 95/98  
IPCONFIG Displays the current TCP/IP configuration and information on 98/NT/2000 [/? | /all | /release [adapter] | /renew [adapter]]
TRACERT Displays the path a packet takes to a destination host computer [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
NETSTAT Displays the TCP/IP protocol sessions, connections and open port connection information [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]
NBTSTAT Displays a list of NetBIOS computer names that have been resolved to IP addresses [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-s] [-S] [interval]
ROUTE Displays or modifies the local routing table [-fp] [command [destination] [MASK netmask] [gateway]]
ARP Displays the cache of locally resolved IP addresses to MAC (media access control) addresses  
LPQ Obtains status of the print queue on a host running the LPD services  
PING Options Explained
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
IPCONFIG Options Explained
/? Display this help message.
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter
TRACERT Options Explained
-d  Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target. 
-j host-list   Loose source route along host-list. 
-w timeout   Wait timeout milliseconds for each reply 
NETSTAT Options Explained
-a Displays all connections and listening ports. (Server-side connections are normally not shown).
-e  Displays Ethernet statistics. This may be combined with the -s option. 
-n Displays addresses and port numbers in numerical form. 
-p proto  Shows connections for the protocol specified by proto; proto may be tcp or udp. If used with the -s option to display per-protocol statistics, proto may be tcp, udp, or ip. 
-r  Displays the contents of the routing table. 
-s  Displays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP; the -p option may be used to specify a subset of the default. 
interval  Redisplays selected statistics, pausing interval seconds between each display. Press CTRL+C to stop redisplaying statistics. If omitted, netstat will print the current configuration information once.
NBTSTAT Options Explained
-a  (adapter status) Lists the remote machine's name table given its name
-A  (Adapter status) Lists the remote machine's name table given its 
-c  (cache) Lists the remote name cache including the IP addresses 
-n  (names) Lists local NetBIOS names. 
-r   (resolved) Lists names resolved by broadcast and via WINS 
-R  (Reload) Purges and reloads the remote cache name table 
-S  (Sessions) Lists sessions table with the destination IP addresses.
-s  (sessions) Lists sessions table converting destination IP addresses to host names via the hosts file. 
RemoteName  Remote host machine name. 
IP address  Dotted decimal representation of the IP address. 
interval  Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C to stop redisplaying statistics.
ROUTE Options Explained
-f   Clears the routing tables of all gateway entries. If this is used in conjunction with one of the commands, the tables are cleared prior to running the command. 
-p  When used with the ADD command, makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. When used with the PRINT command, displays the list of registered persistent routes. Ignored for all other commands, which always affect the appropriate persistent routes. 
command  Specifies one of four commands:
PRINT Prints a route ADD Adds a route
DELETE Deletes a route
CHANGE Modifies an existing route
destination  Specifies the host to send command. 
MASK  If the MASK keyword is present, the next parameter is interpreted as the netmask parameter.
netmask If provided, specifies a sub-net mask value to be associated with this route entry. If not specified, if defaults to 
gateway  Specifies gateway. 


Please visit our sponsors

Copyright 2008-2012 All Rights Reserved