11-Network Management and Monitoring Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S6805 & S6825 & S6850 & S9850 Command References-Release 66xx-6W10311-Network Management and Monitoring Command Reference
22-Packet trace commands
Title Size Download
22-Packet trace commands 134.89 KB

Packet trace commands

display packet-trace history

Use display packet-trace history to display history packet trace operation results.

Syntax

display packet-trace history profile profile-name [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

profile profile-name: Specifies a packet profile by its name, a case-sensitive string of 1 to 31 characters.

interface interface-type interface-number: Specifies an ingress interface for traced packets. You can specify only a Layer 2 physical interface or a Layer 3 physical interface or subinterface. If you do not specify an ingress interface, this command displays history results about all packet trace operations that use the specified profile.

Usage guidelines

To help users obtain information about the device status and locate network issues, the device saves the most recent 10 packet trace operation results in the cache. You can use this command to display the results.

The cached packet trace operation results will be cleared after the device reboots.

Examples

# Display history results about all packet trace operations that use packet profile testtcp.

<Sysname> display packet-trace history profile testtcp

Ingress interface: Twenty-FiveGigE1/0/1

Packet trace result 1:

  Forwarding path:

    ForwardingVlanValid

Packet resolution:

    UnknownPkt

Source port STP state:  Forward

Packet drop reason:

    IngressPortNotInVlanMember

 

Packet trace result 2:

  Forwarding path:

    ForwardingVlanValid

    L2DstHit

    L3DestHostHit

    L3DestRouteHit

    L2SrcMiss

    MystationHit

Packet resolution:

    KnownL3UcPkt

Source port STP state:  Forward

Egress interface info:

 Destination mod:16 port:0

    l3 egress intf show 100001

Packet drop reason:

    NoDrop

 

Packet trace result 3:

  Forwarding path:

    ForwardingVlanValid

    L2DstHit

    L3DestRouteHit

    L2SrcMiss

    MystationHit

Packet resolution:

    KnownL3UcPkt

Source port STP state:  Forward

Egress interface info:

 Destination mod:16 port:0

    l3 egress intf show 100006

Packet drop reason:

    NoDrop

For information about the field descriptions, see Table 1.

Related commands

packet-trace execute profile

reset packet-trace history

display packet-trace profile

Use display packet-trace profile to display information about packet profiles.

Syntax

display packet-trace profile [ profile-name ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

profile-name: Specifies a packet profile by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a packet profile, this command displays information about all packet profiles.

Examples

# Display information about all packet profiles.

<Sysname> display packet-trace profile

Profile name               : testicmp

 Type                      : icmp

 Destination MAC           : --

 Source MAC                : --

 VLAN ID                   : --

 802.1p Priority           : --

 Service VLAN ID           : --

 Service 802.1p Priority   : --

 Customer VLAN ID          : --

 Customer 802.1p Priority  : --

 Destination IP            : --

 Source IP                 : --

 DSCP                      : --

 TTL                       : --

 ICMP type                 : 10

 ICMP code                 : 100

 Payload                   : --

 

Profile name               : testraw

 Type                      : raw

 Packet                    : 12345678901234567890123456789012345678901234567890

                             12345678901234567890123456789012345678901234567890

                             12345678901234567890123456789012345678901234567890

                             12345678901234567890123456789012345678901234567890

                             12345678901234567890123456789012345678901234567890

                             1234567891

 

Profile name               : testtcp

 Type                      : tcp

 Destination MAC           : 0001-0001-0002

 Source MAC                : 0001-0001-0001

 VLAN ID                   : --

 802.1p Priority           : --

 Service VLAN ID           : 100

 Service 802.1p Priority   : 1

 Customer VLAN ID          : 200

 Customer 802.1p Priority  : 2

 Destination IP            : 2.2.2.1

 Source IP                 : 1.1.1.1

 DSCP                      : 0

 TTL                       : 100

 Destination port          : 50002

 Source port               : 50001

 Payload                   : 12345678901234567890123456789012345678901234567890

                             12345678901234567890123456789012345678901234567890

                             12345678901234567890

Table 1 Command output

Field

Description

Profile name

Name of the packet profile.

Type

Protocol type of traced packets. The following values are available:

·     icmp.

·     raw.

·     tcp.

·     udp.

Destination MAC

Destination MAC address of traced packets.

If no destination MAC address is configured, this field displays two hyphens (--).

Source MAC

Source MAC address of traced packets.

If no source MAC address is configured, this field displays two hyphens (--).

VLAN ID

VLAN ID of traced packets.

If no VLAN ID is configured, this field displays two hyphens (--).

802.1p priority

802.1p priority of traced packets.

If no 802.1p priority is configured, this field displays two hyphens (--).

Service VLAN ID

Outer VLAN ID of traced packets.

If no outer VLAN ID is configured, this field displays two hyphens (--).

Service 802.1p priority

802.1p priority of the outer VLAN tag in traced packets.

If no 802.1p priority is configured for the outer VLAN tag, this field displays two hyphens (--).

Customer VLAN ID

Inner VLAN ID of traced packets.

If no inner VLAN ID is configured, this field displays two hyphens (--).

Customer 802.1p priority

802.1p priority of the inner VLAN tag in traced packets.

If no 802.1p priority is configured for the inner VLAN tag, this field displays two hyphens (--).

Destination IP

Destination IP address of traced packets.

If no destination IP address is configured, this field displays two hyphens (--).

Source IP

Source IP address of traced packets.

If no source IP address is configured, this field displays two hyphens (--).

DSCP

DSCP value of traced packets.

If no DSCP value is configured, this field displays two hyphens (--).

TTL

Maximum hops of traced packets.

If no value is set, this field displays two hyphens (--).

Destination port

Destination port number of traced packets.

If no destination port number is configured, this field displays two hyphens (--).

Source port

Source port number of traced packets.

If no source port number is configured, this field displays two hyphens (--).

ICMP type

Message type of traced ICMP packets.

ICMP code

Message code of traced ICMP packets.

Payload

Payload of traced packets.

icmp-type icmp-code

Use icmp-type icmp-code to configure the message type and code for traced ICMP packets.

Use undo icmp-type to restore the default.

Syntax

icmp-type icmp-type icmp-code icmp-code

undo icmp-type

Default

No message type or code is configured for traced ICMP packets.

Views

ICMP packet profile view

Predefined user roles

network-admin

Parameters

icmp-type icmp-type: Specifies an ICMP message type in the range of 0 to 255.

icmp-code icmp-code: Specifies an ICMP message code in the range of 0 to 255.

Usage guidelines

To ensure successful packet trace operations that use an ICMP packet profile, you must use this command.

To truly present the processing process of ICMP packets within the device, configure the ICMP message type and code according to the corresponding field values in real ICMP packets. A violation might bring in inaccurate packet trace operation result because the simulated packet processing process might be different from the real packet processing process.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Set the ICMP type to 1 and ICMP code to 2 for traced packets in ICMP packet profile testicmp.

<Sysname> system-view

[Sysname] packet-trace profile testicmp type icmp

[Sysname-packet-trace-testicmp-icmp] icmp-type 1 icmp-code 2

packet-trace execute profile

Use packet-trace execute profile to execute a packet trace operation.

Syntax

packet-trace execute profile profile-name interface interface-type interface-number

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a packet profile by its name, a case-sensitive string of 1 to 31 characters.

interface interface-type interface-number: Specifies an ingress interface by its type and number for traced packets. You can specify only a Layer 2 physical interface or a Layer 3 physical interface or subinterface.

Usage guidelines

This command constructs traced packets based on the specified profile, injects the packets to the device from the specified interface, simulates the packet forwarding process, and traces the forwarding process.

To ensure that the packet trace operation can succeed, the specified interface must be up.

Before you use this command, perform the following tasks:

·     If the specified profile is a raw packet profile, configure the raw packet content by using the raw-packet command.

·     If the specified profile is a TCP or UDP packet profile, configure the Layer 2 parameters, Layer 3 parameters, and source and destination port numbers for traced packets.

·     If the specified profile is an ICMP packet profile, configure the Layer 2 parameters, Layer 3 parameters, ICMP message type, and ICMP message code for traced packets.

Examples

# Execute a packet trace operation and specify packet profile test and ingress interface Twenty-FiveGigE1/0/1.

<Sysname> system-view

[Sysname] packet-trace execute profile t1 interface twenty-fivegige 1/0/1

Packet trace result:

  Forwarding path:

    ForwardingVlanValid

    L2DstHit

    L3DestHostHit

    L3DestRouteHit

    L2SrcMiss

    MystationHit

Packet resolution:

    KnownL3UcPkt

Source port STP state:  Forward

Egress interface info:

 Destination mod:16 port:0

    l3 egress intf show 100001

Packet drop reason:

    NoDrop

Table 2 Command output

Field

Description

Forwarding path

Forwarding path of traced packets:

·     FirstVlanTranslationHit—Looked up the VLAN translation table for the first time.

·     SecondVlanTranslationHit—Looked up the VLAN translation table for the second time.

·     ForwardingVlanValid—Looked up the VLAN forwarding table.

·     L2SrcHit—Looked up the source MAC table.

·     L2SrcStatic—Looked up the static MAC table.

·     L2DstHit—Looked up the destination MAC table.

·     L2CacheHit—Looked up the BPDU MAC table.

·     L3SrcHostHit—Looked up the source IP host route table.

·     L3DestHostHit—Looked up the destination IP host route table.

·     L3DestRouteHit—Looked up the destination IP network routing table.

·     L2SrcMiss—Failed to look up the source MAC table.

·     DosAttack—Looked up the DoS attack table.

·     IpTunnelHit—Looked up the IP tunnel table.

·     MplsLabel1Hit—Looked up the tier 1 MPLS label table.

·     MplsLabel2Hit—Looked up the tier 2 MPLS label table.

·     MplsTerminated—Looked up the MPLS termination table.

·     MyStationHit—Looked up the system MAC table.

Packet resolution

Encapsulation type of traced packets:

·     UnknownPkt.

·     ControlPkt.

·     OamPkt.

·     BfdPkt.

·     BpduPkt.

·     1588Pkt.

·     KnownL2UcPkt.

·     UnknownL2UcPkt.

·     KnownL2McPkt.

·     UnknownL2McPkt.

·     L2BcPkt.

·     KnownL3UcPkt.

·     UnknownL3UcPkt.

·     KnownIpMcPkt.

·     UnknownIpMcPkt.

·     KnownMplsL2Pkt.

·     UnknownMplsPkt.

·     KnownMplsL3Pkt.

·     KnownMplsPkt.

·     KnownMinMPkt.

·     UnknownMinMPkt.

·     KnownTrillPkt.

·     UnknownTrillPkt.

·     KnownNivPkt (Network Interface Virtualization Pkt).

·     UnknownNivPkt.

·     KnownL2GrePkt.

·     KnownVxlanPkt.

·     KnownFCoEPkt.

·     UnknownFCoEPkt.

Source port STP state

STP state of the ingress interface:

·     Disabled—The interface is not activated, It cannot participate in any STP activities or forward user traffic.

·     Blocked—The interface can receive BPDUs, but it cannot send BPDUs or forward user traffic.

·     Listening—The interface can send and receive BPDUs, but it cannot forward user traffic.

·     Forwarding—The interface can send and receive BPDUs and forward user traffic.

Hash result

Hash result:

·     Hash resolution: ECMP1.

·     Hash resolution: ECMP2.

·     Hash resolution: Trunk.

·     Hash resolution: Fabric trunk.

Egress interface info

Egress interface information for traced packets.

·     Destination mod—Number of the chip on which the egress interface resides.

·     port—Internal number of the egress interface.

·     DVP—Egress interface information for VXLAN/MPLS VPN packets. This field is not displayed for non-VXLAN/MPLS VPN packets.

·     Forwarding VLAN—VLAN information.

·     l2 multicast group—Layer 2 multicast group information.

·     l3 multicast group—Layer 3 multicast group information.

·     l3 egress intf show—Number of the Layer 3 egress interface on the chip.

Packet drop reason

Packet drop reason:

·     Internal—Internal reason.

·     MplsLabelLookupMiss—Failed to look up for the MPLS label.

·     MplsInvalidAction—Failed to insert, switch, or pop up the MPLS label.

·     MplsInvalidPayload—Invalid payload of the MPLS packet.

·     MplsTtlCheckFail—MPLS TTL check failure.

·     MplsInvalidControlWord—Invalid MPLS control word.

·     L2greSipLookupMiss Failed to look up for the source IP of the Layer 2 GRE packet.

·     L2greVpnLookupMiss—Failed to look up for the VPN ID of the Layer 2 GRE packet.

·     L2greTunnelError—L2GRE tunnel error.

·     VxlanSipLookupMiss—VXLAN source IP lookup failure.

·     VxlanVnidLookupMiss—VXLAN ID lookup failure.

·     VxlanTunnelError—VXLAN tunnel error.

·     VlanNotValid—Invalid VLAN.

·     IngressPortNotInVlanMember—The interface that received the packet was not assigned to the VLAN in the packet.

·     TpidMismatch—Mismatched TPID.

·     Ipv4ProtocolError—IPv4 protocol error.

·     HigigLoopback—Higig loopback.

·     HigigMirrorOnly—Higig mirroring drop.

·     HigigUnknownHeader—Unknown Higig header.

·     HigigUnknownOpcode—Unknown Higig opcode.

·     LagFailLoopback—Eth-Trunk loopback failure.

·     L2SrcEqualL2Dst—The source MAC address is the same as the destination MAC address.

·     Ipv6ProtocolError—IPv6 protocol error.

·     NivVntagPresent—NIV VNTAG present drop.

·     NivVntagNotPresent—NIV VNTAG not present drop.

·     NivVntagFormat—NIV VNTAG format drop.

·     TrillErrorFrame—Error TRILL frame.

·     Bpdu—BPDU drop.

·     BadUdpChecksum—UDP checksum error.

·     TunnlDecapEcnError—Tunnel decapsulation ECN error.

·     Ipv4HeaderError—IPv4 header error.

·     Ipv6HeaderError—IPv6 header error.

·     ParityError—Parity error.

·     RpfCheckFail—uRPF check failure.

·     Pre-Ingress ACL action drop—Before searching the forwarding table (for example, Layer 2 MAC forwarding table) for the inbound packet, the device matched the packet to an ACL rule. However, the ACL rule denied the packet.

·     Ingress ACL action drop—After searching the forwarding table for the inbound packet, the device matched the packet to an ACL rule. However, the ACL rule denied the packet.

·     TunnelObjectValidationFail—Tunnel termination.

·     TunnelShimHeaderError—Tunnel header error.

·     TunnelTTLError—Tunnel TTL check failure.

·     TunnelInterfaceCheckFail—Tunnel interface check failure.

·     TunnelError—Tunnel error.

For outbound packets, packet trace does not record the packet drop reason if the packet is dropped because the interface is blocked by STP or an ACL rule denies the packet.

 

packet-trace profile

Use packet-trace profile to create a packet profile and enter its view, or enter the view of an existing packet profile.

Use undo packet-trace profile to delete a packet profile.

Syntax

packet-trace profile profile-name [ type { icmp | raw | tcp | udp } ]

undo packet-trace profile [ profile-name ]

Default

No packet profiles exist for packet trace.

Views

System view

Predefined user roles

network-admin

Parameters

profile-name: Specifies a packet profile by its name, a case-sensitive string of 1 to 31 characters.

type: Specifies the type of traced packets. If you do not specify a type, the type of traced packets is raw.

icmp: Specifies ICMP packets.

raw: Specifies raw packets.

tcp: Specifies TCP packets.

udp: Specifies UDP packets.

Usage guidelines

Packet trace uses a packet profile to construct traced packets, injects the packets to the device from an ingress interface, simulates the packet forwarding process, and traces the forwarding process. This feature can identify whether the device can forward packets correctly and whether packet loss has occurred during the forwarding process. If packets are lost, the feature can assist in locating the packet loss cause.

A packet profile contains a set of parameters used to construct traced packets. You can configure the parameters based on the characteristic parameters of service packets.

The following types of packet profiles are available:

·     Raw packet profile—In this type of profiles, the entire content of traced packets is user configured. The content is a string of hexadecimal characters. No spaces are allowed. You can use a packet capture tool (for example, Wireshark) to capture a packet in string format and copy the entire packet to the raw packet profile raw packet view.

·     Traced protocol packet profile—In this type of profiles, you can simulate ICMP, TCP, or UDP protocol packets by defining values for the required fields of the protocol packets. The device automatically pads values for fields that are not defined.

On the device, each packet profile must use a unique name even though the types of the packet profiles are different. You must specify a type when creating a packet profile. You do not need to specify the type when entering the packet profile view after the packet profile is created.

Examples

# Create a raw packet profile named testraw and enter its view.

<Sysname> system-view

[Sysname] packet-trace profile testraw

[Sysname-packet-trace-testraw-raw]

# Create a TCP packet profile named testtcp and enter its view.

<Sysname> system-view

[Sysname] packet-trace profile testtcp type tcp

[Sysname-packet-trace-testtcp-tcp]

payload

Use payload to enter packet profile payload view and configure the payload of traced packets for a TCP, UDP, or ICMP packet profile.

Use undo payload to delete the payload of traced packets for a TCP, UDP, or ICMP packet profile.

Syntax

payload

undo payload

Views

TCP packet profile view

UDP packet profile view

ICMP packet profile view

Predefined user roles

network-admin

Usage guidelines

In packet profile payload view, you can input a string of hexadecimal characters. The string must contain an even number of hexadecimal characters. If you input the characters with spaces in multiple lines, the device automatically removes the line breakers and spaces from the string in the input order when saving the payload.

The payload length of traced packets varies by packet profile type.

·     TCP—20 to 2928 characters.

·     UDP—44 to 2952 characters.

·     ICMP—52 to 2960 characters.

After you complete the payload configuration, use the payload-end command to save the configuration and exit packet profile payload view. To exit packet profile payload view without saving the configuration in the view, use the quit command instead of the payload-end command.

Examples

# Enter the payload view of packet profile testtcp and configure the payload of traced TCP, UDP, or ICMP packets as 12345678901234567890.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] payload

Enter payload view to configure the packet content. To exit the view, execute the quit or payload-end command.

[Sysname-packet-trace-test-tcp-payload] 12345678901234567890

[Sysname-packet-trace-testtcp-tcp-payload]

payload-end

Use payload-end to save the configuration in packet profile payload view and exit the view.

Syntax

payload-end

Views

Packet profile payload view

Predefined user roles

network-admin

Examples

# Enter the payload view of packet profile testtcp for the first time, configure the payload of traced packets as 12345678901234567890. Then, save the configuration and exit the view.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] payload

Enter payload view to configure the packet content. To exit the view, execute the quit or payload-end command.

[Sysname-packet-trace-testtcp-tcp-payload] 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

[Sysname-packet-trace-test tcp -tcp-payload] payload-end

# Change the payload of traced packets to 12345678901234567890 for packet profile testtcp.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] payload

Enter payload view to configure the packet content. To exit the view, execute the quit or payload-end command.

[Sysname-packet-trace-testtcp-tcp-payload] 12345678901234567891

[Sysname-packet-trace-testtcp -tcp-payload] payload-end

The current input will replace the existing payload content configuration. Continue? [Y/N]:y

raw-packet

Use raw-packet to enter raw packet profile raw packet view and configure the content of traced raw packets in the view.

Use undo raw-packet to delete the content configuration of traced raw packets.

Syntax

raw-packet

undo raw-packet

Default

No packet content is configured for traced packets in a raw packet profile.

Views

Raw packet profile view

Predefined user roles

network-admin

Usage guidelines

In raw packet profile raw packet view, you can input a string of 128 to 3036 hexadecimal characters. The string must contain an even number of hexadecimal characters. If you input the characters with spaces in multiple lines, the device automatically removes the line breakers and spaces from the string in the input order when saving the content.

You can use a packet capture tool (for example, Wireshark) to capture a packet in string format and copy the entire packet to the raw packet profile raw packet view.

After you complete the content configuration, use the raw-packet-end command to save the configuration and exit raw packet profile raw packet view. To exit raw packet profile raw packet view without saving the configuration in the view, use the quit command instead of the raw-packet-end command.

Examples

# Enter the raw packet view of packet profile testraw and configure the content of traced raw packets as 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000000 in the view.

<Sysname> system-view

[Sysname] packet-trace profile testraw

[Sysname-packet-trace-test-raw] raw-packet

[Sysname-packet-trace-testraw-raw] raw-packet

Enter raw packet view to configure the packet content. To exit the view, execute the quit or raw-packet-end command.

[Sysname-packet-trace-testraw-raw-packet] 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000000

[Sysname-packet-trace-testraw-raw-packet]

raw-packet-end

Use raw-packet-end to save the configuration in raw packet profile raw packet view and exit the view.

Syntax

raw-packet-end

Views

Raw packet profile view

Predefined user roles

network-admin

Examples

# Configure the raw packet content as 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000000 for the first time for packet profile testraw.

<Sysname> system-view

[Sysname] packet-trace profile testraw

[Sysname-packet-trace-testraw-raw] raw-packet

Enter raw packet view to configure the packet content. To exit the view, execute the quit or raw-packet-end command.

[Sysname-packet-trace-testraw-raw-packet] 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000000

[Sysname-packet-trace-testraw-raw-packet] raw-packet-end

# Change the raw packet content to 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000001 for packet profile testraw.

<Sysname> system-view

[Sysname] packet-trace profile test

[Sysname-packet-trace-test-raw] raw-packet

Enter raw packet view to configure the packet content. To exit the view, execute the quit or raw-packet-end command.

[Sysname-packet-trace-testraw-raw-packet] 90e7106017f800465900a03208004500002800004000ff0677cb0101010201010101271027100000001500000000500000005dab000000000000000000000001

[Sysname-packet-trace-testraw-raw-packet] raw-packet-end

The current input will replace the existing packet content configuration. Continue? [Y/N]:y

reset packet-trace history

Use reset packet-trace history to clear history packet trace operation results.

Syntax

reset packet-trace history profile profile-name [ interface interface-type interface-number ]

Views

User view

Predefined user roles

network-admin

Parameters

profile profile-name: Specifies a packet profile by its name, a case-sensitive string of 1 to 31 characters.

interface interface-type interface-number: Specifies an ingress interface by its type and number. You can specify only a Layer 2 physical interface or a Layer 3 physical interface or subinterface. If you do not specify an ingress interface, this command clears history results about all packet trace operations that use the specified profile.

Examples

# Clear history results about packet trace operations that use packet profile test and ingress interface Twenty-FiveGigE 1/0/1.

<Sysname> reset packet-trace history profile test interface twenty-fivegige 1/0/1

Related commands

display packet-trace history

source-ip destination-ip

Use source-ip destination-ip to configure Layer 3 parameters for traced packets.

Use undo source-ip to restore the default.

Syntax

source-ip src-ip destination-ip dest-ip [ dscp dscp-value ] [ ttl ttl-value ]

undo source-ip

Default

No Layer 3 parameters are configured for traced packets.

Views

TCP packet profile view

UDP packet profile view

ICMP packet profile view

Predefined user roles

network-admin

Parameters

src-ip: Specifies the source IP address of traced packets.

dest-ip: Specifies the destination IP address of traced packets.

dscp dscp-value: Specifies the DSCP of traced packets, in the range of 0 to 63. The default value is 0.

ttl ttl-value: Specifies the maximum hops of traced packets, in the range of 1 to 255. The default value is 255.

Usage guidelines

To ensure successful packet trace operations that use a TCP, UDP, or ICMP packet profile, you must use this command.

To truly present the processing process of service packets within the device, configure the Layer 3 parameters for traced packets according to the corresponding field values in real service packets. A violation might bring in inaccurate packet trace operation result because the simulated packet processing process might be different from the real packet processing process.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure Layer 3 parameters for packet profile testtcp.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] source-ip 10.1.1.1 destination-ip 10.1.1.2 dscp 1 ttl 10

source-mac destination-mac

Use source-mac destination-mac to configure Layer 2 parameters for traced packets.

Use undo source-mac to restore the default.

Syntax

source-mac src-mac destination-mac dest-mac [ vlan vlan-id [ dot1p dot1p-value ] | service-vlan vlan-id [ service-dot1p dot1p-value ] customer-vlan vlan-id [ customer-dot1p dot1p-value ] ]

undo source-mac

Default

No Layer 2 parameters are configured for traced packets.

Views

TCP packet profile view

UDP packet profile view

ICMP packet profile view

Predefined user roles

network-admin

Parameters

src-mac: Specifies the source MAC address of traced packets, in the format of H-H-H. You can omit the consecutive zeros at the beginning of each segment. For example, you can enter f-e2-1 for 000f-00e2-0001.

dest-mac: Specifies the destination MAC address of traced packets, in the format of H-H-H. You can omit the consecutive zeros at the beginning of each segment. For example, you can enter f-e2-1 for 000f-00e2-0001.

vlan vlan-id: Specifies a VLAN ID for the VLAN tag of traced packets. The value range for the vlan-id argument is 1 to 4094. If you do not specify a VLAN ID, the traced packets do not have a VLAN tag.

dot1p dot1p-value: Specifies an 802.1p priority for the VLAN of traced packets. The value range for the dot1p-value argument is 0 to 7. If you do not specify an 802.1p priority, the traced packets do not have an 802.1p priority for the VLAN.

service-vlan vlan-id: Specifies a VLAN ID for the outer VLAN tag of traced packets. The value range for the vlan-id argument is 1 to 4094. If you do not specify a VLAN ID, the traced packets do not have an outer VLAN tag.

service-dot1p dot1p-value: Specifies an 802.1p priority for the outer VLAN of traced packets. The value range for the dot1p-value argument is 0 to 7. If you do not specify an 802.1p priority, the traced packets do not have an 802.1p priority for the outer VLAN.

customer-vlan vlan-id: Specifies a VLAN ID for the inner VLAN tag of traced packets. The value range for the vlan-id argument is 1 to 4094. If you do not specify an inner VLAN ID, the traced packets do not have an inner VLAN tag.

customer-dot1p dot1p-value: Specifies an 802.1p priority for the inner VLAN of traced packets. The value range for the dot1p-value argument is 0 to 7. If you do not specify an 802.1p priority, the traced packets do not have an 802.1p priority for the inner VLAN.

Usage guidelines

To ensure successful packet trace operations that use a TCP, UDP, or ICMP packet profile, you must use this command.

To truly present the processing process of service packets within the device, configure the Layer 2 parameters for traced packets according to the corresponding field values in real service packets. A violation might bring in inaccurate packet trace operation result because the simulated packet processing process might be different from the real packet processing process.

To avoid packet loss, specify the MAC address of the ingress interface as the destination MAC address. The ingress interface is specified in the packet-trace execute profile command when you execute a packet trace operation.

To ensure a successful packet trace operation, the source and destination MAC addresses in traced packets cannot be the same one.

If you execute the source-mac destination-mac command multiple times, the most recent configuration takes effect.

Examples

# Configure Layer 2 parameters for traced packets in packet profile testtcp.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] source-mac 1-1-1 destination-mac 2-2-2 vlan 1 dot1p 1

source-port destination-port

Use source-port destination-port to configure the source and destination port numbers of traced packets.

Use undo source-port to restore the default.

Syntax

source-port src-port destination-port dest-port

undo source-port

Default

No source or destination port number is configured for traced packets.

Views

TCP packet profile view

UDP packet profile view

Predefined user roles

network-admin

Parameters

src-port: Specifies the source port number of traced packets, in the range of 0 to 65535.

dest-port: Specifies the destination port number of traced packets, in the range of 0 to 65535.

Usage guidelines

To ensure successful packet trace operations that use a TCP or UDP packet profile, you must use this command.

To truly present the processing process of service packets within the device, configure the source and destination port numbers for traced packets according to the corresponding field values in real service packets. A violation might bring in inaccurate packet trace operation result because the simulated packet processing process might be different from the real packet processing process.

If you execute this command multiple times, the most recent configuration takes effect.

Examples

# Configure source and destination port numbers for traced packets in packet profile testtcp.

<Sysname> system-view

[Sysname] packet-trace profile testtcp

[Sysname-packet-trace-testtcp-tcp] source-port 50001 destination-port 50002

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网