No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Packet Trace Configuration Commands

Packet Trace Configuration Commands

NOTE:

Only the CE8860EI CE8850-32CQ-EI support packet trace.

detector packet-trace profile

Function

The detector packet-trace profile command configures a packet trace profile.

The undo detector packet-trace profile command deletes a packet trace profile.

By default, no packet trace profile is available.

Format

detector packet-trace profile profile-name packet packet-value

detector packet-trace profile profile-name source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] tcp source-port source-port-number destination-port destination-port-number [ payload payload-value ]

detector packet-trace profile profile-name source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] udp source-port source-port-number destination-port destination-port-number [ payload payload-value ]

detector packet-trace profile profile-name source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] icmp icmp-type icmp-type icmp-code icmp-code [ payload payload-value ]

undo detector packet-trace profile profile-name [ packet packet-value ]

undo detector packet-trace profile profile-name [ source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] tcp source-port source-port-number destination-port destination-port-number [ payload payload-value ] ]

undo detector packet-trace profile profile-name [ source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] udp source-port source-port-number destination-port destination-port-number [ payload payload-value ] ]

undo detector packet-trace profile profile-name [ source-mac mac-address destination-mac mac-address [ vlan vlan-id [ 8021p 8021p-value ] ] source-ip ip-address destination-ip ip-address [ dscp dscp-value ] [ ttl tll-value ] icmp icmp-type icmp-type icmp-code icmp-code [ payload payload-value ] ]

Parameters

Parameter Description Value
profile-name Specifies the name of a packet trace profile.

The value is a string of 1 to 31 case-sensitive characters. It cannot start with underline (_) or contain > $ * ^ |, and spaces.

packet packet-value Specifies the content of detection packet. The value is a string of 128 to 1024 characters. It is in hexadecimal notation. The value length must be 2n (n = 64, 65, 66, …, 512) and the packet length ranges from 64 bytes to 512 bytes.
source-mac mac-address Specifies the source MAC address of the detection packet.

The value is in the H-H-H format. H is a hexadecimal number that contains 1-4 digits, such as 00e0 and fc01. If you enter fewer than four digits for an H, the system adds 0s in front of the input digits. For example, if you enter e0, 00e0 is displayed.

destination-mac mac-address Specifies the destination MAC address of the detection packet.

The value is in the H-H-H format. H is a hexadecimal number that contains 1-4 digits, such as 00e0 and fc01. If you enter fewer than four digits for an H, the system adds 0s in front of the input digits. For example, if you enter e0, 00e0 is displayed.

vlan vlan-id Specifies the VLAN ID of the detection packet. The value is an integer that ranges from 1 to 4094.
8021p 8021p-value Specifies the 802.1p priority of the detection packet. The value is an integer that ranges from 0 to 7. The default value is 0.
source-ip ip-address Specifies the source IP address of the detection packet. The value is in dotted decimal notation.
destination-ip ip-address Specifies the destination IP address of the detection packet. The value is in dotted decimal notation.
dscp dscp-value Specifies the DSCP field of the detection packet. The value is an integer that ranges from 0 to 63. The default value is 0.
ttl tll-value Specifies the TTL of the detection packet. The value is an integer that ranges from 1 to 255. The default value is 255.
tcp Specifies that the detection packet is a TCP packet. -
udp Specifies that the detection packet is a UDP packet. -
source-port source-port-number Specifies the source port number of the detection packet which is a TCP or UDP packet. The value is an integer that ranges from 0 to 65535.
destination-port destination-port-number Specifies the destination port number of the detection packet which is a TCP or UDP packet. The value is an integer that ranges from 0 to 65535.
icmp Specifies that the detection packet is an ICMP packet. -
icmp-type icmp-type Specifies the ICMP type when the detection packet is an ICMP packet. The value is an integer that ranges from 0 to 255.
icmp-code icmp-code Specifies the ICMP code when the detection packet is an ICMP packet. The value is an integer that ranges from 0 to 255.
payload payload-value Specifies the payload of the detection packet.
The value of payload-value varies according to detection packet type:
  • When the detection packet is a TCP packet, the value of payload-value is a string of 20-908 characters. It is in hexadecimal notation. The value length must be 2n (n = 10, 11, 12, …, 454) and the payload length ranges from 10 bytes to 454 bytes. If this parameter is not specified, the value 00000000000000000000 is used.
  • When the detection packet is a UDP packet, the value of payload-value is a string of 44-932 characters. It is in hexadecimal notation. The value length must be 2n (n = 22, 23, 24, …, 466) and the payload length ranges from 22 bytes to 466 bytes. If this parameter is not specified, the value 0000000000000000000000 is used.
  • When the detection packet is an ICMP packet, the value of payload-value is a string of 52-940 characters. It is in hexadecimal notation. The value length must be 2n (n = 26, 27, 28, …, 470) and the payload length ranges from 26 bytes to 470 bytes. If this parameter is not specified, the value 00000000000000000000000000000000000000000000 is used.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When packet loss occurs on a network, you can determine the switch where packets are discarded, but do not know the packet drop reason. Then you can run this command to configure a packet trace profile. The content of the profile is the content of the dropped packet. The packet trace profile can also help you understand the forwarding entries and hash calculation result for path selection of a packet (for example, packet A). The content in this profile is the content of packet A. The packet trace function constructs a detection packet based on the packet trace profile to simulate packet forwarding process inside the switch. During detection packet forwarding, packet trace records the forwarding entries, packet drop reason, and hash calculation result for path selection.

