Example for Configuring a TCP Test Instance
Networking Requirements
In Figure 6-34, an NQA TCP test needs to be performed to obtain the duration for setting up a TCP connection with SwitchC.
Configuration Roadmap
The configuration roadmap is as follows:
Configure SwitchA as an NQA client and configure SwitchC as an NQA server.
Configure the monitoring port number on the NQA server and create an NQA TCP test instance on the NQA client.
Procedure
- Configure an IP address for each interface
and ensure reachable routes between switches.
# Configure SwitchA.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan 100 [SwitchA-vlan100] quit [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] port link-type hybrid [SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 100 [SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100 [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] interface vlanif 100 [SwitchA-Vlanif100] ip address 10.1.1.1 24 [SwitchA-Vlanif100] quit [SwitchA] ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
# Configure SwitchB.
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] vlan 100 [SwitchB-vlan100] quit [SwitchB] vlan 110 [SwitchB-vlan110] quit [SwitchB] interface gigabitethernet 1/0/1 [SwitchB-GigabitEthernet1/0/1] port link-type hybrid [SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 100 [SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 100 [SwitchB-GigabitEthernet1/0/1] quit [SwitchB] interface vlanif 100 [SwitchB-Vlanif100] ip address 10.1.1.2 24 [SwitchB-Vlanif100] quit [SwitchB] interface gigabitethernet 1/0/2 [SwitchB-GigabitEthernet1/0/2] port link-type hybrid [SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 110 [SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 110 [SwitchB-GigabitEthernet1/0/2] quit [SwitchB] interface vlanif 110 [SwitchB-Vlanif110] ip address 10.2.1.1 24 [SwitchB-Vlanif110] quit
# Configure SwitchC.
<HUAWEI> system-view [HUAWEI] sysname SwitchC [SwitchC] vlan 110 [SwitchC-vlan110] quit [SwitchC] interface gigabitethernet 1/0/1 [SwitchC-GigabitEthernet1/0/1] port link-type hybrid [SwitchC-GigabitEthernet1/0/1] port hybrid pvid vlan 110 [SwitchC-GigabitEthernet1/0/1] port hybrid untagged vlan 110 [SwitchC-GigabitEthernet1/0/1] quit [SwitchC] interface vlanif 110 [SwitchC-Vlanif110] ip address 10.2.1.2 24 [SwitchC-Vlanif110] quit [SwitchC] ip route-static 10.1.1.0 255.255.255.0 10.2.1.1
- Configure an NQA server on SwitchC.
# Configure the IP address and port number for monitoring TCP connections on the NQA server.
[SwitchC] nqa-server tcpconnect 10.2.1.2 9000
- Configure the NQA client on SwitchA.
# Enable the NQA client and create a TCP test instance.
[SwitchA] nqa test-instance admin tcp [SwitchA-nqa-admin-tcp] test-type tcp [SwitchA-nqa-admin-tcp] destination-address ipv4 10.2.1.2 [SwitchA-nqa-admin-tcp] destination-port 9000
- Start the test instance.
[SwitchA-nqa-admin-tcp] start now
- Check the configuration.
# Check NQA test results on SwitchA.
[SwitchA-nqa-admin-tcp] display nqa results test-instance admin tcp NQA entry(admin, tcp) :testflag is inactive ,testtype is tcp 1 . Test 1 result The test is finished Send operation times: 3 Receive response times: 3 Completion:success RTD OverThresholds number: 0 Attempts number:1 Drop operation number:0 Disconnect operation number:0 Operation timeout number:0 System busy operation number:0 Connection fail number:0 Operation sequence errors number:0 RTT Status errors number:0 Destination ip address:10.2.1.2 Min/Max/Average Completion Time: 46/63/52 Sum/Square-Sum Completion Time: 156/8294 Last Good Probe Time: 2012-07-25 16:23:49.1 Lost packet ratio: 0 %
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 100 # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 100 port hybrid untagged vlan 100 # ip route-static 10.2.1.0 255.255.255.0 10.1.1.2 # nqa test-instance admin tcp test-type tcp destination-address ipv4 10.2.1.2 destination-port 9000 # return
SwitchB configuration file
# sysname SwitchB # vlan batch 100 110 # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 # interface Vlanif110 ip address 10.2.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 100 port hybrid untagged vlan 100 # interface GigabitEthernet1/0/2 port link-type hybrid port hybrid pvid vlan 110 port hybrid untagged vlan 110 # return
SwitchC configuration file
# sysname SwitchC # vlan batch 110 # interface Vlanif110 ip address 10.2.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 110 port hybrid untagged vlan 110 # nqa-server tcpconnect 10.2.1.2 9000 # ip route-static 10.1.1.0 255.255.255.0 10.2.1.1 # return