display tcp status [ [ task-id task-id ] [ socket-id socket-id ] | [ local-ip ip-address ] [ local-port local-port-number ] [ remote-ip ip-address ] [ remote-port remote-port-number ] ]
Parameter | Description | Value |
---|---|---|
task-id task-id | Displays the TCP connection status of the task with a specified ID. | The value must be an existing task ID. |
socket-id socket-id | Displays the TCP connection status of the socket with a specified ID. | The value must be an existing socket ID. |
local-ip ip-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 ip-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. |
Usage Scenario
You can set filtering rules based on the Task ID, 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.
# Display the TCP connection status on the local device.
<HUAWEI> display tcp status
TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State
0a5d560c 30 /1 0.0.0.0:23 0.0.0.0:0 14849 Listening
# Display the status of the TCP connection originated from the local IP address 0.0.0.0 and port 23.
<HUAWEI> display tcp status local-ip 0.0.0.0 local-port 23
TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State
0a5d560c 30 /1 0.0.0.0:23 0.0.0.0:0 14849 Listening
Field |
Description |
---|---|
TCPCB |
ID of the TCP task control block. |
Tid/Soid |
Task ID and socket ID. |
Local Add: port |
IP address and port number of the local device. If the value of Local Add is 0.0.0.0, TCP connections of all IP addresses are monitored. If the value of port is 0, the TCP connection of all ports is monitored. |
Foreign Add: port |
IP address and port number of the remote device. If the value of Foreign Add is 0.0.0.0, the TCP connection of all IP addresses is monitored. If the value of port is 0, TCP connections of all ports are monitored. |
VPNID |
ID of the VPN instance to which the TCP connection belongs.
|
State |
TCP connection status:
|