CX11x, CX31x, CX710 (Earlier Than V6.03) , and CX91x Series Switch Modules V100R001C10 Command Reference 17

This document provides the configuration commands of each feature supported by the CX11x&CX31x&CX91x series switches module, including the syntax, view, default level, description, parameters, usage guideline, related commands, and example of each command.

This document provides the configuration commands of each feature supported by the CX11x&CX31x&CX91x series switches module, including the syntax, view, default level, description, parameters, usage guideline, related commands, and example of each command.

display tcp status

display tcp status

Function

The display tcp status command displays current TCP connection status.

Format

display tcp status [ local-ip ipv4-address ] [ local-port local-port-number ] [ remote-ip ipv4-address ] [ remote-port remote-port-number ] [ cid cid ] [ socket-id socket-id ]

Parameters

Parameter Description Value
local-ip ipv4-address Displays the TCP connection status of a specified local IP address. The value is in dotted decimal notation.
local-port local-port-number Displays the TCP connection status of a specified local port ID. The value must be an existing local port ID.
remote-ip ipv4-address Displays the TCP connection status a specified remote IP address. The value is in dotted decimal notation.
remote-port remote-port-number Displays the TCP connection status of a specified remote port ID. The value must be an existing remote port ID.
cid cid Displays status of the TCP connection with a specified APP CID. The value must be an existing APP CID.
socket-id socket-id Displays the TCP connection status of the socket with a specified ID. The value must be an existing socket ID.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The transmission control protocol defined in RFC 793 ensures high reliability of transmission between hosts. TCP provides reliable and connection-oriented services in full duplex mode. Run the display tcp status command to monitor the TCP connection status. The following information is displayed.
  • ID of the IPv4 TCP socket.
  • APP CID
  • Local IPv4 address and port ID.
  • Remote IPv4 address and port ID.
  • ID of the VPN instance to which the TCP connection belongs.
  • IPv4 TCP connection status.

You can set filtering rules based on the cid, socket ID, IP address and port number of the local device, and IP address and port number of the remote device so that only the information matching the rules is displayed. This prevents unnecessary information from being displayed and helps you locate faults accurately and efficiently.

Precautions

The command output is null if there is no TCP connection.

Example

# Display the TCP connection status on the local device.

<HUAWEI> display tcp status
-----------------------------------------------------------------------------------                                                 
Cid        SocketID Local-Addr:Port       Foreign-Addr:Port     State       VPNName                                                 
-----------------------------------------------------------------------------------                                                 
0x80C82722        1 0.0.0.0:23            0.0.0.0:0             LISTEN      --                                                      
0x80C82722        3 192.168.1.182:23      192.168.1.3:55166     ESTABLISHED --                                                      
0x80C82722        4 192.168.1.182:23      192.168.1.3:55744     ESTABLISHED --                                                      
0x80C82722        6 192.168.1.182:23      192.168.1.3:55832     ESTABLISHED --                                                      
0x80C82722       58 192.168.1.182:23      192.168.1.3:56320     ESTABLISHED --       
0x80C82722       59 192.168.1.182:23      192.168.1.3:56631     ESTABLISHED --       
0x80C82722       60 192.168.1.182:23      192.168.1.3:56831     ESTABLISHED --       
----------------------------------------------------------------------------------- 
Table 6-44 Description of the display tcp status command output

Field

Description

Cid

APP CID.

SocketID

socket ID.

Local-Addr:Port

IP address and port number of the local device.

Foreign-Addr:Port

IP address and port number of the remote device.

State

TCP connection status:
  • CLOSED: indicates that the TCP connection is closed.

  • LISTEN: indicates that the TCP connection is being monitored.

  • SYN_SENT: indicates that a packet with the SYN flag is sent.

  • SYN_RECEIVED: indicates that a packet with the SYN flag is received.

  • ESTABLISHED: indicates that the TCP connection has been set up.

  • CLOSE_WAIT: indicates that a user sends a packet with the FIN flag to the server to close the TCP connection in Established state. The server then sends an ACK packet to the user after receiving the packet and enters the Close_Wait state.

  • FIN_WAIT_1: indicates that a user sends a packet with the FIN flag to the server to close the TCP connection and enter this state.

  • FIN_WAIT_2: indicates that a user receives an ACK packet that responds to the sent packet with the FIN flag.

  • TIME_WAIT: indicates that TCP enters this state after the TCP connection is closed. When TCP has been in Time_Wait state two times the lifetime of the longest packets, records about the closed connection are deleted.

  • CLOSING: indicates that the user and server close the TCP connection simultaneously.

VPNName

Local VPN Name.

Translation
Favorite
Download
Update Date:2025-07-01
Document ID:EDOC1000041693
Views:5027725
Downloads:2011
Average rating:4.0Points

Digital Signature File

digtal sigature tool