There are two methods to configure a packet trace profile:
  • Specify the packet content.
  • Specify the packet fields (only for TCP, UDP, and ICMP packets). The key fields of a TCP or UDP packet trace profile include source MAC address, destination MAC address, source IP address, destination IP address, source port number, and destination port number. The key fields of an ICMP packet trace profile include source MAC address, destination MAC address, source IP address, destination IP address, ICMP type, and ICMP code.

You are advised to obtain packet content using a packet capture tool, and then run the detector packet-trace profile profile-name packet packet-value command to configure a packet trace profile.

Precautions

The detector packet-trace profile profile-name packet packet-value command supports IPv4 and IPv6 profiles, whereas the other three commands support only IPv4 profiles.

The switch supports a maximum of 16 packet trace profiles. To configure the 17th profile, delete an existing profile by running the undo detector packet-trace profile command.

Each profile must use a unique name. If you name a new profile the same as an existing one, the new profile overwrites the existing profile.

Follow-up Procedure

After a packet trace profile is configured, run the display detector packet-trace profile interface result command to simulate packet forwarding process inside the switch with the specified receiving interface and displays the packet trace result.

Example

# Configure a packet trace profile test and specify the content packet packet-value.

<HUAWEI> system-view
[~HUAWEI] detector packet-trace profile test packet 286ed489a46300005e00010b0800450000343ba44000fd0677fd0a87002c0a87b4e81a6805d67407d364ebadef9a50189f96d84300000a8001aec0cf84cf6b7f6d84

# Configure a packet trace profile tcp_test and set the detection packet type to TCP.

<HUAWEI> system-view
[~HUAWEI] detector packet-trace profile tcp_test source-mac 1-1-1 destination-mac 2-2-2 vlan 100 8021p 2 source-ip 10.1.1.1 destination-ip 10.2.2.2 dscp 23 ttl 10 tcp source-port 6580 destination-port 7850 payload 1a6805d67407d387ebadefa850189f8817c300000980011ddb77019494866f

# Configure a packet trace profile udp_test and set the detection packet type to UDP.

<HUAWEI> system-view
[~HUAWEI] detector packet-trace profile udp_test source-mac 10-10-10 destination-mac 20-20-20 vlan 200 8021p 2 source-ip 10.10.10.10 destination-ip 10.2.2.2 dscp 23 ttl 10 udp source-port 6580 destination-port 7850 payload 1a6805d67407d387ebadefa850189f8817c300000980011ddb77019494866f

# Configure a packet trace profile icmp_test and set the detection packet type to ICMP.

<HUAWEI> system-view
[~HUAWEI] detector packet-trace profile  icmp_test source-mac 3-3-3 destination-mac 4-4-4 vlan 300 8021p 3 source-ip 10.10.10.10 destination-ip 10.2.2.2 dscp 23 ttl 20 icmp icmp-type 14 icmp-code 2

display detector packet-trace profile

Function

The display detector packet-trace profile command displays the packet trace profile configuration on a switch.

Format

display detector packet-trace profile [ profile-name ]

Parameters

Parameter Description Value
profile-name

Displays information about the packet trace profile.

If this parameter is not specified, information about all configured packet trace profiles is displayed.

The value is a string of 1 to 31 case-sensitive characters. It cannot start with underline (_) or contain > $ * ^ |, and spaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After you configure a packet trace profile with the detector packet-trace profile command, run this command to check whether the profile configuration is correct.

Example

# Display information about all configured packet trace profiles.

