Skip to content
Smarter by Design.Simpler for Business

sys-cmd netstat ​

sys-cmd netstat shows the network state of the route table selected in WEB-CLI: the open connections and the listening ports, the routing table, the incoming and outgoing packet, error and dropped packet counts per interface, and the protocol counters. It is used especially to see the routes of the route table and the interface statistics with a single command.

Command Summary ​

TR7 WEB-CLI · sys-cmd netstat
# type netstat and press Tab: a free parameter
admin@TR7LBWAF01> sys-cmd netstat
<netstat-parameter-1>
 
admin@TR7LBWAF01> sys-cmd netstat <parameters>
admin@TR7LBWAF01>  

Everything written after the word netstat is passed to the tool as it is. There is no mandatory field.

How It Works ​

SubjectBehavior
ContextIt shows the connections, the routes and the interfaces of the selected v-device and route table.
DurationIt writes the list and closes immediately.
PipeThe output can be filtered with | or written to a file with to-file.
RecordingEvery run is written to the user logs.

Frequently Used Parameters ​

ParameterWhat it doesWhat is written after it
-t · -uShows only the TCP or the UDP connections—
-lShows only the listening ports—
-aShows all the connections including the listening ones—
-nWrites the addresses and the ports without resolving them to names—
-rShows the routing table—
-iShows the packet, error and dropped packet counts per interface—
-sShows the total counters per protocol—

The parameters can be written combined (-tuln). The table summarizes the frequently used parameters; the full list depends on the version of the tool on the device.

Examples ​

TR7 WEB-CLI · A) The routes of the route table
admin@TR7LBWAF01> sys-cmd netstat -rn
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) The listening TCP and UDP ports
admin@TR7LBWAF01> sys-cmd netstat -tuln
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) The interface errors and the dropped packets
admin@TR7LBWAF01> sys-cmd netstat -i
admin@TR7LBWAF01>  
TR7 WEB-CLI · D) The connections that contain port 443
admin@TR7LBWAF01> sys-cmd netstat -tan | grep :443
admin@TR7LBWAF01>  

Things to Know ​

  • The process name. The process column requested with -p mostly remains as - in this command; to see which process holds a port, ss -tlnp is used.
  • There is no route. If the -rn output does not show the default route (0.0.0.0), the selected route table does not have a defined path out; the routes are managed with the network route command or from the Route Tables page.
  • Increasing error counters. If the error or dropped packet count in the -i output increases between measurements, the problem may be the cable, the switch port or an MTU mismatch.