< Home

source-port

Function

The source-port command configures the source port for an NQA test instance.

The undo source-port command restores the default setting.

No default source port number is specified, port numbers are randomly allocated by the system.

Format

source-port port-number

undo source-port

Parameters

Parameter Description Value
port-number Specifies the source port number for an NQA test instance. The value is an integer that ranges from 1 to 65535. The configured port cannot be a well-known port or used by other modules.

Views

NQA view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a source port number is specified in an NQA test instance, NQA test packets can be regulated more accurately, which prevents the probe packets from being filtered by rules such ACL. The source-port command can be used to configure the source port for this NQA test instance:
  • If no source port number is specified for an NQA test instance, a port number is selected at random to receive or send NQA test packets.
  • If source port number is specified for an NQA test instance, the specified port number is used to receive and send NQA test packets.

Prerequisites

The test instance type has been specified using the test-type command. The source port can be configured for FTP, HTTP, SNMP, UDP Jitter, TCP, and UDP test instances.

Precautions

The port specified in the source-port command must be available; otherwise, the probe fails.

You cannot change this configuration of a running test instance.

Example

# Set the source port number of test instance user test to 3000.

<HUAWEI> system-view
[HUAWEI] nqa test-instance user test
[HUAWEI-nqa-user-test] test-type tcp
[HUAWEI-nqa-user-test] source-port 3000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >