OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : Two-way Active Measurement Protocol
Two-way Active Measurement Protocol
Two-way Active Measurement Protocol (TWAMP) is an open protocol for measuring network performance between any two devices.
In OcNOS, TWAMP measurement is configured under the interface mode using using the “delay-measurement dynamic twamp” command. When the command is configured, the measurement is started on the corresponding interface and using the configuration data in the delay-measurement command. The measurement is stopped by unconfiguring the “delay-measurement” command on the interface.
The TWAMP hardware profile filter should be enabled so that the timestamps used in the TWAMP protocol calculations are obtained accurately from the DNX hardware.
After the measurement is done, the result can be checked by the user using the OcNOS cli or netconf. The result is also advertised to IGP TE. There are 2 modes of advertisement, periodic and accelerated. Both periodic and accelerated advertisements can be enabled in parallel.
Periodic Advertisement
Periodic advertisement is enabled by default. In this case, the link delay metrics are calculated at a periodic “computation” interval. The calculated minimum delay for a link is compared with the minimum delay value advertised previously:
The delay metrics for the link are advertised only if the variation in values is beyond any of the configured periodic thresholds.
If the variation in values is within configured periodic thresholds, the delay metrics for the link are not advertised.
Accelerated Advertisement
Accelerated advertisement is disabled by default. In this case, the link delay metrics are calculated after receiving every burst of data. The calculated minimum delay for a link is compared with the minimum delay value advertised previously:
The delay metrics for the link are advertised only if the variation in values is beyond any of the configured accelerated thresholds.
If the variation in values is within configured accelerated thresholds, the delay metrics for the link are not advertised.
Limitation and Assumptions
To verify delay, loss and bandwidth measurement with IGP_TE, the pre-requisites are that the ISIS and OSPF sessions should be up and running. (Check OSPF and ISIS configuration in corresponding chapters).
The a-bit-threshold configures the Anomalous (A) bit. The A bit is set when the measured value of this parameter exceeds its configured maximum threshold. The A bit is cleared when the measured value falls below its configured reuse threshold.
The “test-session-name” command is no longer supported and should not be used. The “delay-measurement” command under interface mode should be used instead.
Topology
TWAMP topology
Configuring TWAMP Measurement on ROUTER
Configure the router R1 to send TWAMP measurement packets on interface xe1 towards the reflector on R2.
R1
 
#configure terminal
Enter to Config mode
(config)# hardware-profile filter twamp-ipv4 enable
Enable the hardware profile filter for TWAMP ipv4 so that HW timestamps can be retrieved in the DNX hardware for IPv4
(config)# hardware-profile filter twamp-ipv6 enable
Enable the hardware profile filter for TWAMP ipv6 so that HW timestamps can be retrieved in the DNX hardware for IPv6
 
(config)#twamp-light control
Enter to Twamp-Light control mode
(config-twamp-light-ctrl)#control-admin-state enable
Enable the Twamp-light sender framework
(config-twamp-light-ctrl)#exit
Exit the Twamp-light control mode
(config)#interface xe1
Enter interface mode.
(config-if)#ip address 23.1.1.1/24
Configure ipv4 address
(config-if)#ipv6 address 222::1/64
Configure ipv4 address
(config-if)# delay-measurement dynamic twamp reflector-ip 23.1.1.2 reflector-port 1235 sender-ip 23.1.1.1 sender-port 1234 dscp 56
Configure the TWAMP delay measurement
(config-if)#commit
Commit the candidate configuration to running configuration.
 
Configure the router R2 to receive and reflect TWAMP measurement packets on interface xe2.
R2
 
