Example for Sending Trap Massages to the NMS When the Threshold Is Exceeded
Networking Requirements
A Jitter test needs to be performed to configure a transmission delay threshold and enable the trap function as shown in Figure 7-31. After the jitter test is complete, RouterA sends a trap message to the NMS when the interval for transmitting the test packet from RouterA to RouterC or from RouterC to RouterA exceeds the configured unidirectional transmission threshold, or when the RTT of the test packet exceeds the configured two-way transmission threshold. According to the traps received by the NMS, network administrators can easily locate the fault.
Configuration Roadmap
The configuration roadmap is as follows:
Configure RouterC as the NQA server and configure the host IP address and port number.
Configure RouterA as the NQA client, configure a threshold for the NQA alarm, and enable the trap function.
- Create a jitter test instance on RouterA.
Procedure
- Configure an IP address for each interface and ensure reachable
routes between Routers, as shown in Figure 7-31.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ip address 10.1.1.1 24
[RouterA-GigabitEthernet1/0/0] quit
[RouterA] interface gigabitethernet 2/0/0
[RouterA-GigabitEthernet2/0/0] ip address 10.20.1.1 24
[RouterA-GigabitEthernet2/0/0] quit
[RouterA] ip route-static 10.30.1.0 255.255.255.0 10.1.1.2
NOTE:
For configurations of RouterB and RouterC, see the configuration files.
- Configure the IP address and port number for monitoring
UDP services on RouterC.
<RouterC> system-view
[RouterC] nqa-server udpecho 10.30.1.2 9000
- Create a jitter test instance on RouterA.
[RouterA] nqa test-instance admin jitter
[RouterA-nqa-admin-jitter] test-type jitter
[RouterA-nqa-admin-jitter] destination-address ipv4 10.30.1.2
[RouterA-nqa-admin-jitter] destination-port 9000
- Set a threshold on RouterA.
# Configure the RTD threshold on RouterA.
[RouterA-nqa-admin-jitter] threshold rtd 20
# Configure the OWD-DS threshold on RouterA.
[RouterA-nqa-admin-jitter] threshold owd-ds 100
# Configure the OWD-SD threshold on RouterA.
[RouterA-nqa-admin-jitter] threshold owd-sd 100
- Enable the trap function on RouterA.
[RouterA-nqa-admin-jitter] send-trap owd-ds owd-sd rtd
[RouterA-nqa-admin-jitter] quit
- Configure traps to be sent to the NMS.
[RouterA] snmp-agent sys-info version v2c
[RouterA] snmp-agent community write Huawei@123
[RouterA] snmp-agent target-host trap-paramsname trapnms v2c securityname Huawei@123
[RouterA] snmp-agent target-host trap-hostname nms address 10.20.1.2 trap-paramsname trapnms
[RouterA] snmp-agent trap enable
- Start the test instance.
[RouterA] nqa test-instance admin jitter
[RouterA-nqa-admin-jitter] start now
- Verify the configuration.
# Check NQA test results on RouterA.
<RouterA> display nqa result
NQA entry(test, jitter) :testflag is inactive ,testtype is jitter 1 . Test 1 result The test is finished SendProbe:60 ResponseProbe:60 Completion:success RTD OverThresholds number:0 OWD OverThresholds SD number:0 OWD OverThresholds DS number:0 Min/Max/Avg/Sum RTT:1/1/1/60 RTT Square Sum:60 NumOfRTT:60 Drop operation number:0 Operation sequence errors number:0 RTT Stats errors number:0 System busy operation number:0 Operation timeout number:0 Min Positive SD:0 Min Positive DS:1 Max Positive SD:0 Max Positive DS:1 Positive SD Number:0 Positive DS Number:5 Positive SD Sum:0 Positive DS Sum:5 Positive SD Square Sum:0 Positive DS Square Sum:5 Min Negative SD:0 Min Negative DS:1 Max Negative SD:0 Max Negative DS:1 Negative SD Number:0 Negative DS Number:6 Negative SD Sum:0 Negative DS Sum:6 Negative SD Square Sum:0 Negative DS Square Sum:6 Min Delay SD:0 Min Delay DS:0 Avg Delay SD:0 Avg Delay DS:0 Max Delay SD:0 Max Delay DS:0 Delay SD Square Sum:0 Delay DS Square Sum:0 Packet Loss SD:0 Packet Loss DS:0 Packet Loss Unknown:0 Average of Jitter:1 Average of Jitter SD:0 Average of Jitter DS:1 Jitter out value:0.0000000 Jitter in value:0.0114583 NumberOfOWD:60 Packet Loss Ratio: 0% OWD SD Sum:0 OWD DS Sum:0 ICPIF value: 0 MOS-CQ value: 0 TimeStamp unit: ms Packet Rewrite Number: 0 Packet Rewrite Ratio: 0% Packet Disorder Number: 0 Packet Disorder Ratio: 0% Fragment-disorder Number: 0 Fragment-disorder Ratio: 0% Jitter OverThresholds SD number:0 Jitter OverThresholds DS number:0 OverallOverThresholds number:0
# Check whether traps are generated in the trap buffer.
<RouterA> display trapbuffer
Trapping Buffer Configuration and contents:enabled Allowed max buffer size: 1024 Actual buffer size: 256 Channel number: 3, Channel name: trapbuffer Dropped messages: 0 Overwritten messages: 2550 Current messages: 256 #Jul 9 2012 07:53:29+00:00 RouterA NQA/4/RTDTHRESHOLD:OID 1.3.6.1.4.1.2011.5.25.111.6.16 NQA entry RTD over threshold. (OwnerIndex=admin, TestName=jitter) #Jul 9 2012 07:53:29+00:00 RouterA NQA/4/SDTHRESHOLD:OID 1.3.6.1.4.1.2011.5.25.111.6.17 NQA entry OWD-SD over threshold. (OwnerIndex=admin, TestName=jitter) #Jul 9 2012 07:53:29+00:00 RouterA NQA/4/DSTHRESHOLD:OID 1.3.6.1.4.1.2011.5.25.111.6.18 NQA entry OWD-DS over threshold. (OwnerIndex=admin, TestName=jitter)
Configuration Files
RouterA configuration file
# sysname RouterA # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet2/0/0 ip address 10.20.1.1 255.255.255.0 # snmp-agent local-engineid 800007DB0354899874DAC9 snmp-agent community write %@%@$X!5#d+t+OJOXL1[{O2!&Fe&0UZv'@a;R/`Y+kK$4BUGFe)&2YLuM/kMF!HPG5Mzz3DXe2&F%@%@ snmp-agent sys-info version v2c snmp-agent target-host trap-hostname nms address 10.20.1.2 udp-port 162 trap-paramsname trapnms snmp-agent target-host trap-paramsname trapnms v2c securityname %@%@Cgx728b4X6_83/;th11:)G&Q%@%@ snmp-agent trap enable snmp-agent # ip route-static 10.30.1.0 255.255.255.0 10.1.1.2 # nqa test-instance admin jitter test-type jitter destination-address ipv4 10.30.1.2 destination-port 9000 threshold rtd 20 send-trap rtd send-trap owd-sd send-trap owd-ds threshold owd-sd 100 threshold owd-ds 100 # return
RouterB configuration file
# sysname RouterB # interface GigabitEthernet1/0/0 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet2/0/0 ip address 10.30.1.1 255.255.255.0 # return
RouterC configuration file
# sysname RouterC # interface GigabitEthernet1/0/0 ip address 10.30.1.2 255.255.255.0 # nqa-server udpecho 10.30.1.2 9000 # ip route-static 10.1.1.0 255.255.255.0 10.30.1.1 # return