| ping | netstat | tracert
| nbtstat | arp | ipconfig
| net | nslookup | lpr
|
PING - verifies connections to a remote computer or computers.
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] target_name
Options:
-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.
-w timeout Timeout in milliseconds to wait for each reply.
NETSTAT - Displays protocol statistics and current TCP/IP network connections.
Usage: NETSTAT [-a] [-e] [-n] [-o] [-s] [-p proto] [-r] [interval]
-a Displays
all connections and listening ports.
-e Displays Ethernet statistics. This may be combined with the -s
option.
-n Displays addresses and port numbers in numerical form.
-o Displays the owning process ID associated with each connection.
-p proto Shows connections for the protocol specified by proto; proto
may be any of: TCP, UDP, TCPv6, or UDPv6. If used with the -s
option to display per-protocol statistics, proto may be any of:
IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
-r Displays the routing table.
-s Displays per-protocol statistics. By default, statistics are
shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;
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.
TRACERT - This diagnostic utility determines the route taken to a destination by sending ICMP (Internet Control Message Protocol) echo packets.
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Options:
-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.
NBTSTAT - This diagnostic command displays protocol statistics and current tcp/ip connections using NBT (NetBIOS over tcp/ip)
NBTSTAT [ [-a
RemoteName] [-A IP address] [-c] [-n]
[-r] [-R] [-RR] [-s] [-S] [interval] ]
-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 IP address.
-c (cache) Lists NBT's cache of remote [machine] names and their 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 computer NETBIOS names.
-RR (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refresh
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.
ARP - Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP).
ARP -s inet_addr
eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]
-a Displays
current ARP entries by interrogating the current protocol data. If inet_addr
is specified, the IP and Physical
addresses for only the specified computer are displayed. If more than one network
interface uses ARP, entries for each ARP
table are displayed.
-g Same as -a. inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface specified by if_addr.
-d Deletes the host specified by inet_addr. inet_addr may be wildcarded with
* to delete all hosts.
-s Adds the host and associates the Internet address inet_addr with the Physical
address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be modified.
If not present, the first applicable interface will be used.
Example:
> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.
IPCONFIG - This diagnostic command displays all current tcp/ip network configuration values.
USAGE:
ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
/flushdns | /displaydns | /registerdns |
/showclassid adapter |
/setclassid adapter [classid] ]
where
adapter Connection name
(wildcard characters * and ? allowed, see examples)
Options:
/? 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.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.
The default is to display only the IP address, subnet mask and default gateway for each adapter bound to TCP/IP.
For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed.
For Setclassid, if no ClassId is specified, then the ClassId is removed.
Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapters
> ipconfig /renew EL* ... renew any connection that has its name starting
with EL
> ipconfig /release *Con* ... release all matching connections, eg. "Local
Area Connection 1" or "Local Area Connection 2"
NET - Many Windows NT networking commands begin with net.
There are several net commands. Typing "net help" will list the following:
NET ACCOUNTS
NET COMPUTER
NET CONFIG
NET CONFIG SERVER
NET CONFIG WORKSTATION
NET CONTINUE
NET FILE
NET GROUP
NET HELP
NET HELPMSG
NET LOCALGROUP
NET NAME
NET PAUSE
NET PRINT
NET SEND
NET SESSION
NET SHARE
NET START
NET STATISTICS
NET STOP
NET TIME
NET USE
NET USER
NET VIEW
NET HELP SERVICES
lists some of the services you can start.
NET HELP SYNTAX explains how to read NET HELP syntax lines.
NET HELP command | MORE displays Help one screen at a time.
These commands
are useful for several reasons:
1) You are running older, non-gui based network software.
2) You are running a hybrid network of win machines and other boxes.
3) As the client machine, you may not have normal access to this information.
4) You are running command-line batches or programs that need to run across
the network.
NSLOOKUP - This diagnostic tool displays information from DNS name servers.
nslookup [-option ...] [computer-to-find | - [server]]
A nslookup
for yahoo.com yields:
Non-authoritative answer:
Name: www.yahoo.akadns.net
Addresses: 66.218.71.91, 66.218.71.92, 66.218.70.48, 66.218.70.49
66.218.70.51, 66.218.71.80, 66.218.71.81, 66.218.71.87
Aliases: www.yahoo.com
LPR - This connectivity utility is used to print a file to a computer running an LPD server.
lpr -SServer -PPrinter [-CClass] [-JJobname] [-O option] filename
Parameters
-SServer - Specifies the name or IP address of the computer that has the printer
attached to it.
-PPrinter - Specifies the name of the printer for the desired queue.
-CClass - Specifies the content of the banner page for the class.
-JJobname - Specifies the name of this job.
-O option - Indicates the type of file. The default is a text file. Use -Ol
(lowercase `L) for a binary file (for example, PostScript).
filename - The name of the file to be printed.