Usage Scenario
To check statistics about TCP packets, including the number of sent and received TCP packets, run the display tcp statistics command.
The following fields in the command output can be used to determine the network connectivity:Precautions
The number of packets received by the router includes the number of forwarded packets, packets sent to the upper layer, and discarded packets.
The application is identified by a port number. The BGP port number is 179; the FTP port number is 20 or 21; the LDP port number is 646; the MSDP port number is 639; the Telnet port number is 23; the SSH port number is 22. The traffic statistics of other applications are displayed in the Others field. Before collecting the IPv6 TCP packet statistics during a specific period, you are recommended to run the reset tcp ipv6 statistics command to clear the previous IPv6 TCP packet statistics.The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display tcp statistics verbose
Received packets:
--------------------------------------------------------------------------------
Application Checksum Errors Format Errors No Port Auth Errors
(MD5/Keychain/TCP-AO)
--------------------------------------------------------------------------------
BGP 0 0 0 0/0/0
FTP 0 0 0 0/0/0
LDP 0 0 0 0/0/0
MSDP 0 0 0 0/0/0
TELNET 0 0 0 0/0/0
SSH 0 0 0 0/0/0
Others 0 0 0 0/0/0
--------------------------------------------------------------------------------
Sent packets:
--------------------------------------------------------------------------------
Application Dropped packets
--------------------------------------------------------------------------------
BGP 0
FTP 0
LDP 0
MSDP 0
TELNET 0
SSH 0
Others 0
--------------------------------------------------------------------------------
<HUAWEI> display tcp ipv6 statistics
------------------------ Display TCP Statistics ----------------------
Received packets:
Total: 0
SYN:0
FIN:0
Packets in sequence: 0 (bytes)
Window probe packets: 0
Window update packets: 0
Checksum error: 0
Offset error: 0
Short error: 0
Duplicate packets: 0
Partially duplicate packets: 0
Out-of-order packets: 0 (bytes)
Packets with data after window: 0
Packets after close: 0
ACK packets: 0
Duplicate ACK packets: 0
too much ACK packets: 0
packets dropped due to absence of MSO: 0
packets dropped due to presence of MSO: 0
packets dropped due to MAC authentication failure: 0
packets dropped due to absence of active receive key: 0
packets dropped due to invalid receive algorithm id: 0
packets dropped due to absence of Enhanced Authentication Option: 0
packets received with Enhanced Authentication Option: 0
Sent packets:
Total: 0
Urgent packets: 0
Control packets: 0 (RST)
Window probe packets: 0
Window update packets: 0
Data packets: 0
Data packets retransmitted: 0
ACK only packets: 0
packets sent with MD5 Signature Option: 0
packets sent with Enhanced Authentication Option: 0
packets not sent due to absence of active send key: 0
Retransmitted timeout: 0
Connection dropped in retransmitted timeout: 0
Keepalive timeout: 0
Keepalive probe: 0
Keepalive timeout, so connections disconnected: 0
Initiated connections: 0
Accepted connections: 0
Established connections: 0
Closed connections: 0
Packets dropped with MD5 authentication: 0
Packets permitted with MD5 authentication: 0
Receive Packets Dropped with Keychain authentication: 0
Receive Packets permitted with TCP-AO authentication: 0
Receive Packets Dropped with TCP-AO authentication: 0
-----------------------------------------------------------------------
<HUAWEI> display tcp ipv6 statistics verbose
Received packets:
--------------------------------------------------------------------------------
Application Checksum Errors Format Errors No Port Auth Errors
(MD5/Keychain/TCP-AO)
--------------------------------------------------------------------------------
BGP 0 0 0 0/0/0
FTP 0 0 0 0/0/0
LDP 0 0 0 0/0/0
TELNET 0 0 0 0/0/0
SSH 0 0 0 0/0/0
Others 0 0 0 0/0/0
--------------------------------------------------------------------------------
Sent packets:
--------------------------------------------------------------------------------
Application Dropped packets
--------------------------------------------------------------------------------
BGP 0
FTP 0
LDP 0
TELNET 0
SSH 0
Others 0
--------------------------------------------------------------------------------
<HUAWEI> display tcp statistics
------------------------ Display TCP Statistics ----------------------
Received packets:
Total: 0
SYN: 0
FIN: 0
Packets in sequence: 0 (bytes)
Window probe packets: 0
Window update packets: 0
Checksum error: 0
Offset error: 0
Short error: 0
Duplicate packets: 0
Partially duplicate packets: 0
Out-of-order packets: 0 (bytes)
Packets with data after window: 0
Packets after close: 0
ACK packets: 0
Duplicate ACK packets: 0
Sent packets:
Total: 0
Urgent packets: 0
Control packets: 0 (RST)
Window probe packets: 0
Window update packets: 0
Data packets: 0
Data packets retransmitted: 0
ACK only packets: 0
Retransmitted timeout: 0
Connection dropped in retransmitted timeout: 0
Keepalive timeout: 0
Keepalive probe: 0
Keepalive timeout, so connections disconnected: 0
Initiated connections: 0
Accepted connections: 0
Established connections: 0
Closed connections: 0
Packets dropped with MD5 authentication: 0
Packets permitted with MD5 authentication: 0
Send Packets permitted with Keychain authentication: 0
Receive Packets permitted with Keychain authentication: 0
Receive Packets Dropped with Keychain authentication: 0
Receive Packets permitted with TCP-AO authentication: 0
Receive Packets Dropped with TCP-AO authentication: 0
-----------------------------------------------------------------------
Item | Description |
---|---|
Received packets | Received packet statistics. |
Checksum error | Number of packets with checksum errors. |
Checksum Errors | Checksum Errors. |
Format Errors | Number of packets with incorrect formats. |
No Port | Number of packets for which no socket can be found. |
Auth Errors | Number of packets with authentication errors. |
Sent packets | Sent packet statistics. |
Dropped packets | Dropped packets. |
packets dropped due to absence of MSO | Number of packets discarded due to the absence of MD5 Signature Options. |
packets dropped due to MAC authentication failure | Number of packets discarded due to MAC authentication failures. |
packets dropped due to absence of active receive key | Number of packets discarded due to the absence of active receive keys. |
packets dropped due to invalid receive algorithm id | Number of packets discarded due to invalid receive algorithm IDs. |
packets dropped due to absence of Enhanced Authentication Option | Number of packets discarded due to the absence of Enhanced Authentication Options. |
packets received with Enhanced Authentication Option | Number of received packets that carry Enhanced Authentication Options. |
packets sent with MD5 Signature Option | Number of sent packets that carry MD5 Signature Options. |
packets sent with Enhanced Authentication Option | Number of sent packets that carry Enhanced Authentication Options. |
packets not sent due to absence of active send key | Number of packets discarded due to the absence of invalid send keys. |
packets dropped due to presence of MSO | Number of packets discarded due to the presence of MD5 Signature Options. |
Total | Total number of received or send packets. |
SYN | Number of received SYN packets. |
FIN | Number of received FIN packets. |
Packets in sequence | Number of packets that arrive in sequence (total bytes). |
Packets with data after window | Number of packets outside the receiving window. |
Packets dropped with MD5 authentication | Number of dropped packets after MD5 authentication. |
Packets permitted with MD5 authentication | Number of passed packets after MD5 authentication. |
Packets after close | Number of packets that arrive after the connection is closed. |
Window probe packets | Number of window probe packets. |
Window update packets | Number of window update packets. |
Offset error | Number of packets in incorrect length. |
Short error | Number of packets whose length is too short. |
Duplicate packets | Number of completely repeated packets (total bytes). |
Duplicate ACK packets | Number of the re-acknowledged packets. |
Partially duplicate packets | Number of partly repeated packets (total bytes). |
Out-of-order packets | Number of packets in incorrect sequence (total bytes). |
ACK packets | Number of the acknowledged packets (the acknowledged data byte number). |
ACK only packets | Number of ACK packets. |
Urgent packets | Number of urgent data packets. |
Control packets | Number of control packets (number of RST packets). |
Data packets | Number of data packets. |
Data packets retransmitted | Number of retransmitted packets (total bytes). |
Retransmitted timeout | Times of retransmission timeouts. |
Connection dropped in retransmitted timeout | Number of dropped connections due to retransmission timeouts. |
Keepalive timeout | Timeout period of the Keepalive timer. |
Keepalive probe | Number of sent Keepalive packets. |
Keepalive timeout, so connections disconnected | Number of discarded connections due to Keepalive probe failures. |
Initiated connections | Number of initiated connections. |
Accepted connections | Number of accepted connections. |
Established connections | Number of established connections. |
Closed connections | Number of closed connections. |
Send Packets permitted with Keychain authentication | Number of sent packets carrying the Keychain information. |
Receive Packets permitted with Keychain authentication | Number of received packets carrying the Keychain information. |
Receive Packets Dropped with Keychain authentication | Number of dropped packets carrying the Keychain information. |
Receive Packets permitted with TCP-AO authentication | Number of received packets carrying the TCP-AO option. |
Receive Packets Dropped with TCP-AO authentication | Number of dropped packets carrying the TCP-AO option. |
too much ACK packets | Number of received ACK packets that are confirmed but not sent. |