CMD Switches

jkjkrules's version from 2015-06-04 22:29

Section 1

Question Answer
arp -a or -gDisplays both the IP and MAC addresses and wheather they are dynamic or static
arp inet_addrSpecifies a specific internet address
arp -N if _addrDisplays the ARP entries for a specified network interface
arp eth_addrSpecifies a MAC address
arp if_addrSpecifies an internet address
arp -dDeletes an entry from the ARP cache
arp -sAdds a static permanent address to the ARP cache

Section 2

Question Answer
ipconfig ?Displays the ipconfig help screen
ipconfig /allDisplays additional IP configuration information.
ipconfig /releaseReleases the IPv4 address of the specified adapter
ipconfig /release6Releases the IPv6 address of the specified adapter
ipconfig /renewRenews the IPv4 address of a specified adapter
ipconfig /renew6Renews the IPv6 address of a specified adapter
ipconfig /flushdnsPurges the DNS cache
ipconfig /registerdnsRefreshes the DHCP lease and registers the DNS names
ipconfig /displaydnsUsed to display the information in the DNS cache

Section 3

Question Answer
netstat -aDisplays the current connections and listening ports
netstat -eDisplays Ethernet statistics
netstat -nLIsts addresses and port numbers in numeric form
netstat -pShows connections for the specified protocol
netstat -rShows the routing table
netstat -sLIst per-protocol statistics
netstat intervalSpecifies how long to wait before redisplaying statistics

Section 4

Question Answer
nbtstat -a (Adapter status)Outputs the NetBIOS name table and MAC addresses of the card for the specified computer.
nbtstat -A (IP address)(Adapter status) Lists the remote machine’s name table given its IP address.
nbtstat -c (cache)Lists the contents of the NetBIOS name cache.
nbtstat -n (names)Lists local NetBIOS names.
nbtstat -r (resolved)Lists names resolved by broadcast or WINS.
nbtstat -R (Reload)Purges and reloads the remote cache name table.
nbtstat -S (Sessions)Summarizes the current NetBIOS sessions and their status.
nbtstat -s (sessions)Lists the sessions table, converting destination IP addresses into computer NetBIOS names.
nbtstat -RR (ReleaseRefresh)Sends Name Release packets to WINS and then starts Refresh.
nbtstat RemoteNameRemote host machine name.
nbtstat IP addressDotted-decimal representation of the IP address.
nbtstat intervalRedisplays selected statistics, pausing inter val seconds between each display. Press Ctrl+C to stop redisplaying statistics.

Section 5

Question Answer
nslookup allPrints options, as well as current server and host information
nslookup [no] debugPrints debugging information
nslookup [no] d2Prints exhaustive debugging information
nslookup [no] defnameAppends the domain name to each query
nslookup [no] recurseAsks for a recursive answer to the query
nslookup [no] searchUses the domain search list
nslookup [no] vcAlways uses a virtual circuit
nslookup domain=NAMESet the default domain name to NAME
nslookup srchlist=N1[/N2/.../n6]Sets the domain to N1 and the search list to N1, N2, and so on
nslookup root=NameSets the root server to NAME
nslookup Retry=XSets the number of retries to X
nslookup timeout=xSets the initial timeout interval to X seconds
nslookup Type=XSets the query type (for example, A, ANY, CNAME, MX, NS, PTR, SOA, or SRV)
nslookup querytype=XSets the query type (for example, A, ANY, CNAME, MX, NS, PTR, SOA, or SRV)
nslookup Class=XSets the query class(for example, IN[Internet], ANY)
nslookup [no]msxfr Uses Microsoft fast zone transfer
nslookup ixfrver=xThe current version to use in an IXFR transfer request
nslookup server NAME Sets the default server to NAME, using the current default server
ExitExits the program

Section 6

Question Answer
ping -tPings A device on the network until stopped
ping -a Resolve address to hostnames
ping -n countSpecifies the number of echo requests to send
ping -r countRecords the route for count hops
ping -s countTimestamp for count hops
ping -w timeoutTimeout in milliseconds to wait for each reply

Section 7

Question Answer
route addEnables you to add a static route to the routing table.
route deleteEnables you to remove a rout from the routing table.
route changeenables you to modify an existing route.
route -pWhen used with add command, makes the route permanent. If the -p switch is not used when a route is added, the route is lost upon reboot.
route print Enables you to view the system's routing table
route -fRemoves all gateways entries from the routing table.