1. Operating System Commands
These are the core utilities executed from a workstation terminal (Windows Command Prompt/PowerShell or Linux/macOS bash) to troubleshoot network layer settings, local resolution, or path metrics.
| Command | Usage Example | Explanation / Exam Purpose |
ping | ping 192.168.1.1 | Uses ICMP Echo Requests to verify basic Layer 3 reachability to a remote host and reports round-trip latency. |
traceroute (Linux) / tracert (Windows) | tracert 8.8.8.8 | Identifies the hop-by-hop path to a destination by incrementing the packet’s TTL (Time-To-Live) counter to locate latency or packet drops along a route. |
ipconfig (Windows) | ipconfig /all | Displays local interface settings (IP, Subnet Mask, Default Gateway, DNS, MAC). Flags like /release and /renew request new DHCP leases; /flushdns clears local DNS cache. |
ifconfig (Linux/Unix) | ifconfig eth0 | Legacy Linux tool to view or temporarily configure network interface settings, flags, and basic error counters. |
ip (Linux) | ip addr showip route | Modern Linux utility that replaces ifconfig. Used to view or modify IP addresses, interfaces (ip link), and the local routing table (ip route). |
nslookup | nslookup example.com | Cross-platform utility to test DNS name resolution and query specific record types (e.g., nslookup -type=mx example.com). |
dig (Linux/Unix) | dig example.com MX | Domain Information Groper. Modern Linux DNS lookup tool returning highly detailed text outputs, query flags, and exact TTLs. |
arp | arp -a | Displays or manipulates the operating system’s local Layer 2-to-Layer 3 address translation cache (mapping IP addresses to physical MAC addresses). |
netstat | netstat -an | Displays active network connections, listening ports, interface statistics, and the local system routing table (netstat -r). |
ss (Linux) | ss -tulpn | Socket Statistics. Modern Linux replacement for netstat that provides faster, more detailed dumps of active network sockets and processes. |
tcpdump (Linux/Unix) | tcpdump -i eth0 port 80 | Command-line packet capture utility that sniffs raw network traffic passing through an interface and outputs or saves it as a .pcap file. |
nmap | nmap -sS -p 1-1024 10.0.0.1 | Network Mapper. Security auditing tool used for port scanning, discovering active network hosts, operating system fingerprinting, and service detection. |
pathping (Windows) | pathping 8.8.8.8 | Combines ping and tracert. Measures packet loss percentages on individual intermediate router hops over a set period. |
mtr (Linux) | mtr 8.8.8.8 | My TraceRoute. Combines ping and traceroute into a real-time, continuously updating terminal output to diagnose intermittent path loss. |
route | route print (Windows)route -n (Linux) | Displays or manually edits (adds/deletes) static routes in the local host’s internal routing table. |
hostname | hostname | Prints the exact computer or host name currently assigned to the local operating system session. |
iperf / iperf3 | iperf3 -c 192.168.1.50 | Command-line speed testing utility used to measure real-world network throughput capacity, jitter, and packet loss between a client and server. |
2. Switch & Router CLI Commands (Network Devices)
CompTIA tests these Cisco IOS-style syntax commands to verify switch states, VLAN assignments, route paths, and physical interface metrics.
| Command | Usage Example | Explanation / Exam Purpose |
show mac-address-table | show mac-address-table | Displays the switch’s Layer 2 forwarding database, mapping physical MAC addresses to specific switch ports and VLANs. |
show interface | show interface gig0/1 | Reports the operational state (line/protocol up or down), duplex, speed, and real-time physical error counters (CRC errors, runts, giants, drops). |
show ip route / show route | show ip route | Displays the active Layer 3 routing table on a router or Layer 3 switch, showing directly connected networks, static routes, and dynamic protocols (OSPF, BGP). |
show running-config | show running-config | Prints the current active configuration file running in volatile RAM memory. |
show startup-config | show startup-config | Prints the saved configuration file stored in Non-Volatile RAM (NVRAM) that loads when the device reboots. |
show vlan / show vlan brief | show vlan brief | Lists all configured VLAN IDs, their administrative names, and which switch ports are currently assigned to each VLAN. |
show cdp neighbors | show cdp neighbors | Cisco Discovery Protocol. Displays directly connected adjacent Cisco devices, showing their device IDs, local/remote interfaces, and hardware platforms. |
show lldp neighbors | show lldp neighbors | Link Layer Discovery Protocol. IEEE vendor-neutral discovery protocol that displays details of adjacent connected network equipment. |
show arp | show arp | Displays the Layer 3-to-Layer 2 mapping database cached on a router or Layer 3 switch interface. |
show power inline / show power | show power inline | Displays the status of Power over Ethernet (PoE) ports, including total wattage budget, used wattage, and per-port allocation status. |
show ip interface brief | show ip interface brief | Summary view of all router interfaces showing assigned IP addresses, Layer 1 status, and Layer 2 line protocol status at a glance. |
show port-security | show port-security interface g0/1 | Displays the status of switch port security features (configured MAC limits, sticky MACs, and violation actions like shutdown). |
show spanning-tree | show spanning-tree vlan 10 | Displays Spanning Tree Protocol (STP) parameters, including the Root Bridge ID, local bridge priority, and individual port states (Forwarding, Blocking). |
Exam Tip: Pay close attention to operating system differences in scenario questions. For instance, Windows uses tracert and ipconfig, while Linux uses traceroute and ip (or ifconfig). CompTIA often uses command options as distractors in multiple-choice options.
Resources
Practice Test: https://www.examcompass.com/comptia/network-plus-certification/free-network-plus-practice-tests
Subnetting Calculator: https://richtechguy.com/subnetting-practice-tool/
