-
ping
- Verifies IP connectivity to another TCP/IP computer by sending ICMP echo Request messages.
- If successful, the receipt of corresponding ICMP echo Reply messages are displayed, along with round-trip times.
- ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution.
- Used without parameters, ping displays help.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ping
-
netstat
-
Displays the following network information:
- Active TCP Connections
- Listening TCP/IP Ports
-
IPv4/IPv6 TCP/IP Protocol Stack Statistics:
- TCP(v6)
- UDP(v6)
- IP(v6)
- ICMP(v6)
- Ethernet Statistics
- The IP Routing Table
- Used without parameters, netstat displays active TCP connections.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat
-
tracert
- Determines the path taken to a destination by sending ICMP echo Request or ICMPv6 messages to the destination with incrementally increasing TTL field values.
- The path displayed is the list of near/side router interfaces of the routers in the path between a source host and a destination.
- The near/side interface is the interface of the router that is closest to the sending host in the path.
- Used without parameters, tracert displays help.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tracert
-
nslookup/dig
-
nslookup:
- Displays information that you can use to diagnose Domain Name System (DNS) infrastructure.
- Before using this tool, you should be familiar with how DNS works.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup
-
dig:
- dig (domain information groper) is a Unix-like network administration command-line tool for querying Domain Name System (DNS) servers.
- dig is useful for network troubleshooting and for educational purposes.
-
arp
- Displays and modifies entries in the Address Resolution Protocol (arp) cache, which contains one or more tables that are used to store IP addresses and their resolved Ethernet or Token Ring physical addresses.
- There is a separate table for each Ethernet or Token Ring network adapter installed on your computer.
- Used without parameters, arp displays help.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/arp
-
ipconfig/ip/ifconfig
- Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings.
- Used without parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters.
-
The command used is dependent upon the Operating System (OS):
-
Windows:
- ipconfig
-
Linux/UNIX:
- ifconfig
-
ip
- A newer variant that acts as a swiss-army knife network configuration command line tool.
- The ip command, along with proper appended keyword arguments, can perform basic functions of nslookup, arp, ifconfig, and other common commands.
- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig
-
tcpdump
- dump traffic on a network
-
Syntax:
- Tcpdump prints out a description of the contents of packets on a network interface that match the boolean expression; the description is preceded by a time stamp, printed, by default, as hours, minutes, seconds, and fractions of a second since midnight.
- It can also be run with the -w flag, which causes it to save the packet data to a file for later analysis, and/or with the -r flag, which causes it to read from a saved packet file rather than to read packets from a network interface.
- It can also be run with the -V flag, which causes it to read a list of saved packet files.
- In all cases, only packets that match expression will be processed by tcpdump.
- Tcpdump will, if not run with the -c flag, continue capturing packets until it is interrupted by a SIGINT signal (generated, for example, by typing your interrupt character, typically control-C) or a SIGTERM signal (typically generated with the kill(1) command); if run with the -c flag, it will capture packets until it is interrupted by a SIGINT or SIGTERM signal or the specified number of packets have been processed.
-
When tcpdump finishes capturing packets, it will report counts of:
- Packets captured
- Packets received
- Packets dropped
- http://www.tcpdump.org/manpages/tcpdump.1.html
-
nmap
- Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security auditing.
-
Uses:
- network discovery
- security auditing
- network inventory
- managing service upgrade schedules
- monitoring host or service uptime
-
Variants:
-
Nmap:
- The classic command-line executable tool
-
Zenmap:
- An advanced GUI and results viewer
-
Ncat:
- A flexible data transfer, redirection, and debugging tool
-
Ndiff:
- A utility for comparing scan results
-
Nping:
- A packet generation and response analysis tool
- https://nmap.org/docs.html
-
netcat
- nc — arbitrary TCP and UDP connections and listens
- The nc (or netcat) utility is used for just about anything under the sun involving TCP, UDP, or UNIX-domain sockets.
- It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6.
- Unlike telnet, nc scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet does with some.
-
Common uses include:
- simple TCP proxies
- shell-script based HTTP clients and servers
- network daemon testing
- a SOCKS or HTTP ProxyCommand for ssh(1)
- and much, much more
- https://man.openbsd.org/nc