Commands Flashcards
Network Statistics (netstat)
- Display information for IP-based connections
- Current sessions
- Source and destination IPs
- Port numbers
netstat -a
- All sockets, including listing
- TCP&UDP connections
- Addresses and port #s expressed numerically
- Host names
netstat -o
- Displays active TCP connections (no listening)
- Includes process ID (PID) for each connection. (goes back to task man)
- You can find the application based on the PID on the Processes tab in Task Manager.
- Can be combined with -a, -n, and -p
netstat -n
- Displays active TCP connections, (not listening)
- Addresses and port numbers are expressed numerically
netstat -s
- Displays statistics by protocol.
- TCP, UDP, ICMP, and IP protocols display by default
- The -p parameter can be used to specify a set of protocols
- If the IPv6 protocol is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols.
.
tcpdump
Display TCP/IP and other packets being transmitted or received
Network Mapper (nmap)
Discovers hosts and services on a computer network by sending packets and analyzing the responses
show interface
Displays statistics for the network interfaces on the network platform
can specify interface with (ethernet #/#)
show config
Displays the current network platform configuration
show route
Displays the current sat of the routing table on the network platform
show startup-config
Command to show start configuration on router
show running-config
Command to show Running configuration on router
copy running-config startup-config
Command to save Running configuration to start configuration on a router
ip (command)
Assigns an address to a network interface or configures network interface parameters in Unix, Linux, and OS X
Name Server Lookup (nslookup)
Used to query the DNS to provide the mapping between domain names and IP address or other DNS records
dig
Used to conduct queries against DNS nameservers and is only available for Linus, Unix, and OS X systems by default
dig -t ____
Specify type of DNS record
Address Resolution Protocol (arp) command
Used to display and modify entries in the Address Resolution Protocol (or ARP) cache on a system
arp -a
View ARP cache
arp -d ipaddress
delete an IP address from an ARP table
arp -s ipaddress macaddress
staticly assign an ip address to an ARP table
arp -d
delete entire ARP cache
route
Command used to view and manipulate the IP routing table in Windows, Linux, Unix, or OS X
route print
Command to display IP routing table in Windows
route -n
Display routing table in Linux and Unix
route add destnetwork mask subnetmask metric # if #
Add static route to routing table
nbtstat
Command used to view the current connections and statistics for devices communicating using the NetBIOS over TCP/IP protocol
Windows Only
Interface Configuration (ifconfig)
Command line tool used in Unix, Linux, and OS X systems to display IP address information