- Table of Contents
-
- 05-Network Connectivity Command Reference
- 00-Preface
- 01-MAC address table commands
- 02-Ethernet link aggregation commands
- 03-VLAN commands
- 04-Spanning tree commands
- 05-LLDP commands
- 06-Layer 2 forwarding commands
- 07-PPP commands
- 08-L2TP commands
- 09-ARP commands
- 10-IP addressing commands
- 11-DHCP commands
- 12-DHCPv6 commands
- 13-DNS commands
- 14-NAT commands
- 15-IP performance optimization commands
- 16-IPv6 basics commands
- 17-Tunneling commands
- 18-GRE commands
- 19-ADVPN commands
- 20-Basic IP routing commands
- 21-IP forwarding basics commands
- 22-Static routing commands
- 23-IPv6 static routing commands
- 24-RIP commands
- 25-Policy-based routing commands
- 26-IPv6 policy-based routing commands
- 27-OSPF commands
- 28-RIPng commands
- 29-BGP commands
- 30-IGMP snooping commands
- 31-MLD snooping commands
- Related Documents
-
Title | Size | Download |
---|---|---|
15-IP performance optimization commands | 345.61 KB |
IP performance optimization commands
ip packet aggregation-accelerate enable
ip virtual-reassembly suppress
ipv6 virtual-reassembly suppress
IP performance optimization commands
display icmp statistics
Use display icmp statistics to display ICMP statistics.
Syntax
display icmp statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
ICMP statistics include information about received and sent ICMP packets.
Examples
# Display ICMP statistics.
<Sysname> display icmp statistics
Input: bad formats 0 bad checksum 0
echo 175 destination unreachable 0
source quench 0 redirects 0
echo replies 201 parameter problem 0
timestamp 0 information requests 0
mask requests 0 mask replies 0
time exceeded 0 invalid type 0
router advert 0 router solicit 0
broadcast/multicast echo requests ignored 0
broadcast/multicast timestamp requests ignored 0
Output: echo 0 destination unreachable 0
source quench 0 redirects 0
echo replies 175 parameter problem 0
timestamp 0 information replies 0
mask requests 0 mask replies 0
time exceeded 0 bad address 0
packet error 1442 router advert 3
display inet open-service
Use display inet open-service to display information about the enabled INET services.
Syntax
display inet open-service
Views
System view
Predefined user roles
network-admin
network-operator
Parameters
Examples
# Display information about the enabled TCP and UDP services.
<Sysname> dis inet open-service
Service Port Service Name Family Protocal
21 ftpd INET6 TCP
21 ftpd INET4 TCP
22 sshd INET6 TCP
22 sshd INET4 TCP
23 telnetd INET6 TCP
23 telnetd INET4 TCP
Table 1 Command output
Field |
Description |
Service Port |
Port number that provides INET service access. |
Service Name |
Name of the INET service. |
Family |
Name of the protocol family to which the INET service belongs. |
Protocal |
Name of the protocol to which the INET service belongs. |
Slot |
Card, IRF member device, or PEX on which the INET service resides. |
display ip statistics
Use display ip statistics to display IP packet statistics.
Syntax
display ip statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
IP statistics include information about received and sent packets, fragments, and reassembly.
Examples
# Display IP packet statistics.
<Sysname> display ip statistics
Input: sum 7120 local 112
bad protocol 0 bad format 0
bad checksum 0 bad options 0
dropped 0
Output: forwarding 0 local 27
dropped 0 no route 2
compress fails 0
Reassembling: fragments 0 reassembled 0
dropped 0 timeouts 0
Fragment: fragmented 0 couldn't fragment 0
output frags 0
Forwarded Frags: sum 0
Table 2 Command output
Field |
Description |
Input |
Statistics about received packets: · sum—Total number of packets received. · local—Total number of packets destined for the device. · bad protocol—Total number of unknown protocol packets. · bad format—Total number of packets with incorrect format. · bad checksum—Total number of packets with incorrect checksum. · bad options—Total number of packets with incorrect option. |
Reassembling |
Statistics about reassembling: · fragments—Total number of fragments that need reassembling. · reassembled—Total number of packets that are reassembled. · dropped—Total number of dropped fragments that fail the reassembling. · timeouts—Total number of reassembly timeouts. |
Fragment |
Statistics about fragments: · fragmented—Total number of packets successfully fragmented. · couldn't fragment—Total number of packets that failed to be fragmented. · output—Total number of fragments sent. |
Forwarded Frags |
Statistics about forwarded fragments: · sum—Total number of fragments that are directly forwarded. |
Related commands
display ip interface (Network Connectivity Command Reference)
reset ip statistics
display rawip
Use display rawip to display brief information about RawIP connections.
Syntax
display rawip
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
Brief RawIP connection information includes local and peer addresses, protocol, and PCB.
Examples
# Display brief information about RawIP connections.
<Sysname> display rawip
Local Addr Foreign Addr Protocol PCB
0.0.0.0 0.0.0.0 1 0x0000000000000009
0.0.0.0 0.0.0.0 1 0x0000000000000008
0.0.0.0 0.0.0.0 1 0x0000000000000002
Table 3 Command output
Field |
Description |
Local Addr |
Local IP address. |
Foreign Addr |
Peer IP address. |
Protocol |
Protocol number. |
PCB |
Protocol control block. |
display rawip verbose
Use display rawip verbose to display detailed information about RawIP connections.
Syntax
display rawip verbose [ pcb pcb-index ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
pcb pcb-index: Displays detailed RawIP connection information for the specified PCB. The pcb-index argument specifies the index of the PCB. The index value range is 1 to 16.
Usage guidelines
The detailed information includes socket creator, state, option, type, protocol number, and the source and destination IP addresses of RawIP connections.
Examples
# Display detailed information about RawIP connections.
<Sysname> display rawip verbose
Total RawIP socket number: 1
Connection info: src = 0.0.0.0, dst = 0.0.0.0
Creator: ping[320]
State: N/A
Options: N/A
Error: 0
Receiving buffer(cc/hiwat/lowat/drop/state): 0 / 9216 / 1 / 0 / N/A
Sending buffer(cc/hiwat/lowat/state): 0 / 9216 / 512 / N/A
Type: 3
Protocol: 1
Inpcb flags: N/A
Inpcb extflag: N/A
Inpcb vflag: INP_IPV4
TTL: 255(minimum TTL: 0)
Send VRF: 0xffff
Receive VRF: 0xffff
Table 4 Command output
Field |
Description |
Total RawIP socket number |
Total number of RawIP sockets. |
Connection info |
Connection information, including source IP address and destination IP address. |
Creator |
Name of the operation that created the socket. The number in brackets is the process number of the creator. |
State |
Socket state: · NOFDREF—The user has closed the connection. · ISCONNECTED—The connection has been established. · ISCONNECTING—The connection is being established. · ISDISCONNECTING—The connection is being interrupted. · ISSMOOTHING—Cross-card data smoothing is in progress. · CANBIND—The socket supports the bind operation. · ASYNC—Asynchronous mode. · ISDISCONNECTED—The connection has been terminated. · PROTOREF—Indicates strong protocol reference. · ISPCBSYNCING—Cross-card PCB synchronization is in progress. · N/A—None of above state. |
Options |
Socket options: · SO_DEBUG—Records socket debugging information. · SO_ACCEPTCONN—Enables the server to listen connection requests. · SO_REUSEADDR—Allows the local address reuse. · SO_KEEPALIVE—Requires the protocol to test whether the connection is still alive. · SO_DONTROUTE—Bypasses the routing table query for outgoing packets because the destination is in a directly connected network. · SO_BROADCAST—Supports broadcast packets. · SO_LINGER—Closes the socket. The system can still send remaining data in the socket send buffer. · SO_OOBINLINE—Stores the out-of-band data in the input queue. · SO_REUSEPORT—Allows the local port reuse. · SO_TIMESTAMP—Records the timestamps of the incoming packets, accurate to milliseconds. This option is applicable to protocols that are not connection orientated. · SO_NOSIGPIPE—Disables the socket from sending data. As a result, a sigpipe cannot be established when a return failure occurs. · SO_FILTER—Supports setting the packet filter criterion. This option takes effect on the incoming packets. · SO_TIMESTAMPNS—Has a similar function with the timestamp, accurate to nanoseconds. · SO_SEQPACKET—Preserves the boundaries of packets sent to the socket buffer. · SO_FILLTWAMPTIME—Sets the timestamp for TWAMP. · SO_LOCAL—Local socket option. · SO_DONTDELIVER—Do not deliver the data to the application. · N/A—No options are set. |
Error |
Error code. |
Receiving buffer (cc/hiwat/lowat/drop/state) |
Displays receive buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · drop—Number of dropped packets. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Sending buffer (cc/hiwat/lowat/state) |
Displays send buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Type |
Socket type: · 1—SOCK_STREAM. This socket uses TCP to provide reliable transmission of byte streams. · 2—SOCK_DGRAM. This socket uses UDP to provide datagram transmission. · 3—SOCK_RAW. This socket allows an application to change the next upper-layer protocol header. · N/A—None of the above types. |
Protocol |
Number of the protocol using the socket. |
Inpcb flags |
Flags in the Internet PCB: · INP_RECVOPTS—Receives IP options. · INP_RECVRETOPTS—Receives replied IP options. · INP_RECVDSTADDR—Receives destination IP address. · INP_HDRINCL—Provides the entire IP header. · INP_REUSEADDR—Reuses the IP address. · INP_REUSEPORT—Reuses the port number. · INP_ANONPORT—Port number not specified. · INP_RECVIF—Records the input interface of the packet. · INP_RECVTTL—Receives TTL of the packet. Only UDP and RawIP support this flag. · INP_DONTFRAG—Sets the Don't Fragment flag. · INP_ROUTER_ALERT—Receives packets with the router alert option. Only RawIP supports this flag. · INP_PROTOCOL_PACKET—Identifies a protocol packet. · INP_RCVVLANID—Receives the VLAN ID of the packet. Only UDP and RawIP support this flag. · INP_RCVMACADDR—Receives the MAC address of the frame. · INP_SNDBYLSPV—Sends through MPLS. This field is not supported in the current software version. · INP_RECVTOS—Receives TOS of the packet. Only UDP and RawIP support this flag. · INP_USEICMPSRC—Uses the specified IP address as the source IP address for outgoing ICMP packets. · INP_SYNCPCB—Waits until Internet PCB is synchronized. · INP_LOCAL—Preferentially matches the INPCB with this flag on the same card. · N/A—None of the above flags. |
Inpcb extflag |
Extension flags in the Internet PCB: · INP_EXTRCVPVCIDX—Records the PVC index of the received packet. · INP_RCVPWID—Records the PW ID of the received packet. · INP_EXTRCVICMPERR—Receives an ICMP error packet. · INP_EXTFILTER—Filters the contents in the received packet. · INP_EXTDONTDROP—Do not drop the received packet. · INP_EXLISTEN—Adds the INPCB carrying this flag to the listen hash table. · INP_SELECTMATCHSRCBYFIB—Uses the FIB table to select a matching source. · INP_EXTPRIVATESOCKET—Associates the INPCB with the NSR private socket. · INP_EXLISTENNET—Sets this flag when the connection information is added to the network segment linked list. · N/A—None of the above flags. |
Inpcb vflag |
IP version flags in the Internet PCB: · INP_IPV4—IPv4 protocol. · INP_TIMEWAIT—In TIMEWAIT state. · INP_ONESBCAST—Sends broadcast packets. · INP_DROPPED—Protocol dropped flag. · INP_SOCKREF—Strong socket reference. · INP_DONTBLOCK—Do not block synchronization of the Internet PCB. · N/A—None of the above flags. |
TTL |
TTL value in the Internet PCB. |
Send VRF |
VRF from which packets are sent. |
Receive VRF |
VRF from which packets are received. |
display tcp
Use display tcp to display brief information about TCP connections.
Syntax
display tcp
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
Brief TCP connection information includes local IP address, local port number, peer IP address, peer port number, and TCP connection state.
Examples
# Display brief information about TCP connections.
<Sysname> display tcp
*: TCP MD5 Connection
Local Addr:port Foreign Addr:port State PCB
*0.0.0.0:21 0.0.0.0:0 LISTEN 0x000000000000c387
192.168.20.200:23 192.168.20.14:1284 ESTABLISHED 0x0000000000000009
192.168.20.200:23 192.168.20.14:1283 ESTABLISHED 0x0000000000000002
Table 5 Command output
Field |
Description |
* |
Indicates that the TCP connection uses authentication. |
Local Addr:port |
Local IP address and port number. |
Foreign Addr:port |
Peer IP address and port number. |
State |
TCP connection state. |
PCB |
PCB index. |
display tcp statistics
Use display tcp statistics to display TCP traffic statistics.
Syntax
display tcp statistics
Views
Predefined user roles
network-admin
network-operator
Usage guidelines
TCP traffic statistics include information about received and sent TCP packets and Syncache/syncookie.
Examples
# Display TCP traffic statistics.
<Sysname> display tcp statistics
Received packets:
Total: 4150
packets in sequence: 1366 (134675 bytes)
window probe packets: 0, window update packets: 0
checksum error: 0, offset error: 0, short error: 0
packets dropped for lack of memory: 0
packets dropped due to PAWS: 0
duplicate packets: 12 (36 bytes), partially duplicate packets: 0 (0 bytes)
out-of-order packets: 0 (0 bytes)
packets with data after window: 0 (0 bytes)
packets after close: 0
ACK packets: 3531 (795048 bytes)
duplicate ACK packets: 33, ACK packets for unsent data: 0
Sent packets:
Total: 4058
urgent packets: 0
control packets: 50
window probe packets: 3, window update packets: 11
data packets: 3862 (795012 bytes), data packets retransmitted: 0 (0 bytes)
ACK-only packets: 150 (52 delayed)
unnecessary packet retransmissions: 0
Syncache/syncookie related statistics:
entries added to syncache: 12
syncache entries retransmitted: 0
duplicate SYN packets: 0
reply failures: 0
successfully build new socket: 12
bucket overflows: 0
zone failures: 0
syncache entries removed due to RST: 0
syncache entries removed due to timed out: 0
ACK checked by syncache or syncookie failures: 0
syncache entries aborted: 0
syncache entries removed due to bad ACK: 0
syncache entries removed due to ICMP unreachable: 0
SYN cookies sent: 0
SYN cookies received: 0
SACK related statistics:
SACK recoveries: 1
SACK retransmitted segments: 0 (0 bytes)
SACK blocks (options) received: 0
SACK blocks (options) sent: 0
SACK scoreboard overflows: 0
Other statistics:
retransmitted timeout: 0, connections dropped in retransmitted timeout: 0
persist timeout: 0
keepalive timeout: 21, keepalive probe: 0
keepalive timeout, so connections disconnected: 0
fin_wait_2 timeout, so connections disconnected: 0
initiated connections: 29, accepted connections: 12, established connections:
23
closed connections: 50051 (dropped: 0, initiated dropped: 0)
bad connection attempt: 0
ignored RSTs in the window: 0
listen queue overflows: 0
RTT updates: 3518(attempt segment: 3537)
correct ACK header predictions: 0
correct data packet header predictions: 568
resends due to MTU discovery: 0
packets dropped due to MD5 authentication failure: 0
packets that passed MD5 authentication: 0
sent Keychain-encrypted packets: 0
packets that passed Keychain authentication: 0
packets dropped due to Keychain authentication failure: 0
packets dropped with MD5 authentication: 0
packets permitted with MD5 authentication: 0
reset tcp statistics
display tcp verbose
Use display tcp verbose to display detailed information about TCP connections.
Syntax
display tcp verbose [ pcb pcb-index ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
pcb pcb-index: Displays detailed TCP connection information for the specified PCB. The index value range is 1 to 16.
Usage guidelines
The detailed TCP connection information includes socket creator, state, option, type, protocol number, source IP address and port number, destination IP address and port number, and connection state.
Examples
# Display detailed information about TCP connections.
<Sysname> display tcp verbose
TCP inpcb number: 1(tcpcb number: 1)
Connection info: src = 192.168.20.200:179 , dst = 192.168.20.14:4181
Creator: bgpd[199]
State: ISCONNECTED
Options: N/A
Error: 0
Receiving buffer(cc/hiwat/lowat/drop/state): 0 / 65700 / 1 / 0 / N/A
Sending buffer(cc/hiwat/lowat/state): 0 / 65700 / 512 / N/A
Type: 1
Protocol: 6
Inpcb flags: N/A
Inpcb extflag: N/A
Inpcb vflag: INP_IPV4
TTL: 255(minimum TTL: 0)
Connection state: ESTABLISHED
TCP options: TF_REQ_SCALE TF_REQ_TSTMP TF_SACK_PERMIT TF_NSR
NSR state: READY(M)
Send VRF: 0x0
Receive VRF: 0x0
Error count in abnormal-packet-defend period: 0
Checksum errors: 0
Duplicate packets: 0
Part-Duplicate packets: 0
Out-of-order packets: 0
Duplicate ACK packets: 0
Out-of-order ACK packets: 0
Packets with data out of window: 0
MD5 authentication errors: 0
Keychain authentication errors: 0
Timestamp errors: 0
Table 6 Command output
Field |
Description |
TCP inpcb number |
Number of TCP IP PCBs. |
Connection info |
Connection information, including source IP address, source port number, destination IP address, and destination port number. |
tcpcb number |
Number of TCP PCBs. This field is not displayed if the state of the TCP connection is TIME_WAIT. |
Creator |
Name of the operation that created the socket. The number in brackets is the process number of the creator. |
State |
Socket state: · NOFDREF—The user has closed the connection. · ISCONNECTED—The connection has been established. · ISSMOOTHING—Cross-card data smoothing is in progress. · CANBIND—The socket supports the bind operation. · ISCONNECTING—The connection is being established. · ISDISCONNECTING—The connection is being interrupted. · ASYNC—Asynchronous mode. · ISDISCONNECTED—The connection has been terminated. · PROTOREF—Indicates strong protocol reference. · ISPCBSYNCING—Cross-card PCB synchronization is in progress. · N/A—None of above state. |
Options |
Socket options: · SO_DEBUG—Records socket debugging information. · SO_ACCEPTCONN—Enables the server to listen connection requests. · SO_REUSEADDR—Allows the local address reuse. · SO_KEEPALIVE—Requires the protocol to test whether the connection is still alive. · SO_DONTROUTE—Bypasses the routing table query for outgoing packets because the destination is in a directly connected network. · SO_BROADCAST—Supports broadcast packets. · SO_LINGER—Closes the socket. The system can still send remaining data in the socket send buffer. · SO_OOBINLINE—Stores the out-of-band data in the input queue. · SO_REUSEPORT—Allows the local port reuse. · SO_TIMESTAMP—Records the timestamps of the incoming packets, accurate to milliseconds. This option is applicable to protocols that are not connection orientated. · SO_NOSIGPIPE—Disables the socket from sending data. As a result, a sigpipe cannot be established when a return failure occurs. · SO_TIMESTAMPNS—Has a similar function with the timestamp, accurate to nanoseconds. · SO_KEEPALIVETIME—Sets a keepalive time. · SO_SEQPACKET—Preserves the boundaries of packets sent to the socket buffer. · SO_USCBINDEX—Obtains the user profile index from the received packets. · SO_FILLTWAMPTIME—Sets the timestamp for TWAMP. · SO_LOCAL—Local socket option. · SO_DONTDELIVER—Do not deliver the data to the application. · N/A—No options are set. |
Error |
Error code. |
Receiving buffer (cc/hiwat/lowat/drop/state) |
Displays receive buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · drop—Number of dropped packets. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Sending buffer (cc/hiwat/lowat/state) |
Displays send buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Type |
Socket type: · 1—SOCK_STREAM. This socket uses TCP to provide reliable transmission of byte streams. · 2—SOCK_DGRAM. This socket uses UDP to provide datagram transmission. · 3—SOCK_RAW. This socket allows an application to change the next upper-layer protocol header. · N/A—None of the above types. |
Protocol |
Number of the protocol using the socket. |
Inpcb flags |
Flags in the Internet PCB: · INP_RECVOPTS—Receives IP options. · INP_RECVRETOPTS—Receives replied IP options. · INP_RECVDSTADDR—Receives destination IP address. · INP_HDRINCL—Provides the entire IP header. · INP_REUSEADDR—Reuses the IP address. · INP_REUSEPORT—Reuses the port number. · INP_ANONPORT—Port number not specified. · INP_RECVIF—Records the input interface of the packet. · INP_RECVTTL—Receives TTL of the packet. Only UDP and RawIP support this flag. · INP_DONTFRAG—Sets the Don't Fragment flag. · INP_ROUTER_ALERT—Receives packets with the router alert option. Only RawIP supports this flag. · INP_PROTOCOL_PACKET—Identifies a protocol packet. · INP_RCVVLANID—Receives the VLAN ID of the packet. Only UDP and RawIP support this flag. · INP_RCVMACADDR—Receives the MAC address of the frame. · INP_SNDBYLSPV—Sends through MPLS. This value is not supported in the current software version. · INP_RECVTOS—Receives TOS of the packet. Only UDP and RawIP support this flag. · INP_SYNCPCB—Waits until Internet PCB is synchronized. · INP_LOCAL—Preferentially matches the INPCB with this flag on the same card. · N/A—None of the above flags. |
Inpcb extflag |
Extension flags in the Internet PCB: · INP_EXTRCVPVCIDX—Records the PVC index of the received packet. · INP_RCVPWID—Records the PW ID of the received packet. · INP_EXTFILTER—Filters the contents in the received packets. · INP_SELECTMATCHSRCBYFIB—Uses the FIB table to select a matching source. · INP_EXTRCVICMPERR—Receives an ICMP error packet. · INP_EXTPRIVATESOCKET—Associates the INPCB with the NSR private socket. · INP_EXLISTENNET—Sets this flag when the connection information is added to the network segment linked list. · N/A—None of the above flags. |
Inpcb vflag |
IP version flags in the Internet PCB: · INP_IPV4—IPv4 protocol. · INP_TIMEWAIT—In TIMEWAIT state. · INP_ONESBCAST—Sends broadcast packets. · INP_DROPPED—Protocol dropped flag. · INP_SOCKREF—Strong socket reference. · INP_DONTBLOCK—Do not block synchronization of the Internet PCB. · N/A—None of the above flags. |
TTL |
TTL value in the Internet PCB. |
TCP options |
TCP options: · TF_ACKNOW—Immediately replies an ACK packet to the peer. · TF_DELACK—Delays sending ACK packets. · TF_SENTFIN—A FIN packet has been sent. · TF_RCVD_SCALE—Requests the receive window size scale factor. · TF_RCVD_TSTMP—A timestamp was received in the SYN packet. · TF_NEEDSYN—Sends a SYN packet. · TF_NEEDFIN—Sends a FIN packet. · TF_MORETOCOME—More data is to be added to the socket. · TF_LQ_OVERFLOW—The listening queue overflows. · TF_LASTIDLE—Idle connection. · TF_RXWIN0SENT—A reply with receive window size 0 was sent. · TF_FASTRECOVERY—Enters NewReno fast recovery mode. · TF_WASFRECOVERY—In NewReno fast recovery mode. · TF_SIGNATURE—MD5 signature. · TF_FORCEDATA—Forces to send one byte. · TF_TSO—TSO is enabled. · TF_PMTU—Supports RFC 1191. · TF_PMTUD—Starts Path MTU discovery. · TF_PASSIVE_CONN—Passive connection. · TF_APP_SEND—The application sends data. · TF_NODELAY—Disables the Nagle algorithm that buffers the sent data inside the TCP. · TF_NOOPT—No TCP options. · TF_NOPUSH—Forces TCP to delay sending any TCP data until a full sized segment is buffered in the TCP buffers. · TF_NOTIMEWAIT—Disable the TIMEWAIT state. · TF_NSR—Enables TCP NSR. · TF_REQ_SCALE—Enables the TCP window scale option. · TF_REQ_TSTMP—Enables the time stamp option. · TF_SACK_PERMIT—Enables the TCP selective acknowledgement option. · TF_ENHANCED_AUTH—Enables the enhanced authentication option. |
NSR state |
State of the TCP connections. Between the parentheses is the role of the connection: · M—Main connection. · S—Standby connection. |
Send VRF |
VRF from which packets are sent. |
Receive VRF |
VRF from which packets are received. |
Error count in abnormal-packet-defend period |
Number of error packets received in one abnormal-packet-defend period if attack prevention is enabled for TCP connections. |
Checksum errors |
Number of received packets with checksum errors. |
Duplicate packets |
Number of received duplicate packets. |
Part-Duplicate packets |
Number of received partially duplicate packets. |
Out-of-order packets |
Number of received out-of-order packets. |
Duplicate ACK packets |
Number of received duplicate ACK packets. |
Out-of-order ACK packets |
Number of received out-of-order ACK packets. |
Packets with data out of window |
Number of received packets whose serial number is out of the sliding window range. |
MD5 authentication errors |
Number of packets with failed MD5 authentication. |
Keychain authentication errors |
Number of packets with failed Keychain authentication. |
Timestamp errors |
Number of packets with timestamp errors. |
display tcp-proxy
Use display tcp-proxy to display brief information about TCP proxy.
Syntax
display tcp-proxy
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
TCP proxy splits every TCP connection that passes through it into two TCP connections to relay data packets between clients and servers. The split is transparent to the servers and clients. This feature reduces bandwidth use and improves TCP performance. It is used for services such as load balancing.
Examples
# Display brief information about TCP proxy.
<Sysname> display tcp-proxy
Local Addr:port Foreign Addr:port State Service type
192.168.56.25:1111 111.111.111.125:8080 ESTABLISHED LB
111.111.111.125:8080 192.168.56.25:1111 ESTABLISHED LB
Table 7 Command output
Field |
Description |
Local Addr:port |
Local IP address and port number. |
Foreign Addr:port |
Peer IP address and port number. |
State |
TCP connection state. |
Service type |
Type of services that the TCP proxy is used for: · LB—Load balancing services. · APPPROXY—Application proxy services. |
display tcp-proxy port-info
Use display tcp-proxy port-info to display the usage of non-well known ports for TCP proxy.
Syntax
display tcp-proxy port-info
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
Usage guidelines
The TCP ports are divided into well-known ports (port numbers from 0 through 1023) and non-well known ports (port numbers from 1024 through 65535).
· Well known ports are for certain services, for example, port 23 for Telnet service, ports 20 and 21 for FTP service, and port 80 for HTTP service.
· Non-well known ports are available for various services. You can use the display tcp-proxy port-info command to display the usage of these ports.
Examples
# Display the usage of non-well known ports for TCP proxy.
<Sysname> display tcp-proxy port-info
Index Range State
16 [1024, 1087] USABLE
17 [1088, 1151] USABLE
18 [1152, 1215] USABLE
19 [1216, 1279] USABLE
20 [1280, 1343] USABLE
...
1020 [65280, 65343] USABLE
1021 [65344, 65407] USABLE
1022 [65408, 65471] USABLE
1023 [65472, 65535] USABLE
Table 8 Command output
Field |
Description |
Index |
Index of the port range. |
Range |
Start port number and end port number. |
State |
State of the port range: · USABLE—The ports are assignable. · ASSIGNED—Some ports are dynamically assigned and some ports are not. · ALLASSIGNED—All ports are dynamically assigned. The assigned ports can be reclaimed. · TO RECLAIM—Some ports are statically assigned. The assigned ports can be reclaimed. · RESERVED—The ports are reserved. The reserved ports cannot be dynamically assigned. |
display udp
Use display udp to display brief information about UDP connections.
Syntax
display udp
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
Brief UDP connection information includes local IP address and port number, and peer IP address and port number.
Examples
# Display brief information about UDP connections.
<Sysname> display udp
Local Addr:port Foreign Addr:port PCB
0.0.0.0:69 0.0.0.0:0 0x0000000000000003
192.168.20.200:1024 192.168.20.14:69 0x0000000000000002
Table 9 Command output
Field |
Description |
Local Addr:port |
Local IP address and port number. |
Foreign Addr:port |
Peer IP address and port number. |
PCB |
PCB index. |
display udp statistics
Use display udp statistics to display UDP traffic statistics.
Syntax
display udp statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
UDP traffic statistics include information about received and sent UDP packets.
Examples
# Display UDP traffic statistics.
<Sysname> display udp statistics
Received packets:
Total: 240
checksum error: 0, no checksum: 0
shorter than header: 0, data length larger than packet: 0
no socket on port(unicast): 0
no socket on port(broadcast/multicast): 240
not delivered, input socket full: 0
Sent packets:
Total: 0
Related commands
reset udp statistics
display udp verbose
Use display udp verbose to display detailed information about UDP connections.
Syntax
display udp verbose [ pcb pcb-index ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
pcb pcb-index: Displays detailed UDP connection information for the specified PCB. The value range for the pcb-index argument is 1 to 16.
Usage guidelines
The detailed information includes socket creator, status, option, type, protocol number, source IP address and port number, and destination IP address and port number for UDP connections.
Examples
# Display detailed UDP connection information.
<Sysname> display udp verbose
Total UDP socket number: 1
Connection info: src = 0.0.0.0:69, dst = 0.0.0.0:0
Creator: sock_test_mips[250]
State: N/A
Options: N/A
Error: 0
Receiving buffer(cc/hiwat/lowat/drop/state): 0 / 41600 / 1 / 0 / N/A
Sending buffer(cc/hiwat/lowat/state): 0 / 9216 / 512 / N/A
Type: 2
Protocol: 17
Inpcb flags: N/A
Inpcb extflag: N/A
Inpcb vflag: INP_IPV4
TTL: 255(minimum TTL: 0)
Send VRF: 0xffff
Receive VRF: 0xffff
Table 10 Command output
Field |
Description |
Total UDP socket number |
Total number of UDP sockets. |
Connection info |
Connection information, including source IP address, source port number, destination IP address, and destination port number. |
Creator |
Name of the operation that created the socket. The number in brackets is the process number of the creator. |
State |
Socket state: · NOFDREF—The user has closed the connection. · ISCONNECTED—The connection has been established. · ISCONNECTING—The connection is being established. · ISDISCONNECTING—The connection is being interrupted. · ASYNC—Asynchronous mode. · ISDISCONNECTED—The connection has been terminated. · ISSMOOTHING—Cross-card data smoothing is in progress. · CANBIND—The socket supports the bind operation. · PROTOREF—Indicates strong protocol reference. · ISPCBSYNCING—Cross-card PCB synchronization is in progress. · N/A—None of above state. |
Options |
Socket options: · SO_DEBUG—Records socket debugging information. · SO_ACCEPTCONN—Enables the server to listen connection requests. · SO_REUSEADDR—Allows the local address reuse. · SO_KEEPALIVE—Requires the protocol to test whether the connection is still alive. · SO_DONTROUTE—Bypasses the routing table query for outgoing packets because the destination is in a directly connected network. · SO_BROADCAST—Supports broadcast packets. · SO_LINGER—Closes the socket. The system can still send remaining data in the socket send buffer. · SO_OOBINLINE—Stores the out-of-band data in the input queue. · SO_REUSEPORT—Allows the local port reuse. · SO_TIMESTAMP—Records the timestamps of the incoming packets, accurate to milliseconds. This option is applicable to protocols that are not connection orientated. · SO_NOSIGPIPE—Disables the socket from sending data. As a result, a sigpipe cannot be established when a return failure occurs. · SO_TIMESTAMPNS—Has a similar function with the timestamp, accurate to nanoseconds. · SO_SEQPACKET—Preserves the boundaries of packets sent to the socket buffer. · SO_USCBINDEX—Obtains the user profile index from the received packets. · SO_FILLTWAMPTIME—Sets the timestamp for TWAMP. · SO_LOCAL—Local socket option. · SO_DONTDELIVER—Do not deliver the data to the application. · N/A—No options are set. |
Error |
Error code. |
Receiving buffer(cc/hiwat/lowat/drop/state) |
Displays receive buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · drop—Number of dropped packets. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Sending buffer(cc/hiwat/lowat/state) |
Displays send buffer information in the following order: · cc—Used space. · hiwat—Maximum space. · lowat—Minimum space. · state—Buffer state: ¡ CANTSENDMORE—Unable to send data to the peer. ¡ CANTRCVMORE—Unable to receive data from the peer. ¡ RCVATMARK—Receiving tag. ¡ N/A—None of the above states. |
Type |
Socket type: · 1—SOCK_STREAM. This socket uses TCP to provide reliable transmission of byte streams. · 2—SOCK_DGRAM. This socket uses UDP to provide datagram transmission. · 3—SOCK_RAW. This socket allows an application to change the next upper-layer protocol header. · N/A—None of the above types. |
Protocol |
Number of the protocol using the socket. |
Connection info |
Connection information, including source IP address, source port number, destination IP address, and destination port number. |
Inpcb flags |
Flags in the Internet PCB: · INP_RECVOPTS—Receives IP options. · INP_RECVRETOPTS—Receives replied IP options. · INP_RECVDSTADDR—Receives destination IP address. · INP_HDRINCL—Provides the entire IP header. · INP_REUSEADDR—Reuses the IP address. · INP_REUSEPORT—Reuses the port number. · INP_ANONPORT—Port number not specified. · INP_RECVIF—Records the input interface of the packet. · INP_RECVTTL—Receives TTL of the packet. Only UDP and RawIP support this flag. · INP_DONTFRAG—Sets the Don't Fragment flag. · INP_ROUTER_ALERT—Receives packets with the router alert option. Only RawIP supports this flag. · INP_PROTOCOL_PACKET—Identifies a protocol packet. · INP_RCVVLANID—Receives the VLAN ID of the packet. Only UDP and RawIP support this flag. · INP_RCVMACADDR—Receives the MAC address of the frame. · INP_SNDBYLSPV—Sends through MPLS. This value is not supported in the current software version. · INP_RECVTOS—Receives TOS of the packet. Only UDP and RawIP support this flag. · INP_SYNCPCB—Waits until Internet PCB is synchronized. · INP_LOCAL—Preferentially matches the INPCB with this flag on the same card. · N/A—None of the above flags. |
Inpcb extflag |
Extension flags in the Internet PCB: · INP_EXTRCVPVCIDX—Records the PVC index of the received packet. · INP_RCVPWID—Records the PW ID of the received packet. · INP_EXTDONTDROP—Do not drop the received packet. · INP_EXLISTEN—Adds the INPCB carrying this flag to the listen hash table. · INP_EXTFILTER—Filters the contents in the received packets. · INP_SELECTMATCHSRCBYFIB—Uses the FIB table to select a matching source. · INP_EXTRCVICMPERR—Receives an ICMP error packet. · INP_EXTPRIVATESOCKET—Associates the INPCB with the NSR private socket. · INP_EXLISTENNET—Sets this flag when the connection information is added to the network segment linked list. · N/A—None of the above flags. |
Inpcb vflag |
IP version flags in the Internet PCB: · INP_IPV4—IPv4 protocol. · INP_TIMEWAIT—In TIMEWAIT state. · INP_ONESBCAST—Sends broadcast packets. · INP_DROPPED—Protocol dropped flag. · INP_SOCKREF—Strong socket reference. · INP_DONTBLOCK—Do not block synchronization of the Internet PCB. · N/A—None of the above flags. |
TTL |
TTL value in the Internet PCB. |
Send VRF |
VRF from which packets are sent. |
Receive VRF |
VRF from which packets are received. |
ip forward-broadcast
Use ip forward-broadcast to enable an interface to receive and forward directed broadcast packets destined for the directly connected network.
Use undo ip forward-broadcast to disable an interface from receiving and forwarding directed broadcast packets destined for the directly connected network.
Syntax
ip forward-broadcast
undo ip forward-broadcast
Default
An interface cannot forward directed broadcasts destined for the directly connected network, and can receive directed broadcasts destined for the directly connected network.
Views
Interface view
Predefined user roles
network-admin
Parameters
acl acl-number: Specifies an ACL by its number. The interface forwards only the directed broadcasts permitted by the ACL. The value range for basic ACLs is 2000 to 2999. The value range for advanced ACLs is 3000 to 3999.
Usage guidelines
A directed broadcast packet is destined for all hosts on a specific network. In the destination IP address of the directed broadcast, the network ID identifies the target network, and the host ID is made up of all ones.
Examples
# Enable VLAN-interface 2 to receive and forward directed broadcast packets destined for the directly connected network.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ip forward-broadcast
ip icmp error-interval
Use ip icmp error-interval to set the interval for tokens to arrive in the bucket and the bucket size for ICMP error messages.
Use undo ip icmp error-interval to restore the default.
Syntax
ip icmp error-interval interval [ bucketsize ]
undo ip icmp error-interval
Default
A token is placed in the bucket every 100 milliseconds, and the bucket allows a maximum of 10 tokens.
Views
System view
Predefined user roles
network-admin
Parameters
interval: Specifies the interval for tokens to arrive in the bucket. The value range is 0 to 2147483647 milliseconds. To disable the ICMP rate limit, set the value to 0.
bucketsize: Specifies the maximum number of tokens allowed in the bucket. The value range is 1 to 200.
Usage guidelines
This command limits the rate at which ICMP error messages are sent. Use this command to avoid sending excessive ICMP error messages within a short period that might cause network congestion. A token bucket algorithm is used with one token representing one ICMP error message.
A token is placed in the bucket at intervals until the maximum number of tokens that the bucket can hold is reached.
A token is removed from the bucket when an ICMP error message is sent. When the bucket is empty, ICMP error messages are not sent until a new token is placed in the bucket.
Examples
# Set the interval to 200 milliseconds for tokens to arrive in the bucket and set the bucket size to 40 tokens for ICMP error messages.
<Sysname> system-view
[Sysname] ip icmp error-interval 200 40
ip icmp receive enable
Use ip icmp receive enable to enable the device to receive a specific type of ICMP messages.
Use undo ip icmp receive enable to disable the device from receiving a specific type of ICMP messages.
Syntax
ip icmp { name icmp-name | type icmp-type code icmp-code } receive enable
undo ip icmp { name icmp-name | type icmp-type code icmp-code } receive enable
Default
The device receives all types of ICMP messages.
Views
System view
Predefined user roles
network-admin
Parameters
name icmp-name: Specifies an ICMP message name, a case-insensitive string of 1 to 20 characters.
type icmp-type: Specifies an ICMP message type. The value range for the icmp-type argument is 0 to 255.
code icmp-code: Specifies an ICMP message code. The value range for the icmp-code argument is 0 to 255.
Usage guidelines
CAUTION: Disabling receiving ICMP messages of a specific type might affect network operation. Please use this feature with caution. |
By default, the device receives all types of ICMP messages. Such a setting might affect device performance if a large number of ICMP responses are received within a short time. To resolve this issue, you can use this command to disable the device from receiving a specific type of ICMP messages.
Table 11 shows common ICMP messages and their meanings.
Name |
Type |
Code |
Description |
echo |
8 |
0 |
Echo request used to ping a target node. |
echo-reply |
0 |
0 |
Echo reply sent by a target node after receiving an echo request. |
fragmentneed-dfset |
3 |
4 |
Packets that need fragmentation but have the DF bit set. |
host-redirect |
5 |
1 |
Host redirection. |
host-tos-redirect |
5 |
3 |
Host ToS redirection. |
host-unreachable |
3 |
1 |
Unreachable host. |
information-reply |
16 |
0 |
Information reply. |
information-request |
15 |
0 |
Information request. |
net-redirect |
5 |
0 |
Network redirection. |
net-tos-redirect |
5 |
2 |
Network ToS redirection. |
net-unreachable |
3 |
0 |
Unreachable network. |
parameter-problem |
12 |
0 |
Invalid parameter. |
port-unreachable |
3 |
3 |
Unreachable port. |
protocol-unreachable |
3 |
2 |
Unreachable protocol. |
reassembly-timeout |
11 |
1 |
Fragment reassembly timeout. |
source-quench |
4 |
0 |
Source quench message. |
source-route-failed |
3 |
5 |
Source route failure. |
timestamp-reply |
14 |
0 |
Timestamp reply. |
timestamp-request |
13 |
0 |
Timestamp request. |
ttl-exceeded |
11 |
0 |
TTL exceeded in transit. |
Examples
# Enable the device to receive ICMP echo reply messages.
<Sysname> system-view
[Sysname] ip icmp name echo-reply receive enable
ip icmp send enable
Use ip icmp send enable to enable the device to send a specific type of ICMP messages.
Use undo ip icmp send enable to disable the device from sending a specific type of ICMP messages.
Syntax
ip icmp { name icmp-name | type icmp-type code icmp-code } send enable
undo ip icmp { name icmp-name | type icmp-type code icmp-code } send enable
Default
The device can send all types of ICMP messages except Destination Unreachable, Time Exceeded, and Redirect messages.
Views
System view
Predefined user roles
network-admin
Parameters
name icmp-name: Specifies an ICMP message name, a case-insensitive string of 1 to 20 characters.
type icmp-type: Specifies an ICMP message type. The value range for the icmp-type argument is 0 to 255.
code icmp-code: Specifies an ICMP message code. The value range for the icmp-code argument is 0 to 255.
Usage guidelines
CAUTION: Disabling sending ICMP messages of a specific type might affect network operation. Please use this feature with caution. |
By default, the device sends all types of ICMP messages except Destination Unreachable, Time Exceeded, and Redirect messages. Attackers might obtain information from specific types of ICMP messages, causing security issues.
For security purposes, you can use this command to disable the device from sending ICMP messages of specific types.
To enable sending Destination Unreachable, Time Exceeded, or Redirect messages, you can perform one of the following tasks:
· Execute the ip icmp send enable command.
· Execute one of the following commands as needed:
¡ ip unreachables enable
¡ ip ttl-expires enable
¡ ip redirects enable
Table 11 shows common ICMP messages and their meanings.
Examples
# Enable the device to send ICMP echo reply messages.
<Sysname> system-view
[Sysname] ip icmp name echo-reply send enable
Related commands
ip icmp fragment discarding
ip redirects enable
ip ttl-expires enable
ip unreachables enable
ip icmp source
Use ip icmp source to specify the source address for outgoing ICMP packets.
Use undo ip icmp source to remove the specified source address for outgoing ICMP packets.
Syntax
ip icmp source ip-address
undo ip icmp source
Default
No source address is specified for outgoing ICMP packets. The default source IP addresses for different types of ICMP packets vary as follows:
· For an ICMP error message, the source IP address is the IP address of the receiving interface of the packet that triggers the ICMP error message. ICMP error messages include Time Exceeded, Port Unreachable, and Parameter Problem messages.
· For an ICMP echo request, the source IP address is the IP address of the sending interface.
· For an ICMP echo reply, the source IP address is the destination IP address of the ICMP echo request specific to this reply.
Views
System view
Predefined user roles
network-admin
Parameters
ip-address: Specifies an IP address.
Usage guidelines
It is a good practice to specify the IP address of the loopback interface as the source IP address for outgoing ping echo request and ICMP error messages. This feature helps users to locate the sending device easily.
Examples
# Specify 1.1.1.1 as the source address for outgoing ICMP packets.
<Sysname> system-view
[Sysname] ip icmp source 1.1.1.1
ip mtu
Use ip mtu to set the interface MTU for IPv4 packets. The MTU defines the largest size of an IPv4 packet that an interface can transmit without fragmentation.
Use undo ip mtu to restore the default.
Syntax
ip mtu mtu-size
undo ip mtu
Default
The interface MTU is not set.
Views
Interface view
Predefined user roles
network-admin
Parameters
mtu-size: Specifies the MTU in bytes. The value range for the mtu-size argument is 128 to 1560.
Usage guidelines
When a packet exceeds the MTU of the sending interface, the device processes the packet in one of the following ways:
· If the packet disallows fragmentation, the device discards it.
· If the packet allows fragmentation, the device fragments it and forwards the fragments.
Fragmentation and reassembling consume system resources, so set an appropriate MTU to avoid fragmentation.
If an interface supports both the mtu and ip mtu commands, the device fragments a packet based on the MTU set by the ip mtu command.
Examples
# Set the MTU to 1280 bytes for VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] ip mtu 1280
ip packet aggregation-accelerate enable
Use ip packet aggregation-accelerate enable to enable IPv4 packet forwarding acceleration for Layer 3 aggregation groups and aggregate interfaces.
Use undo ip packet aggregation-accelerate enable to disable IPv4 packet forwarding acceleration on Layer 3 aggregation groups and aggregate interfaces.
Syntax
ip packet aggregation-accelerate enable
undo ip packet aggregation-accelerate enable
Default
IPv4 packet forwarding acceleration is disabled on Layer 3 aggregation groups and aggregate interfaces.
Views
System view
Predefined user roles
network-admin
Usage guidelines
By default, a Layer 3 aggregation group or aggregate interface delivers IPv4 packets to the QoS module first before determining the output interfaces for these packets. To improve the packet forwarding performance of a Layer 3 aggregation group or aggregate interface, enable this feature on the device. When the aggregation group or aggregate interface forwards IPv4 packets, it bypasses the QoS module and directly determines the output interfaces for packet forwarding.
As a best practice to prevent QoS service interruption, do not enable this feature on devices configured with QoS services.
Examples
# Enable IPv4 packet forwarding acceleration on Layer 3 aggregation groups and aggregate interfaces.
<Sysname> system-view
[Sysname] ip packet aggregation-accelerate enable
ip redirects enable
Use ip redirects enable to enable sending ICMP redirect messages.
Use undo ip redirects enable to disable sending ICMP redirect messages.
Syntax
ip redirects enable
undo ip redirects enable
Default
Sending ICMP redirect messages is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
ICMP redirect messages simplify host management and enable hosts to gradually optimize their routing tables.
A host that has only one route destined for the default gateway sends all packets to the default gateway. The default gateway sends an ICMP redirect message to inform the host of a correct next hop when the following conditions are met:
· The receiving and sending interfaces are the same.
· The packet source IP address and the IP address of the packet receiving interface are on the same segment.
· There is no source route option in the received packet.
Examples
# Enable sending ICMP redirect messages.
<Sysname> system-view
[Sysname] ip redirects enable
ip ttl-expires enable
Use ip ttl-expires enable to enable sending ICMP time exceeded messages.
Use undo ip ttl-expires enable to disable sending ICMP time exceeded messages.
Syntax
ip ttl-expires enable
undo ip ttl-expires enable
Default
Sending ICMP time exceeded messages is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
A device sends ICMP time exceeded messages by following these rules:
· The device sends an ICMP TTL exceeded in transit message to the source when the following conditions are met:
¡ The received packet is not destined for the device.
¡ The TTL field of the packet is 1.
· When the device receives the first fragment of an IP datagram destined for the device itself, it starts a timer. If the timer expires before all the fragments of the datagram are received, the device sends an ICMP fragment reassembly time exceeded message to the source.
A device disabled from sending ICMP time exceeded messages does not send ICMP TTL exceeded in transit messages but can still send ICMP fragment reassembly time exceeded messages.
Examples
# Enable sending ICMP time exceeded messages.
<Sysname> system-view
[Sysname] ip ttl-expires enable
ip unreachables enable
Use ip unreachables enable to enable sending ICMP destination unreachable messages.
Use undo ip unreachables enable to disable sending ICMP destination unreachable messages.
Syntax
ip unreachables enable
undo ip unreachables enable
Default
Sending ICMP destination unreachable messages is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
A device sends ICMP destination unreachable messages by following these rules:
· The device sends the source an ICMP network unreachable message when the following conditions are met:
¡ The received packet does not match any route.
¡ No default route exists in the routing table.
· The device sends the source an ICMP protocol unreachable message when the following conditions are met:
¡ The received packet is destined for the device.
¡ The transport layer protocol of the packet is not supported by the device.
· The device sends the source an ICMP port unreachable message when the following conditions are met:
¡ The received UDP packet is destined for the device.
¡ The packet's port number does not match the running process.
· The device sends the source an ICMP source route failed message when the following conditions are met:
¡ The source uses Strict Source Routing to send packets.
¡ The intermediate device finds that the next hop specified by the source is not directly connected.
· The device sends the source an ICMP fragmentation needed and DF set message when the following conditions are met:
¡ The MTU of the sending interface is smaller than the packet.
¡ The packet has Don't Fragment set.
Examples
# Enable sending ICMP destination unreachable messages.
<Sysname> system-view
[Sysname] ip unreachables enable
ip virtual-reassembly enable
Use ip virtual-reassembly enable to enable IPv4 virtual fragment reassembly (VFR).
Use undo ip virtual-reassembly enable to disable IPv4 virtual fragment reassembly.
Syntax
ip virtual-reassembly enable
undo ip virtual-reassembly enable
Default
IPv4 virtual fragment reassembly is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
To prevent each service module from processing packet fragments that do not arrive in order, you can enable the virtual fragment reassembly feature. This feature virtually reassembles the fragments of a datagram through fragment check, sequencing, and caching, ensuring fragments arrive at each service module in order.
VFR can detect and prevent the following types of attacks:
· Tiny fragment attack—The first fragment size is too small to hold the Layer 4 (such as TCP and UDP) header field, which is forced into the second fragment. VFR discards all tiny fragments.
· Overlapping fragment attack—Two consecutive incoming fragments are identical or overlap with each other. If an overlapping fragment is detected, VFR discards all fragments within a fragment chain.
· Fragment flooding attack—The maximum number of concurrent preassemblies or the number of fragments per datagram exceeds the upper limits. VFR discards subsequent fragments if the upper limit is reached.
The enabling status of VFR can be managed at CLI or the enabling status of a service module that can call VFR. You can enable VRF by using one of the following methods:
· Enable a service module that calls VFR.
· Use the ip virtual-reassembly enable command.
To forcibly disable VFR after you enable VFR with either of the methods above, use the ip virtual-reassembly suppress command.
If fragment reassembly is required, but a service module cannot call it, execute this command at CLI.
Examples
# Enable IPv4 virtual fragment reassembly
<Sysname> system-view
[Sysname] ip virtual-reassembly enable
Related commands
ip virtual-reassembly suppress
ip virtual-reassembly suppress
Use ip virtual-reassembly suppress to forcibly disable IPv4 VFR.
Use undo ip virtual-reassembly suppress to restore the default.
Syntax
ip virtual-reassembly suppress
undo ip virtual-reassembly suppress
Default
Forcibly disabling IPv4 VFR is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
IMPORTANT: Use this feature according to the demands of VFR. |
IPv4 VFR checks, sequences, and caches fragments upon fragment receiving to ensure that these fragments will be assembled in the correct order.
On an HA network, if an HA device does not receive all fragments of a datagram, it cannot reassemble the datagram and will discard the received fragments. For the devices to permit the received fragments to pass, you can forcibly disable IPv4 VFR.
After you enable VFR through service calling or CLI, you can use the ip virtual-reassembly suppress command to forcibly disable VFR.
This command takes effect on the security policy services of Layer 3 forwarding. For more information, see Security Configuration Guide. With IPv4 VFR disabled forcibly, ASPF and connection limit do not take effect on the received IPv4 fragments and the fragments will be forwarded directly.
Examples
# Forcibly disable IPv4 VFR.
<Sysname> system-view
[Sysname] ip virtual-reassembly suppress
Related commands
ip virtual-reassembly enable
ipv6 virtual-reassembly suppress
Use ipv6 virtual-reassembly suppress to forcibly disable IPv6 VFR.
Use undo ipv6 virtual-reassembly suppress to restore the default.
Syntax
ipv6 virtual-reassembly suppress
undo ipv6 virtual-reassembly suppress
Default
Forcibly disabling IPv6 VFR is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
IPv6 VFR checks, sequences, and caches fragments upon fragment receiving to ensure that these fragments will be assembled in the correct order.
In an HA network, if an HA device does not receive all fragments of a datagram, it cannot reassemble the datagram and will discard the received fragments. For the devices to permit the received fragments to pass, you can forcibly disable IPv6 VFR.
With IPv6 VFR disabled forcibly, ASPF and connection limit do not take effect on the received IPv6 fragments and the fragments will be forwarded directly.
Use this feature according to the demands of VFR.
Examples
# Forcibly disable IPv6 VFR.
<Sysname> system-view
[Sysname] ipv6 virtual-reassembly suppress
reset ip statistics
Use reset ip statistics to clear IP traffic statistics.
Syntax
reset ip statistics
Views
User view
Predefined user roles
network-admin
Usage guidelines
Use this command to clear history IP traffic statistics before you collect IP traffic statistics for a time period.
Examples
# Clear IP traffic statistics.
<Sysname> reset ip statistics
display ip interface (Network Connectivity Command Reference)
display ip statistics
reset tcp statistics
Use reset tcp statistics to clear TCP traffic statistics.
Syntax
reset tcp statistics
Views
User view
Predefined user roles
network-admin
Examples
# Clear TCP traffic statistics.
<Sysname> reset tcp statistics
reset udp statistics
Use reset udp statistics to clear UDP traffic statistics.
Syntax
reset udp statistics
Views
User view
Predefined user roles
network-admin
Examples
# Clear UDP traffic statistics.
<Sysname> reset udp statistics
Related commands
display udp statistics
statistics l3-packet enable
Use statistics l3-packet enable to enable Layer 3 packet statistics collection.
Use undo statistics l3-packet enable to disable Layer 3 packet statistics collection.
Syntax
statistics l3-packet enable { inbound | outbound }
undo statistics l3-packet enable { inbound | outbound }
Default
Layer 3 packet statistics collection is disabled.
Views
Interface view
Predefined user role
network-admin
Parameters
inbound: Enables statistics collection for incoming Layer 3 packets.
outbound: Enables statistics collection for outgoing Layer 3 packets.
Usage guidelines
With this feature enabled on an interface, the device counts incoming and outgoing IP packets on the interface. To display the collected statistics, use the display ip interface command. To view the IP packet rate, use the display interface command.
When the interface is processing a large number of packets, enabling Layer 3 packet statistics collection will cause high CPU usage and degrade the forwarding performance. If the statistics are not necessary, to ensure the device performance, disable this feature.
Examples
# Enable statistics collection for outgoing Layer 3 packets on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] statistics l3-packet enable outbound
Related commands
display ip interface (Interface Command Reference)
display ip statistics
tcp abnormal-packet-defend
Use tcp abnormal-packet-defend to enable attack prevention for TCP connections.
Use undo tcp abnormal-packet-defend to disable attack prevention for TCP connections.
Syntax
tcp abnormal-packet-defend [ log | threshold threshold-value ]*
undo tcp abnormal-packet-defend
Default
Attack prevention is disabled for TCP connections.
Views
System view
Predefined user roles
network-admin
Parameters
log: Enables attack prevention logging for TCP connections. By default, attack prevention logging is disabled for TCP connections.
threshold threshold-value: Specifies the threshold for error packets received by a TCP connection within a statistics collection interval in the range of 100 to 1000000. The default value for the threshold-value argument is 1000.
Usage guidelines
This feature enables the device to count the error packets received by each established TCP connection. If the number of error packets received by a TCP connection within a statistics collection interval (fixed at one second) exceeds the threshold, the device determines that the TCP connection is attacked and terminates the TCP connection. If you enable attack prevention logging for TCP connections, the device generates a log message about the attacked TCP connection.
Examples
# Enable attack prevention for TCP connections and set the threshold to 200 for error packets received by a TCP connection within a statistics collection interval.
<Sysname> system-view
[Sysname] tcp abnormal-packet-defend threshold 200
# Log message generated for an attacked TCP connection:
%Jul 15 15:15:37:646 2022 Sysname SOCKET/6/TCP_ABNORMALPACKETDEFEND: -MDC=1; The TCP connection is disconnected because a large number of abnormal messages are received.
Connection info: rvpn = PUBLIC(0), svpn = PUBLIC(0), src = 5.5.5.2:179, dst = 5.5.5.3:16256.
Table 12 Fields in the log message
Field |
Description |
Connection info |
Information about the terminated TCP connection. |
rvpn |
Name and index of the VPN instance that received the abnormal messages. |
svpn |
Name and index of the VPN instance that sent the abnormal messages. |
src |
Source address of the abnormal messages. |
dst |
Destination address of the abnormal messages. |
tcp auto-adjust-mss enable
Use tcp auto-adjust-mss enable to enable automatic TCP MSS adjustment.
Use undo tcp auto-adjust-mss enable to disable automatic TCP MSS adjustment.
Syntax
tcp auto-adjust-mss enable
undo tcp auto-adjust-mss enable
Default
Automatic TCP MSS adjustment is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
In environments such as GRE, SSL VPN, or IPsec VPN, the device must add new headers to TCP packets for VPN services. If the size of these new TCP packets exceeds the negotiated TCP MSS, multiple intermediate devices might fragment these packets, resulting in low forwarding efficiency. An appropriate TCP MSS is essential for data transmission. However, manual TCP MSS configuration for all VPN services is an effort, because the APPENDLEN value varies by VPN service type.
To resolve this issue, enable automatic TCP MSS adjustment on VPN intermediate devices. With this feature enabled, the device can automatically adjust the TCP MSS according to the VPN service type, ensuring that TCP segments are not re-fragmented along the path to the destination.
After you enable automatic TCP MSS adjustment, the minimum value of the following MSSs takes effect during TCP connection establishment:
· The MSS value carried by the TCP packets.
· The MSS value calculated based on the VPN service type and the IPv4 MTU.
· The interface MSS set by the tcp mss command.
· The global MSS set by the tcp auto-adjust-mss command.
After you disable automatic TCP MSS adjustment, the minimum value of the following MSSs takes effect during TCP connection establishment:
· The MSS value carried by the TCP packets.
· The interface MSS set by the tcp mss command.
When you configure the automatic TCP MSS adjustment feature, follow these guidelines:
· Enabling automatic TCP MSS adjustment has an impact on session establishment and forwarding performance, because the device needs to make an additional TCP MSS decision during packet forwarding. To ensure high forwarding performance, you can disable this feature.
· The automatic TCP MSS adjustment feature takes effect only on TCP connections that are established after it is configured. It does not take effect on TCP connections that have been established before it is configured.
Examples
# Enable automatic TCP MSS adjustment.
<Sysname> system-view
[Sysname] tcp auto-adjust-mss enable
Related commands
ip mtu
tcp auto-adjust-mss
tcp mss
tcp default-mss
Use tcp default-mss to set the default TCP maximum segment size (MSS).
Use undo tcp default-mss to restore the default.
Syntax
tcp default-mss mss-value
undo tcp default-mss
Default
The default TCP MSS is 512 bytes.
Views
System view
Predefined user roles
network-admin
Parameters
mss-value: Sets the default TCP MSS, in bytes. The value range for this argument is 536 to 1460.
Usage guidelines
After a TCP connection is established, the device segments TCP packets based on the TCP MSS before sending them out. Typically, the TCP MSS equals the MTU value on the outgoing interface for the packet minus 40.
Increase the default TCP MSS to a higher value as needed to avoid the following issues:
· Degraded TCP performance that occurs when the device breaks up a TCP packet into too many segments.
· The TCP SYN packet replied from the connection responder has a TCP checksum error.
Examples
# Set the default TCP MSS to 998.
<Sysname> system-view
[Sysname] tcp default-mss 998
tcp mss
Use tcp mss to set the TCP MSS on an interface.
Use undo tcp mss to restore the default.
Syntax
tcp mss value
undo tcp mss
Default
The TCP MSS is not set.
Views
Interface view
Predefined user roles
network-admin
Parameters
value: Specifies the TCP MSS, in bytes. The value range is 128 to 1520 (maximum interface MTU minus 40).
Usage guidelines
The MSS option informs the receiver of the largest segment that the sender can accept. Each end announces its MSS during TCP connection establishment. If the size of a TCP segment is smaller than the MSS of the receiver, TCP sends the TCP segment without fragmentation. If not, TCP fragments the segment according to the receiver's MSS.
If you set the TCP MSS on an interface, the size of each TCP segment received or sent on the interface cannot exceed the MSS value.
This configuration takes effect only on TCP connections that are established after the configuration and not on the TCP connections that already exist.
This configuration is effective only on IP packets.
Examples
# Set the TCP MSS to 300 bytes on VLAN-interface 100.
<Sysname> system-view
[Sysname] interface vlan-interface 100
[Sysname-Vlan-interface100] tcp mss 300
tcp path-mtu-discovery
Use tcp path-mtu-discovery to enable TCP path MTU discovery.
Use undo tcp path-mtu-discovery to disable TCP path MTU discovery.
Syntax
tcp path-mtu-discovery [ aging age-time | no-aging ]
undo tcp path-mtu-discovery
Default
TCP path MTU discovery is disabled.
Views
System view
Predefined user roles
network-admin
Parameters
aging age-time: Specifies the aging time for the path MTU, in the range of 10 to 30 minutes. The default aging time is 10 minutes.
no-aging: Does not age out the path MTU.
Usage guidelines
After you enable TCP path MTU discovery, all new TCP connections detect the path MTU. The device uses the path MTU to calculate the MSS to avoid IP fragmentation.
After you disable TCP path MTU discovery, the system stops all path MTU timers. The TCP connections established later do not detect the path MTU, but the TCP connections previously established still can detect the path MTU.
Examples
# Enable TCP path MTU discovery and set the path MTU aging time to 20 minutes.
<Sysname> system-view
[Sysname] tcp path-mtu-discovery aging 20
tcp-proxy congestion-method
Use tcp-proxy congestion-method to specify a TCP congestion control algorithm for TCP proxy.
Use undo tcp-proxy congestion-method to restore the default.
Syntax
tcp-proxy congestion-method { bbrv1 | bbrv2 | bic | reno }
undo tcp-proxy congestion-method
Default
The TCP congestion control algorithm is Reno for TCP proxy.
Views
System view
Predefined user roles
network-admin
Parameters
bbrv1: Specifies BBRv1 as the TCP congestion control algorithm.
bbrv2: Specifies BBRv2 as the TCP congestion control algorithm.
bic: Specifies BIC as the TCP congestion control algorithm.
reno: Specifies Reno as the TCP congestion control algorithm.
Usage guidelines
This command does not take effect on the modules that support TCP congestion control algorithm configuration. The TCP congestion control algorithm used by such a module depends on its configuration. For example, in the WAAS module, you can use the waas tfo congestion-method command to specify a TCP congestion control algorithm for the WAN side.
The modules that do not support TCP congestion control algorithm configuration use the same algorithm as the TCP proxy module.
When you use this command, you can configure one of the following TCP congestion control algorithms:
· Reno—Use this algorithm in scenarios with low latency and low bandwidth. In scenarios with high latency and high bandwidth, the speed of data transmission takes a long time to reach the maximum and thus the bandwidth utilization rate is low.
Reno is an early TCP congestion control algorithm that increases the number of congestion windows on receipt of ACK messages.
· BIC—Use this algorithm in scenarios with high bandwidth and low packet loss ratio.
BIC can make good use of remaining bandwidth resources and improve throughput, because this algorithm does not slow down packet sending as long as no packet loss occurs. However, the transmission latency of this algorithm is high. This algorithm will reduce the number of congestion windows when transmission errors cause packet loss.
· BBR—Use this algorithm in scenarios with high bandwidth, high latency, and packet loss.
BBR does not use packet loss as a congestion signal. In a scenario with high packet loss ratio, this algorithm can ensure high throughput and reduce transmission latency effectively. BBRv2 improves intra-protocol fairness by balancing aggressiveness.
Examples
# Specify Reno as the TCP congestion control algorithm for TCP proxy.
<Sysname> system-view
[Sysname] tcp-proxy congestion-method reno
Related commands
waas tfo congestion-method (Network Connectivity Command Reference)
tcp syn-cookie enable
Use tcp syn-cookie enable to enable SYN Cookie to protect the device from SYN flood attacks.
Use undo tcp syn-cookie enable to disable SYN Cookie.
Syntax
tcp syn-cookie enable
undo tcp syn-cookie enable
Default
SYN Cookie is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
A TCP connection is established through a three-way handshake:
1. The sender sends a SYN packet to the server.
2. The server receives the SYN packet, establishes a TCP semi-connection in SYN_RECEIVED state, and replies with a SYN ACK packet to the sender.
3. The sender receives the SYN ACK packet and replies with an ACK packet. Then, a TCP connection is established.
An attacker can exploit this mechanism to mount SYN flood attacks. The attacker sends a large number of SYN packets, but they do not respond to the SYN ACK packets from the server. As a result, the server establishes a large number of TCP semi-connections and cannot handle normal services.
SYN Cookie can protect the server from SYN flood attacks. When the server receives a SYN packet, it responds to the request with a SYN ACK packet without establishing a TCP semi-connection.
The server establishes a TCP connection and enters ESTABLISHED state only when it receives an ACK packet from the sender.
Examples
# Enable SYN Cookie.
<Sysname> system-view
[Sysname] tcp syn-cookie enable
tcp timer fin-timeout
Use tcp timer fin-timeout to set the TCP FIN wait timer.
Use undo tcp timer fin-timeout to restore the default.
Syntax
tcp timer fin-timeout time-value
undo tcp timer fin-timeout
Default
The TCP FIN wait timer is 675 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
time-value: Specifies the TCP FIN wait timer in the range of 76 to 3600 seconds.
Usage guidelines
TCP starts the FIN wait timer when the state of a TCP connection changes to FIN_WAIT_2. If no FIN packet is received within the timer interval, the TCP connection is terminated.
If a FIN packet is received, TCP changes the connection state to TIME_WAIT. If a non-FIN packet is received, TCP restarts the timer and tears down the connection when the timer expires.
Examples
# Set the TCP FIN wait timer to 800 seconds.
<Sysname> system-view
[Sysname] tcp timer fin-timeout 800
tcp timer syn-timeout
Use tcp timer syn-timeout to set the TCP SYN wait timer.
Use undo tcp timer syn-timeout to restore the default.
Syntax
tcp timer syn-timeout time-value
undo tcp timer syn-timeout
Default
The TCP SYN wait timer is 75 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
time-value: Specifies the TCP SYN wait timer in the range of 2 to 600 seconds.
Usage guidelines
TCP starts the SYN wait timer after sending a SYN packet. Within the SYN wait timer if no response is received or the upper limit on TCP connection tries is reached, TCP fails to establish the connection.
Examples
# Set the TCP SYN wait timer to 80 seconds.
<Sysname> system-view
[Sysname] tcp timer syn-timeout 80
tcp timestamps enable
Use tcp timestamps enable to enable carrying the TCP timestamp option in outgoing TCP packets.
Use undo tcp timestamps enable to disable carrying the TCP timestamp option in outgoing TCP packets.
Syntax
tcp timestamps enable
undo tcp timestamps enable
Default
The device adds the TCP timestamp option in outgoing TCP packets.
Views
System view
Predefined user roles
network-admin
Usage guidelines
The TCP timestamp option in TCP packets is used to calculate the RTT between two communicating devices. In some networks, it is required to prevent the intermediate devices from obtaining the TCP timestamps in packets passing through. Then you can disable carrying the TCP timestamp option in outgoing packets on a device at either end.
This command takes effect on TCP connections established only after the execution of the command.
Examples
# Enable carrying the TCP timestamp option in outgoing TCP packets.
<Sysname> system-view
[Sysname] undo tcp timestamps enable
tcp window
Use tcp window to set the size of the TCP receive/send buffer.
Use undo tcp window to restore the default.
Syntax
tcp window window-size
undo tcp window
Default
The size of the TCP receive/send buffer is 63 KB.
Views
System view
Predefined user roles
network-admin
Parameters
window-size: Specifies the size of the TCP receive/send buffer, in the range of 1 to 64 KB.
Examples
# Set the size of the TCP receive/send buffer to 3 KB.
<Sysname> system-view
[Sysname] tcp window 3