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

AR500, AR510, and AR530 V200R007 Commands Reference

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 Capture Configuration Command

Packet Capture Configuration Command

NOTE:
Based on your requirements to detect failures in telecom transmission, this feature may collect or store some communication information about specific customers. Huawei cannot offer services to collect or store this information unilaterally. Before enabling the function, ensure that it is performed within the boundaries permitted by applicable laws and regulations. Effective measures must be taken to ensure that information is securely protected.

capture-packet

Function

The capture-packet command captures service packets matching specified rules, displays captured packet information on the terminal, or saves the captured packets on the local device.

By default, the captured packets on the device are not configured.

Format

capture-packet interface interface-type interface-number [ acl acl-number ] destination { terminal | file file-name } * [ car cir car-value | time-out time | packet-num number | packet-len { length | total-packet } ] *

Parameters

Parameter

Description

Value

interface interface-type interface-number

Captures packets on a specified interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

acl

Configures an ACL.

-

acl-number

Captures packets matching a specified ACL.

The value is an integer that ranges from 2000 to 4999.

destination

Indicates the destination to which captured packet information is sent.

-

terminal

Displays captured packet information on a terminal.

-

file file-name

Saves captured packet information to a file. file-name is in the format of [drive][file-name] (such as flash:/test.cap), in which [file-name] is in the format of *.cap.

The value is a string of 5 to 63 characters without spaces. When quotation marks are used around the string, spaces are allowed in the string.

car cir car-value

Specifies the rate at which packets are captured.

The value is an integer that ranges from 1 to 256, in pps. The default value is 64 pps.

time-out time

Specifies the timeout period for capturing packets. The system stops capturing packets after the specified timeout period expires.

The value is an integer that ranges from 1 to 300, in seconds. By default, the timeout period is 60s.

packet-num number

Specifies the number of packets to be captured. The system stops capturing packets after the specified number of packets are captured.

The value is an integer that ranges from 1 to 1000. The default value is 100.

packet-len length

Specifies the length of captured packets that can be displayed on the terminal or stored on the storage medium.

The value is an integer that ranges from 20 to 1518, in bytes. The default value is 64 bytes.

total-packet

Displays the content of the entire packet on the terminal or stores the content of the entire packet on the storage medium.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If an error occurs in service traffic forwarding (for example, the traffic status does not match the traffic model), it is recommended that you configure the device to capture service packets for analysis so that the device can quickly identify invalid packets. This function ensures correct data transmission on the network.

Precautions

When packets are received by a LAN port and sent to a LAN port, the packets cannot be captured.

When the 8FE1GE or 24GE board is installed on a device and the inbound interface is on 8FE1GE or 24GE, both Layer 2 and Layer 3 packets are forwarded by LSW, and the packets cannot be mirrored. When the inbound interface is on another LAN board, Layer 2 packets cannot be mirrored and Layer 3 packets can be mirrored.

The device can capture incoming and outgoing packets.

Before using the capture-packet command again, wait until the last command execution is complete.

The system limits the rate of captured packets. If the rate of packets exceeds the limit, some packets may be discarded.

You can set the timeout period specified by time and the number of packets to be captured specified by number for a capture instance. If the timeout period expires or the specified number of packets are captured, the system stops capturing packets.

The capture-packet and voice-monitor commands cannot be configured simultaneously.

Example

# Capture packets on the interface GE1/0/0 and display them on the terminal.

<Huawei> system-view
[Huawei] capture-packet interface gigabitethernet 1/0/0 destination terminal time-out 10
[Huawei]
  Packet: 1
  -------------------------------------------------------
  ff ff ff ff ff ff 00 e0 fc 01 00 08 08 06 00 01
  08 00 06 04 00 01 00 e0 fc 01 00 08 02 01 01 03
  00 00 00 00 00 00 0a 01 01 01 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00
  -------------------------------------------------------

  ------------------capture report-----------------------
  file: NULL
  interface: GigabitEthernet1/0/0
  acl: -
  car: 64pps timeout: 10s
  packets: 100 (expected) 1 (actual)
  length: 128 (expected)              
  -------------------------------------------------------
Table 16-60  Description of the capture-packet command output

Item

Description

file

Local path that stores captured packets. NULL marking for empty.

interface

Interface where packets are captured.

acl

ACL number.

car

Rate of captured packets.

timeout

Timeout interval of packet capture. The system stops capturing packets after the specified time interval.

packets

Expected number and actual number of captured packets.

length

Length of captured packets.

display voice-monitor

Function

The display voice-monitor command displays information about voice packets passing the device.

Format

display voice-monitor

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To view information about voice packets passing the device, run the display voice-monitor command.

