Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Netstat

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 61
    Comment on it

    Netstat in networking is used to view the ports and check their status.

     

    It will provide you the information which port is accessed ,which port is damaged and which port is free.

     

    Netstat allows you to make the log table of the ports and used whenever you need it.

     

    NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]
    
      -a            Displays all connections and listening ports.
      -e            Displays Ethernet statistics. This may be combined with the -s
                    option.
      -n            Displays addresses and port numbers in numerical form.
      -o            Displays the owning process ID associated with each connection.
      -p proto      Shows connections for the protocol specified by proto; proto
                    may be any of: TCP, UDP, TCPv6, or UDPv6.  If used with the -s
                    option to display per-protocol statistics, proto may be any of:
                    IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
      -r            Displays the routing table.
      -s            Displays per-protocol statistics.  By default, statistics are
                    shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;
                    the -p option may be used to specify a subset of the default.
      interval      Redisplays selected statistics, pausing interval seconds
                    between each display.  Press CTRL+C to stop redisplaying
                    statistics.  If omitted, netstat will print the current
                    configuration information once.

     

    A

    The first switch, a, is used as the syntax below:

    netstat -a 
    

    This command lists all active connections including listening ports.

    E

    The e switch lists the statistics of the internet connection, including how many packets were sent, recieved or how many bytes were recieved.

    N

    The n switch lists all connections and remote computers in numerical form, this being in IP form. For example if you would like to view the server IP in numerical form, use the n switch to transform the web address of to the corresponding IP.

    O

    This switch lists active connections, combined with its PID (Process Identification Number).

    P

    The p switch gives the user the ability to filter through protocols including TCP, UDP, IP, ICMP, TCPv6, UDPv6, IPv6 and ICMPv6.

    R

    The r switch lists information for your ethernet card, netmask, gateway, network destination, etc. For example,

    netstat -nr 
    

    analyzes the routing table.

    S

    The s switch prints to the screen statistics for each protocol, including those in the p switch. This switch can be combined with the p switch in order to display specific statistics for each specified protocol:

    netstat -ps TCP 
    

    The above command lists the statistics for the TCP protocol, plus its active connections. This query can be narrowed down to an even more specific or broader range of connections, as descibed below.

    Interval

    The interval switch allows you to give your computer a specific time, or interval, between the netstat probings of active connections. For example,

    netstat -an 20 
    

    lists all connections (switch a) in numeric form (switch n) and spaces each netstat command 20 seconds (interval (20)). Command returns a list of connections every 20 seconds.

     

    Networking

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: