NSM Operation
This chapter covers some aspects related to the service nsm operation <txt>
tool,
which allows operations to be configured to measure network quality with active traffic
probes and feed system alarms.
To measure network quality, averages of different parameters are calculated, such as:
the Round-Trip-Time (RTT), the jitter and the loss of those packets exchanged
between the device and a remote location. These averages are calculated from the last
N probes sent, which can be configured through the window
field (by default 2).
Depending on the protocol through which to send the probes, the type
of NSM operation
must be configured using one of the following values:
icmp
: to use ICMP packets.udp
: to use SLA UDP packets.twamp
: to use TWAMP-test packets (rfc5357).
In order to easily identify each of the operations created, it is possible to add a short
description through the description
field.
The probe sending interval
for each NSM operation can also be configured.
By default, probes are sent every second.
For each probe sent, there is a timeout after which the probe is considered lost. This
time can be changed through the timeout
field (by default 1 second). This value is
also used as rtt for the average rtt/jitter calculation when a packet is lost.
Regarding the socket through which the probes are sent, it is possible to configure different parameters:
local-address
: to configure the local socket address.local-port
: to configure the local socket port.destination-address
: to configure the destination address (mandatory for all types of operations).destination-port
: to configure the destination port (mandatory for udp and twamp, not posible for icmp).local-vrf
orlocal-interface
: to configure the interface or vrf to which the socket has to be bound. So, probes are sent through said interface or vrf, and packets received from another interface or socket are discarded.mark
orvrf-mark
: to configure the mark for each probe sent through the socket. Useful for using mark-based routing or for packet filtering.tos
: to configure the Type-Of-Service (TOS) field of the IP packets sent with each probe (by default 0). Useful for prioritizing packets on the network.ttl
: to configure the Time-To-Live (TTL) field of the IP packets sent with each probe (by default 64).size
: to configure the size of packets sent with each probe. Depending on the type of operation used, a minimum size must be indicated:icmp
: greater than or equal to 12 bytes.udp
: greater than or equal to 16 bytes.twamp
: greater than or equal to 41 bytes.
An NSM operation can be configured to feed more than one alarm defined in the system.
To do this, the name of the alarm
and the threshold value of the measured network
parameter that will activate
this alarm must be indicated. Several thresholds can be
set for an alarm: rtt
, jitter
, loss
, rtt-jitter
(the sum of rtt and
jitter); so the alarm is activated if any of the configured thresholds is reached.
If the value of the measured network parameter does not reach 70% of the activation
threshold, an NSM operation also deactivates the alarms being fed. This default
deactivation threshold can be changed through the deactivate
field.
For both activate
and deactivate
, a waiting time can be configured before
executing the corresponding action through the stabilization-time
field (by default
0 seconds).
It is also possible to configure a specific window for each alarm through the window
field. By default it uses the general window of the NSM operation described above.
Configuration
This is the syntax to create a service nsm operation <txt>
:
set service nsm operation <op_name> [ ... ]
Examples
ICMP operation
Imagine you want to configure an ICMP-type NSM operation to measure network quality every 0.10 seconds and feed two different alarms.
For the first alarm, packet loss is checked and the following thresholds are set:
Activation: when the packet loss exceeds 5%.
Deactivation: when the packet loss drops to 0%.
For the second alarm, packet rtt delay is checked and the following thresholds are set:
Activation: when the rtt delay exceeds 150 milliseconds.
Deactivation: default value (70% of the activation threshold).
In OSDx, this can be achieved by setting the following commands:
set service nsm operation TEST_OPER alarm TEST_ALARM_1 activate loss 5
set service nsm operation TEST_OPER alarm TEST_ALARM_1 deactivate loss 0
set service nsm operation TEST_OPER alarm TEST_ALARM_2 activate rtt 0.150
set service nsm operation TEST_OPER destination-address 10.0.0.2
set service nsm operation TEST_OPER interval 0.10
set service nsm operation TEST_OPER type icmp
Here, you can find more examples related to
service nsm operation
.
Monitoring
Operational commands service nsm operation show
or
service nsm operation <value> show
can be used to display statistics related to NSM
operations.
Example:
admin@DUT0$ service nsm operation TEST_OPER show
-----------------------------------------------------------------------------------------------
Operation Alarm Status RTT(s) Jitter(s) Loss(%) Window Toggled Prev-toggled
-----------------------------------------------------------------------------------------------
TEST_OPER TEST_ALARM_2 false 0.000882 0.000323 0.0 2/2
TEST_OPER TEST_ALARM_1 false 0.000882 0.000323 0.0 2/2
Command Summary
Configuration commands
service nsm operation <txt> alarm <txt> activate jitter <float>
service nsm operation <txt> alarm <txt> activate loss <float>
service nsm operation <txt> alarm <txt> activate rtt <float>
service nsm operation <txt> alarm <txt> activate rtt-jitter <float>
service nsm operation <txt> alarm <txt> activate stabilization-time <float>
service nsm operation <txt> alarm <txt> deactivate jitter <float>
service nsm operation <txt> alarm <txt> deactivate loss <float>
service nsm operation <txt> alarm <txt> deactivate rtt <float>
service nsm operation <txt> alarm <txt> deactivate rtt-jitter <float>
service nsm operation <txt> alarm <txt> deactivate stabilization-time <float>
service nsm operation <txt> destination-address <fqdn|ipv4|ipv6>