< Home

datasize

Function

The datasize command sets the size of the test packet.

The undo datasize command restores the default size.

Format

datasize size

undo datasize

Parameters

Parameter Description Value
size Specifies the size of the NQA test packet.

The value is an integer that ranges from 0 to 8100, in bytes.

Views

NQA view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The datasize command sets the size of the data field of a test packet. This ensures that the size of the test packet is closer to the size of the actual data packet and the statistics obtained is more accurate.

Prerequisites

Before running the datafill command, run the test-type command to specify the type of a test instance, which may be one of the following:
  • UDP
  • UDP-jitter
  • ICMP
  • UDP-tracert

Configuration Impact

Default values and configuration methods of datasize in the test cases vary with different test types.

Test Type Default Value of datasize Configuration Description
ICMP 20

When the value of datasize is smaller than 20, the FW still constructs the payload of a packet based on 20 bytes. When the value of datasize is larger than 20, the FW constructs the payload of a packet based on the value of datasize.

UDP-tracert 12

When the value of datasize is smaller than 12, the FW still constructs the payload of a packet based on 12 bytes. When the value of datasize is larger than 12, the FW constructs the payload of a packet based on the value of datasize.

UDP 100 The FW constructs the payload of a packet based on the value of datasize.
UDP-jitter 100 When the value of datasize is set to 172, the payload of a packet contains 172 bytes. When the value of datasize is set to another value, the payload of a packet constantly contains 100 bytes.

Precautions

You cannot change the data size of the currently performed test.

Example

# Set the data size the packet to 100 bytes for the test named admin icmp.

<sysname> system-view
[sysname] nqa test-instance admin icmp
[sysname-nqa-admin-icmp] test-type icmp
[sysname-nqa-admin-icmp] datasize 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >