Important Networking Commands
As a network engineer, being well-versed in various
commands is essential for managing and troubleshooting a network. Here are some
of the most common commands that you may encounter in your role, along with an
example of how each command might be used:
- Ping:
To test the reachability of the host on a network, we use ping command, we
do this by sending ICMP packets to the host & waiting for a reply.
suppose, if we wish to test/check the reachability of host with IP 192.168.1.1, we can do this by sending
the command " ping 192.168.1.1".
- Tracert or Traceroute:The
command Tracert or Traceroute is utilized to track the route that a packet
follows from its origin to its destination, displaying the IP addresses of
each router that it passes through. If you want to trace the path to a
host with the IP address 192.168.1.1, you can use the command
"tracert 192.168.1.1".
- Ipconfig/ifconfig: This
commands(ipconfig or ifconfig) is used to demonstrate or show the IP
configuration of the network interface on a host. E.g, on a Windows host,
the command "ipconfig" will show the IP address, subnet mask, &
default gateway for the each network interface on the said host.
- Netstat: This command is
used to display active network connections, listening ports, and network
statistics on a host. To display all active TCP and UDP connections and
the listening ports on a host, you can use the command "netstat
-a".
- Nslookup: The command
Nslookup is employed to perform DNS lookups in order to resolve domain
names into IP addresses. For instance, if you want to resolve the domain
name "google.com" to an IP address, you can use the command
"nslookup google.com".
- Arp: This command is used
to display and manipulate the ARP cache, which maps IP addresses to MAC
addresses on a network.In order to view the contents of the ARP cache on a
host, the command "arp -a" is used.
- Route: This command is used
to display and manipulate the routing table, which is used by a host to
determine the best path to a destination network. To display the routing
table on a Windows host, you can use the command "route print".
- Top:
The top command is a popular Unix/Linux command used by network
engineers and system
administrators to monitor the performance and resource utilisation of a
system in real-time. The top command displays a dynamic, real-time view of
the processes running on a system, along with information about system
resources such as CPU, memory, and disk usage.
Below are some of the primary features and options of the
top command:
●
The top command displays a table of processes, sorted
by various criteria such as CPU usage, memory usage, or process ID. By default,
the processes are sorted by CPU usage, with the most CPU-intensive processes
listed first.
●
The top command exhibits real-time statistics for
system resources, including CPU usage, memory usage, and disk I/O. The
statistics are updated every few seconds, offering an up-to-the-minute view of
the system's performance.
●
The top command provides a summary of system resource
usage at the top of the screen, including the total number of processes, the
total amount of memory and swap space, and the current CPU utilization.
●
The top command allows you to interactively control and
modify the display, by pressing various keys to sort the processes, filter the
display, or adjust the refresh rate.
●
The top command supports various command-line options,
such as -d to set the refresh rate, -p to specify a process ID to monitor, and
-u to specify a user ID to monitor.