Net+ Command Line Tools
tcpdump
• Capture packets from the command line • Available in most Unix/Linux operating systems - Included with Mac OS X, available for Windows (WinDump) • Apply filters, view in real-time • Written in standard pcap format
Telnet
• Login to devices remotely • In-the-clear communication • Useful for checking a port or application • telnet <ip address> <port number>
Nmap
• Network mapper - find network devices • Port scan - Find devices and identify open ports • Operating system scan - Discover the OS without logging in to a device • Service scan • Additional scripts - Nmap Scripting Engine (NSE)
traceroute - Determine the route a packet takes to a destination
• Takes advantage of ICMP Time to Live Exceeded error message • Not all devices will reply with ICMP Time Exceeded messages • traceroute <ip address>
hostname
• View the FQDN and IP address of the device • Windows, Linux, macOS, and others • hostname
route
• View the device's routing table - Find out which way the packets will go • Windows: route print • Linux and macOS: netstat -r
arp - Address resolution protocol information
• arp -a - View the local ARP table
ipconfig, ifconfig, ip - View and manage IP configuration
• ipconfig - Windows TCP/IP config • ipconfig /all - Display all IP configuration details • ipconfig /release - Release the DHCP lease • ipconfig /renew - Renew the DHCP lease • ipconfig /flushdns - Flush the DNS resolver cache • ifconfig - Linux interface configuration • ip address - The latest Linux utility
netstat - Display network statistics
• netstat -a - Show all active connections • netstat -b - Show binaries • netstat -n - Do not resolve names
nslookup and dig - Lookup information from DNS servers
• nslookup <ip addess> • dig <ip address>
ping- test reachability
• ping <ip address> - Test reachability to a TCP/IP address • ping -t <ip address> - Ping until stopped with Ctrl-c • ping -a <ip address> - Resolve address to a hostname • ping -n <count> <ip address> - Send a # of echo requests • ping -f <ip address> - Send with Don't Fragment flag set
Basic platform commands
• show interface - View the interfaces on a device - View detailed interface information • show config - View the device configuration • show route - View the routing table