<HUAWEI> display detector packet-trace profile
Packet trace profile Maximum: 16
Total: 4
Packet trace profile: icmp_test
-------------------------------------------------------------------------------
Source MAC         : 0003-0003-0003
Destination MAC    : 0004-0004-0004
VLAN               : 300
8021P              : 3
Source IP          : 10.10.10.10
Destination IP     : 10.2.2.2
DSCP               : 23
TTL                : 20
IP protocol        : ICMP
ICMP type          : 14
ICMP code          : 3
Payload            : 00000000000000000000000000000000000000000000
-------------------------------------------------------------------------------
Packet trace profile: tcp_test
-------------------------------------------------------------------------------
Source MAC         : 0001-0001-0001
Destination MAC    : 0002-0002-0002
VLAN               : 100
8021P              : 2
Source IP          : 10.1.1.1
Destination IP     : 10.2.2.2
DSCP               : 23
TTL                : 10
IP protocol        : TCP
Source port        : 6580
Destination port   : 7850
Payload            : 1a6805d67407d387ebadefa850189f8817c300000980011ddb77019494
                     866f
-------------------------------------------------------------------------------
Packet trace profile: test
-------------------------------------------------------------------------------
Packet             : 286ed489a46300005e00010b0800450000343ba44000fd0677fd0a8700
                     2c0a87b4e81a6805d67407d364ebadef9a50189f96d84300000a8001ae
                     c0cf84cf6b7f6d84
-------------------------------------------------------------------------------
Packet trace profile: udp_test
-------------------------------------------------------------------------------
Source MAC         : 0010-0010-0010
Destination MAC    : 0020-0020-0020
VLAN               : 200
8021P              : 2
Source IP          : 10.10.10.10
Destination IP     : 10.2.2.2
DSCP               : 23
TTL                : 10
IP protocol        : UDP
Source port        : 6580
Destination port   : 7850
Payload            : 1a6805d67407d387ebadefa850189f8817c300000980011ddb77019494
                     866f
-------------------------------------------------------------------------------
Table 18-64  Description of the display detector packet-trace profile command output

Item

Description

Packet trace profile Maximum

Maximum number of packet trace profiles supported on a switch.

Total

Number of configured packet trace profiles.

Packet trace profile

Name of a packet trace profile.

Source MAC

Source MAC address of the detection packet.

Destination MAC

Destination MAC address of the detection packet.

VLAN

VLAN ID of the detection packet.

8021P

802.1p priority of the detection packet.

Source IP

Source IP address of the detection packet.

Destination IP

Destination IP address of the detection packet.

DSCP

DSCP field of the detection packet.

TTL

TTL of the detection packet.

IP protocol

Protocol type of the detection packet:
  • TCP
  • UDP
  • ICMP

Source port

Source port number of the detection packet which is a TCP or UDP packet.

Destination port

Destination port number of the detection packet which is a TCP or UDP packet.

ICMP type

ICMP type of the detection packet which is an ICMP packet.

ICMP code

ICMP code of the detection packet which is an ICMP packet.

Payload

Payload of the detection packet.

Packet

Content of the detection packet.

display detector packet-trace profile result

Function

The display detector packet-trace profile interface result command simulates the packet forwarding process inside a switch with a specified receiving interface and displays the packet trace result.

Format

display detector packet-trace profile profile-name interface interface-type interface-number result

Parameters

Parameter Description Value
profile-name Specifies the name of a packet trace profile.

The value is a string of 1 to 31 case-sensitive characters. It cannot start with underline (_) or contain > $ * ^ |, and spaces.

interface interface-type interface-number Indicates the interface that receives the detection packet. 10GE, 25GE, 40GE, and 100GE interfaces.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After a packet trace profile is configured using the detector packet-trace profile command, run this command to simulate the packet forwarding process inside a switch with a specified receiving interface and display the forwarding entries, packet drop reason, and hash calculation result for path selection.

When packet trace is complete, the switch discards the detection packet.

Prerequisites

The detector packet-trace profile command has been executed in the system view to configure a packet trace profile.

Example

# Simulate the packet forwarding process inside a switch with the specified receiving interface 10GE1/0/3 (the detection packet is constructed by the switch based on the profile test) and display the packet trace result.

<HUAWEI> display detector packet-trace profile test interface 10ge 1/0/3 result
Packet trace result:
--------------------------------------------------------------------------------
Packet profile                  : test
Packet inbound interface        : 10GE1/0/3
Packet hash result              : -
Packet drop cause               : VLAN not valid
Packet lookuped forwarding list : Forwarding_Vlan_Valid_Hit
                                  L2_Dst_Hit
                                  L2_Src_Miss_Hit