Prerequisites

The device is configured to capture voice packets using the voice-monitor command.

Example

# Display information about voice packets passing the device.

<Huawei> display voice-monitor
---------------------------------------------------------------------------     
TelNo                     IPAddr          Port      Direction RuleIndex         
---------------------------------------------------------------------------     
20000                     10.0.0.1        51201     Inbound   0 
10000                     10.0.0.2        61945     Outbound  1
Table 16-61  Description of the display voice-monitor command output

Item

Description

TelNo

Phone number in the captured voice packets.

IPAddr

IP address of voice packets.

Port

Port number of voice packets.

Direction

Direction of voice packets:

  • Inbound: incoming voice packets.
  • Outbound: outgoing voice packets.

RuleIndex

ID of the resource occupied by voice packets.

Related Topics

voice-monitor

Function

The voice-monitor command configures the device to capture voice packets passing the device and save them or send them to the remote server.

By default, the device is not configured to capture voice packets passing the device.

Format

voice-monitor interface interface-type interface-number destination { file file-name | server-ip ip-address source-ip ip-address } * telno telephone-number &<1-8> [ car cir cir-value | time-out time | packet-num number ] | packet-len { length | total-packet } *

Parameters

Parameter

Description

Value

interface interface-type interface-number

Captures packets on a specified interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

destination

Specifies the destination where captured packets are saved.

-

file file-name

Specifies the name of the file for storing captured packets.

The value is a string of 5 to 63 characters without spaces. The value must end with *.cap.

server-ip ip-address

Specifies the IP address of the server for storing captured packets.

-

source-ip ip-address

Specifies the source address of captured packets.

-

telno telephone-number &<1-8>

Specifies the phone number in captured packets.

The value is a string of 1 to 24 numerals. Each numeral ranges from 0 to 9. A maximum of 8 telephone numbers can be entered.

car cir cir-value

Specifies the rate at which packets are captured.

The value is an integer that ranges from 1 to 256, in pps. The default rate is 64 pps.

time-out time

Specifies the timeout interval of packet capture. The system stops capturing packets after the specified timeout interval.

The value is an integer that ranges from 1 to 300, in seconds. The default timeout interval is 60s.

packet-num number

Specifies the number of packets to be captured. The system stops capturing packets after the specified number of packets are captured.

The value is an integer that ranges from 1 to 1000. The default value is 100.

packet-len length

Specifies the length of captured packets that can be displayed on the terminal or stored on the storage medium.

The value is an integer that ranges from 20 to 1518, in bytes. The default value is 64 bytes.

total-packet

Displays the content of the entire packet on the terminal or stores the content of the entire packet on the storage medium.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When unexpected voice traffic occurs, for example, the traffic status does not match the traffic model, run the voice-monitor command to configure the device to capture voice packets for analysis. Then the device can process invalid packets in a timely manner, and data services can be correctly transmitted and voice communication quality is ensured.

When configuring packet capture, you can set parameters according to the number of packets on an interface. If there are many packets on the interface, set a small value of time and a large value of number. If there are less packets on an interface, set a large value of time and a small value of number.

Precautions

  • The packet capture configuration is not saved in the configuration file, and becomes invalid when packet capture is complete.

  • Before using the voice-monitor command again, wait until the last command execution is complete.

  • The system limits the rate of captured packets. If the rate of packets exceeds the limit, some packets may be discarded.

  • You can set the timeout interval of packet capture and number of packets to be captured. The system stops capturing packets after the timeout interval or the number of packets to be captured is reached.

  • The voice-monitor and capture-packet commands cannot be configured simultaneously.

Example

# Configure the device to capture voice packets on GE1/0/0 and save them in the capture.cap file.

<Huawei> system-view
[Huawei] voice-monitor interface gigabitethernet 1/0/0 destination file capture.cap telno 10000 20000
Warning: The packet capture function has been enabled and packets are stored in flash:/capture.cap .
[Huawei]
  ------------------capture report-----------------------                       
  file: flash:/capture.cap                                                  
  interface: GigabitEthernet1/0/0                              
  acl: -                                                            
  car: 64pps timeout: 60s                                          
  packets: 100 (expected) 0 (actual)                                  
  length: whole (expected)                                           
  -------------------------------------------------------
Table 16-62  Description of the voice-monitor command output

Item

Description

file

File name and path for storing captured packets.

interface

Interface where packets are captured.

acl

ACL number.

car

Rate at which packets are captured.

timeout

Timeout interval of packet capture. The system stops capturing packets after the specified timeout interval.

packets

Expected and actual numbers of captured packets.

length

Length of captured packets.

Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 52964

Downloads: 102

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