show ip tcp connections

Displays general information about each TCP connection on the router, including the percentage of free memory for each of the internal TCP buffers.
Syntax
show ip tcp connections [ all-vrfs ] [ port-num | ip-address ]
Parameters
all-vrfs
Displays all VRFs for all TCP connections.
port-num
Displays the information for the specific TCP port number. Values are SSH:22 TELNET:23 HTTP:80 BGP:179 SSL:443 MSDP:639 LDP:646.
ip-address
Displays information for the specified IP address of the remote device.
Modes

User EXEC mode

Privileged EXEC mode

Global Configuration mode

The show ip tcp connections command displays the following information:

Output field Description
Local IP address:port The IPv4 address and port number of the local router interface over which the TCP connection occurs.
Remote IP address:port The IPv4 address and port number of the remote router interface over which the TCP connection occurs.
TCP state The state of the TCP connection. Possible states include the following:
  • LISTEN - Waiting for a connection request.
  • SYN-SENT - Waiting for a matching connection request after having sent a connection request.
  • SYN-RECEIVED - Waiting for a confirming connection request acknowledgment after having both received and sent a connection request.
  • ESTABLISHED - Data can be sent and received over the connection. This is the normal operational state of the connection.
  • FIN-WAIT-1 - Waiting for a connection termination request from the remote TCP, or an acknowledgment of the connection termination request previously sent.
  • FIN-WAIT-2 - Waiting for a connection termination request from the remote TCP.
  • CLOSE-WAIT - Waiting for a connection termination request from the local user.
  • CLOSING - Waiting for a connection termination request acknowledgment from the remote TCP.
  • LAST-ACK - Waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request).
  • TIME-WAIT - Waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.
  • CLOSED - There is no connection state.
Examples

The following output displays the sample output of the TCP connections.

device# show ip tcp connections
Total 10 TCP connections
   LISTEN: 7; SYN-SENT: 0; SYN-RECEIVED 0; ESTABLISHED: 3; FIN-WAIT-1: 0
   FIN-WAIT-2: 0; CLOSE-WAIT: 0; LAST-ACK 0; CLOSING: 0; TIME-WAIT: 0
Local IP address:port <-> Remote IP address:port TCP state    RcvQue  RxBuffe SendQue TxBuffe
0.0.0.0          22        0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          179       0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          443       0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          448       0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          6633      0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          8081      0.0.0.0          0      LISTEN       0       0       0       0
0.0.0.0          8444      0.0.0.0          0      LISTEN       0       0       0       0
10.10.10.10      23        10.10.10.20      42066  ESTABLISHED  0       0       0       0
10.10.10.10      8253      10.10.10.20      179    ESTABLISHED  0       0       0       0
10.10.10.10      46408     10.10.10.20      23     ESTABLISHED  0       0       0       0
Release version Command history
09.0.00 The command was modified to add the all-vrfs option. Memory usage percentages were also removed from the output.