--------------------------------------------------------------------------------
Table 18-65  Description of the display detector packet-trace profile interface result command output

Item

Description

Packet trace result

Packet trace result.

Packet profile

Name of the profile based on which the detection packet is constructed.

Packet inbound interface

The interface that receives the detection packet.

Packet hash result

Hash calculation result of path selection for the detection packet.

Packet drop cause

Packet drop reason, including:
  • Internal reason: Internal reason.
  • MPLS label lookup miss: Failed to look up the MPLS label in the packet.
  • MPLS invalid action: Label pushing, switching, or pop-up failed.
  • MPLS invalid payload: Invalid payload in an MPLS packet.
  • MPLS TTL check fail: Failed to check the TTL value in an MPLS packet.
  • MPLS invalid control word: Invalid control field in an MPLS packet.
  • L2GRE SIP lookup miss: Failed to look up the source IP address in a Layer 2 GRE packet.
  • L2GRE VPNID lookup miss: Failed to look up the VPNID in a Layer 2 GRE packet.
  • L2GRE tunnel error: An error occurs in a Layer 2 GRE tunnel.
  • VXLAN SIP lookup miss: Failed to look up the source IP address in a VXLAN packet.
  • VXLAN VNID lookup miss: Failed to look up the VNI in a VXLAN packet.
  • VXLAN tunnel error: An error occurs in a VXLAN tunnel.
  • VLAN not valid: Invalid VLAN ID.
  • Ingress port not in VLAN member: The interface that receives the detection packet is not in the VLAN carried in the packet.
  • TPID mismatch: The inbound interface number is not matched.
  • IPV4 protocol error: An error occurs in the IPv4 protocol.
  • Higig loopback drop: A Higig loopback occurs.
  • Higig mirror only drop: Higig mirror is performed.
  • Higig unknown header: Unknown Higig header.
  • Higig unknown opcode: Unknown Higig operation code.
  • LAG fail loopback: Eth-Trunk loopback failed.
  • Src MAC equals Dst MAC: The packet has the identical source and destination MAC addresses.
  • IPV6 protocol error: An error occurs in the IPv6 protocol.
  • Trill error frame drop: Trill packet error.
  • BPDU drop: BPDUs are discarded.
  • Bad udp checksum drop: Checksum error of UDP packets.
  • IPv4 header error: IPv4 packet headers are incorrect.
  • IPv6 header error: IPv6 packet headers are incorrect.
  • Parity error: A parity check error occurs.
  • Unicast RPF check fail: Unicast Reverse Path Forwarding (URPF) check failed.
  • Inbound interface down: The interface that receives the packet is Down.
  • Outbound interface not exist: The specified outbound interface does not exist.
  • Ingress stp block: The inbound interface is blocked by STP.
  • Pre-Ingress ACL action drop: Incoming packets match ACL rules (with the deny action) before the forwarding table (for example, MAC address table for Layer 2 forwarding) is queried.
  • Ingress ACL action drop: Incoming packets match ACL rules (with the deny action) after the forwarding table is queried.
NOTE:

Outgoing packets are discarded because the interface is blocked by STP or they match the ACL rule with the deny action. Packet trace does not record the two packet drop reasons.

Packet lookuped forwarding list

Forwarding entry that is used during detection packet forwarding, including:
  • First_Vlan_Translate_Hit: VLAN translation table searched for the first time.
  • Second_Vlan_Translate_Hit: VLAN translation table searched for the second time.
  • Forwarding_Vlan_Valid_Hit: VLAN forwarding table.
  • L2_Src_Hit: source MAC address table.
  • L2_Src_Static_Hit: static MAC address table.
  • L2_Dst_Hit: destination MAC address table.
  • L2_Cache_Hit: BPDU MAC address table.
  • L3_Src_Host_Hit: routing table of the host matching the source IP address.
  • L3_Dst_Host_Hit: routing table of the host matching the destination IP address.
  • L3_Dst_Route_Hit: routing table of the destination IP address segment.
  • L2_Src_Miss_Hit: missed source MAC address table.
  • Dos_Attack_Hit: DOS attack table.
  • Ip_Tunnel_Hit: IP tunnel table.
  • MPLS_Lable1_Hit: first-layer MPLS label table.
  • MPLS_Lable2_Hit: second-layer MPLS label table.
  • MPLS_Terminated_Hit: MPLS termination table.
  • My_Station_Hit: system MAC table.
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 43753

Downloads: 330

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next