Example for Configuring a Threshold for the NQA Alarm
Networking Requirements
In Figure 6-55, SwitchA functions as the client to perform the jitter test and monitor the packet loss ratio of the test result. If the ratio exceeds the threshold, an alarm is sent to the NMS.
Configuration Roadmap
The configuration roadmap is as follows:
Configure SwitchA as a client for the jitter test.
Configure the event corresponding to the alarm threshold on SwitchA.
Configure the alarm threshold on SwitchA and configure alarms to be sent to the NMS.
Procedure
- Configure an IP address for each interface and ensure reachable routes between switches, as shown in Figure 6-55.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100 110
[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] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type hybrid
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 110
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 110
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface vlanif 110
[SwitchA-Vlanif110] ip address 10.1.2.1 24
[SwitchA-Vlanif110] quit
For configurations of SwitchB, see the configuration file.
- Configure an NQA server on SwitchB.
# Configure the monitoring IP address and UDP port number on the NQA server.
<SwitchB> system-view
[SwitchB] nqa-server udpecho 10.1.1.2 9000
- Configure the event corresponding to the alarm threshold on SwitchA.
[SwitchA] nqa event 10 log-trap
- Configure the alarm threshold on SwitchA.
[SwitchA] nqa test-instance admin jitter
[SwitchA-nqa-admin-jitter] test-type jitter
[SwitchA-nqa-admin-jitter] destination-address ipv4 10.1.1.2
[SwitchA-nqa-admin-jitter] destination-port 9000
[SwitchA-nqa-admin-jitter] frequency 5
[SwitchA-nqa-admin-jitter] alarm 10 lost-packet-ratio absolute rising-threshold 80 10 falling-threshold 30 10
[SwitchA-nqa-admin-jitter] quit
- Configure alarms to be sent to the NS station on SwitchA.
# Configure basic SNMP functions.
[SwitchA] snmp-agent community read public123
[SwitchA] snmp-agent community write private123
[SwitchA] snmp-agent sys-info version v2c
# Configure alarms to be sent to the NM station through the SNMP agent.
[SwitchA] snmp-agent trap enable
[SwitchA] snmp-agent target-host trap address udp-domain 10.1.2.2 params securityname switchA
- Start the test instance.
[SwitchA] nqa test-instance admin jitter
[SwitchA-admin-jitter] start now
- Check the configuration.
When the packet loss ratio reaches the upper or lower alarm threshold, the trap can be displayed on the NMS.
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 100 110 # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 # interface Vlanif110 ip address 10.1.2.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 # snmp-agent snmp-agent local-engineid 800007DB03548998F3A458 snmp-agent community read cipher %^%#D]&bKCCRjC=7sTLO!f*Xcda~6Agnd7irJX,oUV%4TC^>"GXkFK4G4#Lw(Nm7Wid0O00\B:H{yDKtCCe&%^%# snmp-agent community write cipher %^%#sZaU6ZfkO<4'!s9g&[X~N}|5<C<qUUqEecV%+4^RG#jH*S2%IQOPe#$Z9|Y@(<SHFyomFI$Wq<#h^ueW%^%# snmp-agent sys-info version v2c v3 snmp-agent target-host trap address udp-domain 10.1.2.2 params securityname cipher %^%#.VYh22r_VPzZ5m2azPQDYh^9:]r~oIFBl[#Aq95*%^%# snmp-agent trap enable # nqa event 10 log-trap # nqa test-instance admin jitter test-type jitter destination-address ipv4 10.1.1.2 destination-port 9000 alarm 10 lost-packet-ratio absolute rising-threshold 80 10 falling-threshold 30 10 # return
- SwitchB configuration file
# sysname SwitchB # vlan batch 100 # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 100 port hybrid untagged vlan 100 # nqa-server udpecho 10.1.1.2 9000 # return