Friday, December 6, 2019

Some network debug commands

1. ifconfig:

The "ifconfig" command (short for "interface configuration") is used to view and configure the network interfaces on a system. It displays information about the active network interfaces, such as their IP addresses, MAC addresses, network masks, and other relevant details. Additionally, ifconfig can be used to enable or disable network interfaces and set specific parameters like IP address assignment, netmask, and broadcast address.


2. iwconfig:

The "iwconfig" command is primarily used in Linux systems to configure wireless network interfaces. It provides information about wireless network interfaces and allows you to manipulate their settings. With iwconfig, you can view details such as the name of the wireless interface, its wireless mode, the channel it is using, the signal quality, and the encryption settings. It also enables you to set parameters like the wireless mode, channel, power management, and encryption keys.


3. ping:

The "ping" command is a basic network troubleshooting utility used to check the reachability of a remote host or network device. It sends ICMP (Internet Control Message Protocol) Echo Request packets to the specified IP address or hostname and waits for an ICMP Echo Reply. By measuring the round-trip time and success rate of the ping replies, you can assess the connectivity and latency to a particular destination. Ping is commonly used to diagnose network connectivity issues, test network performance, and troubleshoot network problems.


4. arp -a:

The "arp" command stands for Address Resolution Protocol. The "arp -a" command is used to view the ARP cache, which is a table that maps IP addresses to MAC addresses on a local network. The output displays the IP-MAC address pairs of devices that the system has recently communicated with. It can help identify and verify the MAC addresses of devices connected to your network, and it's particularly useful for troubleshooting connectivity problems or detecting unauthorized devices.


5. route:

The "route" command displays and manipulates the IP routing table of a system. It shows the network routing information, including the destination network, gateway, netmask, and interface. The routing table is used by the operating system to determine the path (route) that network packets should take to reach a particular destination. With the "route" command, you can add, delete, or modify routes to control network traffic and troubleshoot routing-related issues.


6. netstat -plant:

The "netstat" command (short for "network statistics") is a versatile utility used to display various network-related information on a system. When used with the "-plant" options, it shows active network connections, listening ports, and associated processes. It provides a snapshot of the system's network activity, including the local and remote IP addresses, port numbers, protocol, and the state of each connection. Netstat is valuable for troubleshooting network issues, monitoring network usage, and identifying potential security threats.


***