Monday, February 10, 2014

We have already gone through the netstat command uses but there are lots of uses of this command. We will understand some of the uses in this article.
·         When we use –r flag with linux netstat command then it is giving output same as route command. route command gives output info as kernel IP routing table. I have used –n flag with netstat, it gives IP information in dotted rather than symbolic host and network names.

Let’s understand column wise details about above output-


First column shows the destination IP address or symbolic hostname. 


Second column shows the gateway to which the routing entry points. If gateway is not used then asterisk (*) is printed instead. 


Third column is general mask, which is used when given IP address finding suitable route then kernel checks with each routing table entry and taking bitwise AND of the address and genmask before comparing it to the target of the route.


The fourth column can shows the following flags and their meaning as follows:
G             the route uses the gateway
U             the interface to be used is up.
H             only single host can be reached through the route. It is in case of loopback address.
D             this route is dynamically created.
M            sets when table entry was made by ICMP redirect message.
!              the route is reject route and datagram will be dropped.


Fifth column shows MSS i.e. Maximum segment size. i.e. this is largest datagram size which kernel has constructed for transmission via route.


Sixth column shows the window i.e. it is the maximum amount of data system can accept from single burst from a remote host.


Seventh column shows the irtt. i.e. Initial round trip time. The TCP protocol keeps the time to deliver a datagram and then acknowledgement of received, this is called round trip time. And initial round trip time is the time when connection established.
Eighth and last column gives information about network interface that this route will use.
Posted by Machindra Dharmadhikari On 2/10/2014 10:16:00 PM No comments


Post a Comment

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

    Chitika Ads 2



    Enter your email address:

    Delivered by FeedBurner