#configure terminal
Enter Configure mode
(config)# hardware-profile filter twamp-ipv4 enable
Enable the hardware profile filter for TWAMP ipv4 so that HW timestamps can be retrieved in the DNX hardware for IPv4
(config)# hardware-profile filter twamp-ipv6 enable
Enable the hardware profile filter for TWAMP ipv6 so that HW timestamps can be retrieved in the DNX hardware for IPv6
(config)#interface xe2
Enter interface mode.
(config-if)#ip address 23.1.1.2/24
Configure ipv4 address
(config-if)#ipv6 address 222::2/64
Configure ipv6 address
(config-if)#exit
Exit interface mode
(config)#twamp-light reflector
Enter to Twamp-Light reflector mode
(config-twamp-light-ref)#reflector-admin-state enable
Enable the Twamp-light reflector framework
(config-twamp-light-ref)#reflector-name r1 reflector-ip 23.1.1.2 reflector-port 1235 sender-ip 23.1.1.1 sender-port 1234
Create a reflector instance
(config-twamp-light-ref)#commit
Commit the candidate configuration to the running configuration
(config-twamp-light-ref)#exit
Exit Twamp-Light reflector mode
Configuring TWAMP Delay Profiles
The delay profile “interfaces” configures the way the TWAMP packets are sent (burst, interval…) and the way the data is advertised after the measurement data is collected
R1
 
#configure terminal
Enter Configure mode
(config)# delay-profile interfaces
Enter in to delay profile mode
(config-dp-int)#burst interval 3000
To config the burst interval for TWAMP packets in milliseconds( default value is 3000 milliseconds ).
(config-dp-int)#burst count 10
To set the number of packets to be sent at each burst interval (default=10)
(config-dp-int)#interval 30
To set the computation interval for TWAMP packets in seconds. (Default=30 sec)
(config-dp-int)#interval 120
To set the computation interval of TWAMP packets for advertisement periodic mode
(config-dp-int)# advertisement periodic threshold 10
Config threshold value inside advertisement periodic mode for TWAMP packets
(config-dp-int)# advertisement periodic minimum-change 1000
Config minimum change value inside advertisement periodic mode for TWAMP packets
(config-dp-int)# advertisement accelerated
Enable advertisement accelerated in delay profile mode
(config-dp-int)# advertisement accelerated threshold 20
Config advertisement accelerated minimum change value inside delay profile mode for TWAMP packets
(config-dp-int)# advertisement accelerated minimum-change 2000
Config advertisement accelerated minimum change value inside delay profile mode for TWAMP packets
(config--dp-int)#commit
Commit the candidate configuration to running configuration
Configuring Loss Measurement
Loss measurement is disabled by default and should be configured separately after the delay-measurement has been configured.
R1
 
#configure terminal
Enter configure mode
(config)#interface xe1
Enter interface mode
(config-if)#delay-measurement dynamic twamp reflector-ip 23.1.1.2 reflector-port 1235 sender-ip 23.1.1.1 sender port 1234 dscp 56
Configure delay measurement
config-if)#loss-measurement dynamic
Configure loss measurement after delay measurement is already configured
(config-if)#commit
Commit the candidate configuration to running configuration
(config-if)#exit
Exit interface mode
Un-Configuring/Stopping TWAMP Measurement
R1
 
#configure terminal
Enter configure mode
(config)# hardware-profile filter twamp-ipv4 disable
Disable hardware profile filter for TWAMP ipv4
(config)# hardware-profile filter twamp-ipv6 disable
Disable hardware profile filter for TWAMP ipv6
(config)#interface xe1
Enter interface mode
(config-if)# no delay-measurement dynamic twamp reflector-ip 23.1.1.2
Unconfigure delay measurement
(config-if)#no loss-measurement dynamic
Unconfigure loss measurement
(config-if)#commit
Commit the candidate configuration to running configuration
(config-if)#exit
Exit interface mode
Un-Configuring TWAMP Delay profile
R1
 
