Skip to main content

11.8.1 Networking CLI Tools

Learn the different commands that help when troubleshooting network issues.

Command Description Platform
ipconfig Returns basic info regarding the network configuration.

/all: Returns detailed information regarding the network configuration.
/release: Releases all IP addresses assigned to the host, whether assigned by a Dynamic-Host-Configuration-Protocol server or assigned statically by the network administrator.
/renew: Sends a broadcast message out to the network, asking for any DHCP server on the network for a new IP configuration.
/displaydns: Returns the cached DNS settings.
/flushdns: Clears the cached DNS settings.
Windows
ip Umbrella command for other network-based commands.

a/addr/address: Lists all the active network interfaces installed on the host.
r/route: Returns all network routes that the device is associated with.
link: Enables/Disables connected network interfaces.
Linux
hostname Displays the hostname portion of the full computer name of a host. Windows & Linux
ping Sends an ICMP echo request to the target host. If successful, returns information regarding the size of the packets and how long it took for a round trip. Windows & Linux
tracert & traceroute Lists the travel log of an ICMP echo packet by manipulating the packet's TTL value. Each router that the packet passes through is called a hop.

-d: Suppress name resolution.
-h: Specify the maximum hop count.
-w: Specify a timeout value in milliseconds.
-6: Force the usage of IPv6.
Windows & Linux (respectively)
pathping Similar to tracert in the sense that it provides network latency at intermediate hops between the source and destination. Windows
nslookup & dig Reverse lookup utility for finding the IP addresses behind domains by reaching out to the network DNS server. If the DNS server isn't authoritative for the zone of the provided domain, it forwards the query to a root level name server.

@[x.x.x.x]: Specify the name server to send the query to.
a: Specify an A record lookup.
ptr: Specify a reverse lookup using pointer records.
cname: Specify an alias lookup to resolve to a hostname.
mx: Specify a mail server to resolve.
Windows & Linux (respectively)
nmtui Opens a GUI to configure network connection settings. Linux
netstat Displays all active connections, active sessions, and ports. Windows

#XI

#Aplus