Basically, the netstat command displays detailed statistics of every individual network connection, network interfaces, routing tables, network protocols and other network-specific information. netstat helps us to deal with network issues and encourages network admins to have better performance measurement.
netstat Commands
1. Enlisting all ports (Listening ports and Non-listening ports)
netstat -a
To enlist all TCP ports, enter:
netstat -at
To enlist all UCP ports, enter:
netstat -au
2. Enlisting all Listening ports
To enlist all ports in Listening state:
netstat -l
To enlist all TCP ports in Listening state:
netstat -lt
To enlist all UDP ports in Listening state:
netstat -lu
To enlist all UNIX ports in Listening state:
netstat -lx
3. Display Statistics of Protocol
To show statistics of all protocols:
To show statistics of TCP protocol:
netstat -st
To show statistics of UDP protocol:
netstat -su
4. Display Process ID/Program ID (PID) and Program Name
netstat -pt
This command will display all the processes/programs running on corresponding ports.
5. Display netstat Continuously
netstat -c6. To show non-supportive Address families
netstat --verbose
After running above command, you will observe some lines at the end which read as:
7. Show Kernel IP Routing Table
netstat -r
8. Enlist all Network Interfaces
netstat -i
To display detailed information of each network interface, run following command:
netstat -ie
0 comments:
Post a comment