#configure terminal
Enter configure mode
(config)# delay-profile interfaces
Enter in to delay profile mode
(config-dp-int)#no burst interval
Un-Config burst interval value inside delay profile mode
(config-dp-int)#no burst count
Un-Config burst count value inside delay profile mode
(config-dp-int)#no interval
Un-Config interval value inside delay profile mode
(config-dp-int)#no sender-port
Un-Config sender port value inside delay profile mode
(config-dp-int)#no advertisement periodic
Disable advertisement periodic mode
config-dp-int)#no interval
Un-Config interval value inside for advertisement periodic mode
(config-dp-int)#no advertisement periodic threshold
Un-Config threshold value inside advertisement periodic mode
(config-dp-int)# no advertisement periodic minimum-change
Un-Config minimum change value inside advertisement periodic mode
(config-dp-int)#no advertisement accelerated
Un-Config accelerated inside advertisement mode
(config-dp-int)#no advertisement accelerated minimum-change
Un-Config advertisement accelerated minimum change value inside delay profile mode
(config-dp-int)# no advertisement accelerated threshold
Un-Config advertisement accelerated threshold value inside delay profile mode
(config-dp-if)#commit
Commit the candidate configuration to running configuration
Clearing TWAMP Statistics
R1
Router1# clear twamp measurement interface xe1
This command will restart the measurement on the specified interface, resetting the collected stats.
Router1# clear twamp measurement interface all
This command will restart the measurement on all the interfaces, resetting all the collected stats.
If there are any non-applied configuration changes to the delay profile, they will be applied when this command is issued.
Validation
Configuration Validation on the Sender Side
#show running-config twamp
twamp-light control
control-admin-state enable
#show running-config interface xe1 | inc delay-measurement
delay-measurement
dynamic twamp
reflector-ip 23.1.1.2
reflector-port 1235
sender-ip 23.1.1.1
sender-port 1234
dscp 56
Configuration validation on reflector side
#show running config twamp
twamp-light reflector
reflector-admin-state enable
reflector-name r1
reflector-ip 23.1.1.2
reflector-port 1234
Validation of TWAMP statistics
#show twamp-statistics interfaces xe1
Interface name : xe1
Sender IP : 23.1.1.1
Reflector IP : 23.1.1.2
Reflector port : 1234
DSCP value : 56
Last Advertised stats:
Time: 2019-02-14 10:19:38
Average delay : 2
Minimum delay : 2
Maximum delay : 2
Average delay variation: 0
Minimum delay variation: 0
Maximum delay variation: 0
Packets sent : 100
Packets received : 100
Packets timeout : 0
Packet Loss: 0
Last Calculated stats:
Time: 2019-02-14 10:23:39
Average delay : 2
Minimum delay : 2
Maximum delay : 2
Average delay variation: 0
Minimum delay variation: 0
Maximum delay variation: 0
Packets sent : 100
Packets received : 100
Packets timeout : 0
Packet Loss : 0
End-to-End Measurement
When a reflector is multiple hops away from the sender and there are multiple paths available to the reflector, End-to-End measurement ensures that the TWAMP packets should go out of only the interface with the configured Sender IP/Reflector IP on sender and reflector side respectively.
Topology
TWAMP topology
Configuration
ROUTER1 - Sender
 
#configure terminal
Enter configure mode.
(config)# hardware-profile filter twamp-ipv4 enable
Enable the hardware profile filter for TWAMP ipv4 so that HW timestamps can be retrieved in the DNX hardware for IPv4
(config)#twamp-light control
Enter the Twamp-Light control mode
(config-twamp-light-ctrl)#control-admin-state enable
Enable the Twamp-light sender framework
(config-twamp-light-ctrl)#exit
Exit the Twamp-light Control mode
(config)#interface xe1
Enter xe1 interface mode
(config-if)#ip address 10.10.10.1/24
Configure ipv4 address
(config-if)#exit
Exit interface mode
(config)#interface xe2
Enter xe2 interface mode
(config-if)#ip address 20.20.20.1/24
Configure ipv4 address
(config-if)# delay-measurement dynamic twamp sender-ip 20.20.20.1 reflector-ip 30.30.30.2 reflector-port 1234
Configuring delay measurement. Since it is applied on interface xe2, it will force the packets to go out from xe2 even if others paths are available
(config-if)#commit
Commit the candidate configuration to running configuration.
(config-if)#exit
Exit interface mode
(config)#ip route 30.30.30.0/24 20.20.20.2
Set static route to reflector.
(config)#commit
Commit the candidate configuration to running configuration
ROUTER2 - Reflector
 
