5 Most useful Network utilities
Unix has strong commands/utilities to monitor/debug/control the network.Here are the 5 most useful tools:
1.Tcpdump:
Tcpdump, very popular network debugging tool, is used to intercept and display packets transmitted/received on a network.Tcpdump command provide various options like dumping the tcp packets only,udp packets only,packets from a specific ports, dumping traffic of a specific interface(This is very useful when you have multiple interfaces connected to different network) and many more.Some of important examples are:
tcpdump -q : It displays the quick output.
tcpdump -i eth1: It displays the traffic of eth1 interface.
tcpdump udp: It captures the udp traffic
tcpdump port: It captures the traffic of a particular port number.
tcpdump -w xyz.log: It send the captured packets to a file xyz.log.
tcpdump "tcp and !www.xyz.com": It captures the tcp packets except from www.xyz.com
2.nmap:
nmap,Network mapper, is a opensource utility for network exploration.nmap discovers the hosts and services on the network hence creating a map of the network.Main functions of nmap are 5 D's:
-Discover the host and hopcount
-Discover the open/closed/filtered ports of the remote node.
-Discover the services corresponding to the open ports and detection of version of services.
-Detection of Operating system of remote node.
-Detection of firewall presence in remote node.
Example:
3.Netstat:
Netstat is a useful tool for checking your network configuration and activity.It displays all the current TCP/IP connections and protocol statistics.Main functions of Nstat command are:
-Display of routing table
-Display of interface statistics
-Display of active/passive socket connections
Example:
4.Ping:
Ping is very simple and most commonly used utility.Ping command is used to test the reach-ability of remote system in a Internet protocol network, to test loss of packets and to measure the round-trip time taken by the packets sent from local system to a destination system.Ping command uses ICMP protocol(Internet control message protocol).
The Internet Ping program works much like a sonar echo-location, sending a small packet of information containing an ICMP ECHO_REQUEST to a specified computer, which then sends an ECHO_REPLY packet in return.Depending upon the status of destination system it returns the messages.
5.Telnet with byobu
Telnet utility is used for monitoring and administration of remote systems.
One important thing is how to monitor many remote systems ?Suppose if you need to continuously monitor the 10 different remote telnet sessions, obviously you need to maintain 10 telnet terminals.It is not easy to maintain 10 different terminals.So you can manage your telnet sessions from a single screen using linux byobu utility.Steps to achieve this:
step1:Type byobu in a terminal.After this window as shown in snapshot appears:
step2:Type byobu-config command to create new screen as shown in snapshot:
(Configure the background and screen name)
Repeat step2 to create more windows.You can see all the windows with its name(default n$ bash) at the buttom of single screen.Refer to snapshot showing different windows name:
Alternatively, number of windows can be created using "screen" command but here window is created with default name and configuration.
Step3:Now initiate a telnet session from each window.
Navigation between different windows is done using Ctrl+an.
1.Tcpdump:
Tcpdump, very popular network debugging tool, is used to intercept and display packets transmitted/received on a network.Tcpdump command provide various options like dumping the tcp packets only,udp packets only,packets from a specific ports, dumping traffic of a specific interface(This is very useful when you have multiple interfaces connected to different network) and many more.Some of important examples are:
tcpdump -q : It displays the quick output.
tcpdump -i eth1: It displays the traffic of eth1 interface.
tcpdump udp: It captures the udp traffic
tcpdump port
tcpdump -w xyz.log: It send the captured packets to a file xyz.log.
tcpdump "tcp and !www.xyz.com": It captures the tcp packets except from www.xyz.com
2.nmap:
nmap,Network mapper, is a opensource utility for network exploration.nmap discovers the hosts and services on the network hence creating a map of the network.Main functions of nmap are 5 D's:
-Discover the host and hopcount
-Discover the open/closed/filtered ports of the remote node.
-Discover the services corresponding to the open ports and detection of version of services.
-Detection of Operating system of remote node.
-Detection of firewall presence in remote node.
Example:
3.Netstat:
Netstat is a useful tool for checking your network configuration and activity.It displays all the current TCP/IP connections and protocol statistics.Main functions of Nstat command are:
-Display of routing table
-Display of interface statistics
-Display of active/passive socket connections
Example:
4.Ping:
Ping is very simple and most commonly used utility.Ping command is used to test the reach-ability of remote system in a Internet protocol network, to test loss of packets and to measure the round-trip time taken by the packets sent from local system to a destination system.Ping command uses ICMP protocol(Internet control message protocol).
The Internet Ping program works much like a sonar echo-location, sending a small packet of information containing an ICMP ECHO_REQUEST to a specified computer, which then sends an ECHO_REPLY packet in return.Depending upon the status of destination system it returns the messages.
5.Telnet with byobu
Telnet utility is used for monitoring and administration of remote systems.
One important thing is how to monitor many remote systems ?Suppose if you need to continuously monitor the 10 different remote telnet sessions, obviously you need to maintain 10 telnet terminals.It is not easy to maintain 10 different terminals.So you can manage your telnet sessions from a single screen using linux byobu utility.Steps to achieve this:
step1:Type byobu in a terminal.After this window as shown in snapshot appears:
step2:Type byobu-config command to create new screen as shown in snapshot:
(Configure the background and screen name)
Repeat step2 to create more windows.You can see all the windows with its name(default n$ bash) at the buttom of single screen.Refer to snapshot showing different windows name:
Alternatively, number of windows can be created using "screen" command but here window is created with default name and configuration.
Step3:Now initiate a telnet session from each window.
Navigation between different windows is done using Ctrl+an.
Comments
Thank you once again.