NETSTAT
This command displays protocol statistics and gets information
about TCP/IP connections.
- Command Syntax
- Netstat [-a] [-e] [-n] [-s] [-p protocol] [-r] [interval]
- Command Switches
- -a: displays connections and listening ports and their current
state, but not the server sessions.
- -e: displays Ethernet stats.
- -n: displays active connections, listed by IP address.
- -s: displays per-protocol statistics for IP, ICMP, TCP, and UDP.
- -p protocol: displays active connection statistics for the
chosen protocol (TCP or UDP), can use with the -s switch for more
information.
- -r: displays the contents of the routing table.
ipconfig/winipcfg
These utilities display IP-addressing information for the local
network adapter(s) or a specified NIC. IPCONFIG is a command-line tool; WINIPCFG
is GUI-based.
- Command Syntax
- ipconfig [/all | /renew [adapter] | /release [adapter]]
- Command Switches
- /all: all information about adapter(s).
- /renew: renew DHCP lease information for all local adapters if
none is named.
- /release: release DHCP lease information thereby disabling
TCP/IP on this adapter.
FTP
This utility is used to transfer files between server and
client. This is a reliable method of data transfer because it uses TCP. There is
a long list of session commands for file management.
- Command Syntax
- ftp [-v] [-n] [-i] [-d] [-g] [-s: filename] [hostname]
- Command Switches
- -v: suppresses any display server responses (@echo off in DOS).
- -n: prevents automatic login when connection has been
established.
- -I: turns off interactive prompting during file transfer.
- -d: displays all ftp commands exchanged between client and
server; for debugging.
- -g: disables the globbing capability.
- -s: filename - specifies a text file containing ftp commands
and then runs the commands within the file, similar to a batch file.
- hostname: the host to connect to and MUST be the LAST parameter
specified.
Ping
Will send ICMP echo packets to verify connections to a remote
host (or test the local TCP/IP installation if using the loopback address).
- Command Syntax
- ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r
count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout]
destination-list
- Command Switches
- -t: ping until interrupted.
- -a: ping address and resolves host name.
- -n count: send number of echo packets.
- -l length: send echo packets of a specified size.
- -f: sends a DO NOT FRAGMENT command to gateways.
- -i ttl: sets the TTL field (Time To Live—the number of hops
between nodes allowed, before ending).
- -r count: records the route of the outgoing and returning
packets.
- destination-list: specifies the remote hosts to ping, by domain
name or by IP address.
Nslookup
Queries a name server and finds out which name resolves to which
IP address.
- Command Syntax
- Type=mx: returns the email server for that domain.
- Domain=<domain name>: sets the current domain name to the
domain name in <domain name>.
- Retry=X: specifies the number of retries with “X”
representing the number of specified seconds.