#configure terminal
Enter Configure mode
(config)# hardware-profile filter twamp-ipv4 enable
Enable the hardware profile filter for TWAMP ipv4 so that HW timestamps can be retrieved in the DNX hardware for IPv4
(config)#interface xe1
Enter xe1 interface mode
(config-if)#ip address 30.30.30.2/24
Configure ipv4 address
(config)#interface xe2
Enter xe2 interface mode
(config-if)#ip address 10.10.10.2/24
Configure ipv4 address
(config-if)#exit
Exit interface mode.
(config)#twamp-light reflector
Enter the Twamp-Light reflector mode
(config-twamp-light-ref)#reflector-admin-state enable
Enabling the Twamp-light reflector framework
(config-twamp-light-ref)#reflector-name r1 reflector-ip 30.30.30.2 reflector-port 1234 sender-ip 20.20.20.1
Configuring the reflector instance with reflector ip and port number. Specifying explicitly the sender-ip in the reflector command will force the reflector to reply from the interface where the reflector-ip is configured.
(config-twamp-light-ref)#commit
Commit the candidate configuration to the running configuration
(config-if)#exit
Exit interface mode
(config)#ip route 20.20.20.0/24 30.30.30.1
Set static route to sender
(config)#commit
Commit the candidate configuration to running configuration
 
ROUTER3 - Intermediate
 
#configure terminal
Enter Configure mode
(config)#interface xe1
Enter xe1 interface mode
(config-if)#ip address 20.20.20.2/24
Configure ipv4 address
(config)#interface xe2
Enter xe2 interface mode
(config-if)#ip address 30.30.30.1/24
Configure ipv4 address
(config-if)#commit
Commit
Validation
Validation On Sender Side
R1#show running-config twamp
twamp-light control
control-admin-state enable
 
#show twamp-statistics interfaces xe2
Interface name : xe2
Sender IP : 20.20.20.1
Reflector IP : 30.30.30.2
Reflector port : 1234
DSCP value : 0
HW Status : -
Last Advertised stats:
Time: 2019-03-07 10:45:54
Average delay : 628
Minimum delay : 558
Maximum delay : 697
Average delay variation: 17
Minimum delay variation: 8
Maximum delay variation: 23
Packets sent : 50
Packets received : 50
Packets timeout : 0
Packet Loss: Not Enabled
Last Calculated stats:
Time: 2019-03-07 10:48:34
Average delay : 646
Minimum delay : 494
Maximum delay : 701
Average delay variation: 8
Minimum delay variation: 2
Maximum delay variation: 21
Packets sent : 50
Packets received : 50
Packets timeout : 0
Packet Loss : Not Enabled
 
#show twamp-statistics
=========================================
TWAMP Test-Session Statistics
=========================================
Test-Session Name : __internal_interface_10024
Start Time : 2019 Mar 07 10:43:13
Elapsed time(milli sec) : 348057
Packets Sent : 435
Packets Received : 435
Packet Loss(%) : 0.0000
Round Trip Delay(usec)
Minimum : 607
Maximum : 3373
Average : 1216
Forward Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Round Trip Delay Variation(usec)
Minimum : 144
Maximum : 852
Average : 243
Forward Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
 
(*) - Time is not in sync between Sender and Reflector
 
# show twamp-statistics interfaces
Interface Last Advertisement Delay(us) Min(us) Max(us) Var(us) Loss(%)
xe2 2019-03-07 10:45:54 628 558 697 17 Not Enabled
Validation On Reflector side
#show running-config twamp
twamp-light reflector
reflector-admin-state enable
reflector-name r1 reflector-ip ipv4 30.30.30.2 reflector-port 1234 sender-ip ipv4 20.20.20.1