OcNOS-SP : Layer 3 Guide : Two-Way Active Measurement Protocol Command Reference : TWAMP Commands
TWAMP Commands
This chapter describes the commands used to manage the Two-Way Active Measurement Protocol (TWAMP).
Note: The implementation of TWAMP measurement relies on software timestamps collected at the application layer. The measured packet path in this case is longer than the actual link path and thus the timestamps used in the delay measurement are less accurate.
control-admin-state
Use this command to enable or disable the TWAMP sender framework. The sender framework needs to be enabled before configuring any TWAMP sessions.
Command Syntax
control-admin-state (enable | disable)
Parameters
enable
 
Enable the TWAMP sender framework.
disable
Disable the TWAMP sender framework.
Default
Disable
Command Mode
TWAMP light control mode (config-twamp-light-ctrl)
Applicability
This command was introduced before OcNOS version 3.0.
Example
(config)#twamp-light control
(config-twamp-light-ctrl)#control-admin-state enable
 
 
 
 
reflector-admin-state
Use this command to enable or disable the TWAMP reflector framework. The reflector framework needs to be enabled before configuring any reflector session.
Command Syntax
reflector-admin-state (enable | disable)
Parameters
enable
Enable the TWAMP reflector framework.
disable
Disable the TWAMP reflector framework.
Default
Disabled
Command Mode
TWAMP light reflector mode (config-twamp-light-ctrl)
Applicability
This command was introduced before OcNOS version 3.0.
Example
(config)#twamp-light reflector
(config-twamp-light-ctrl)#reflector-admin-state enable
 
 
reflector-name
Use this command to configure a TWAMP light reflector session.
Command Syntax
reflector-name WORD reflector-ip (ipv4 A.B.C.D|ipv6 X:X::X:X|HOSTNAME) (reflector-port (862|<1025-65535>)|) (vrf NAME|) (sender-ip (ipv4 A.B.C.D|ipv6 X:X::X:X|HOSTNAME)|) (sender-port (862|<1025-65535>)|)
Parameters
WORD
Set TWAMP Light reflector session name
 
X:X::X:X
TWAMP Reflector IP address in IPv6 format.
A.B.C.D
TWAMP Reflector IP address in IPv4 format.
HOSTNAME
The hostname of the TWAMP reflector
vrf NAME
Set TWAMP Light reflector session VRF name
reflector-port
Set the TWAMP Reflector UDP port number where the reflector will be listening
sender-ip
Set the sender IP from which the reflector will accept the TWAMP packets. If the source of the TWAMP packet does not match this address, the packet will be ignored. In case not set, the reflector will not discriminate on the sender IP value.
sender-port
Set the sender UDP port from which the reflector will accept the TWAMP packets. In case not set, the reflector will not discriminate on the sender UDP port value.
Default
862 for reflector-port
0 for the sender-port (interpreted as no filtering on sender port)
Command Mode
TWAMP light reflector mode (config-twamp-light-ctrl)
Applicability
This command was introduced before OcNOS version 5.1.
The sender-IP and sender-port parameters were added in OcNOS version 6.0.0
Example
(config)#twamp-light reflector
(config-twamp-light-ref)# reflector-name R11 reflector-ip 23.1.1.1 vrf vrf1
(config-twamp-light-ref)# reflector-name R12 reflector-ip 24.1.1.1 vrf vrf2
(config-twamp-light-ref)# reflector-name R12 reflector-ip 24.1.1.1 sender-ip 24.1.1.2 vrf vrf2
(config-twamp-light-ref)# reflector-name R12 reflector-ip 24.1.1.1 sender-ip 24.1.1.2 sender-port 1555 vrf vrf2
 
 
 
show debugging twamp
Use this command to display the status of debug information of the TWAMP.
Command Syntax
show debugging twamp
Parameters
None
Default
Debug status is off.
Config Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS version 6.1.0.
Examples
OcNOS#show debugging twamp
TWAMP debugging status: OFF
 
 
show running-config twamp
Use this command to display TWAMP running configuration alone.
Command Syntax
show running-config twamp
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
Reflector:
#show running-config twamp
twamp-light reflector
reflector-admin-state enable
reflector-ip 10.0.0.1 reflector-port 1234
Control or Sender:
#show running-config twamp
twamp-light control
control-admin-state enable
test-session-name s1 sender-ip 10.0.0.1 sender-port 1234 reflector-ip 10.0.0.1 reflector-port 1234
 
show twamp server sessions information
Show the existing sessions information
Command Syntax
show twamp server session (WORD|)
Parameters
WORD
The session ID
Default
None
Command mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS# show twamp server session
Connection ID Session Id Sender Receiver State
1 5B.5B.5B.03:E00FD9FF99B7F173:D8CE5E5D 91.91.91.2 91.91.91.3 Started
2 5B.5B.5B.03:E00FCF8221DF548E:EF824500 9.1.9.1 91.91.91.3 Started
 
OcNOS# show twamp server session 5B.5B.5B.03:E00FCF8221DF548E:EF824500
State : Started
Connection ID : 2
Session ID : 5B.5B.5B.03:E00FCF8221DF548E:EF824500
Sender address : 9.1.9.1
Sender port : 44566
Receiver address: 91.91.91.3
Receiver port : 44001
Receiver VRF : default
Start time : 2022-08-31 16:44:00
Timeout : 5 sec
OcNOS#
 
show twamp statistics
Use this command to display TWAMP test session.
Command Syntax
show twamp-statistics (WORD|)
Parameters
WORD
TWAMP test session name.
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
#show twamp statistics
=========================================
TWAMP Test-Session Statistics
=========================================
Test-Session Name : s1
Start Time : 2019 Aug 05 08:40:12
Elapsed time(milli sec) : 4004
Packets Sent : 4
Packets Received : 4
Packet Loss(%) : 0.0000
Round Trip Delay(usec)
Minimum : 585
Maximum : 2306
Average : 1038
Forward Delay(usec)
Minimum : 254
Maximum : 318
Average : 280
Reverse Delay(usec)
Minimum : 331
Maximum : 1988
Average : 758
Round Trip Delay Variation(usec)
Minimum : 2306
Maximum : 2640
Average : 2444
Forward Delay Variation(usec)
Minimum : 318
Maximum : 375
Average : 345
Reverse Delay Variation(usec)
Minimum : 1988
Maximum : 2265
Average : 2099
 
Table 1-81: show twamp statistics fields
Field
Description
Test-Session Name
TWAMP test session name
Start Time
TWAMP test start time
Elapsed time(milli sec)
Time taken to complete the test in milliseconds
Packets Sent
Number of packet sent
Packets Received
Number of packet received
Packet Loss(%)
Packet lost in percentage
Round Trip Delay(usec)
Round trip delay between TWAMP sender and reflector. Displayed Minimum, Maximum and Average round trip delay in micro-seconds
Forward Delay(usec)
Forward delay between TWAMP sender and reflector. Displayed Minimum, Maximum and Average forward delay in micro-seconds In case the clocks on the sender and reflector are not in sync, a (*) will be displayed here.
Reverse Delay(usec)
Reverse delay between TWAMP reflector and sender. Displayed Minimum, Maximum and Average reverse delay in micro-seconds In case the clocks on the sender and reflector are not in sync, a (*) will be displayed here.
Round Trip Delay Variation(usec)
Round trip delay variation between TWAMP sender and reflector. Displayed Minimum, Maximum and Average round trip delay variation in micro-seconds
Forward Delay Variation(usec)
Forward delay variation between TWAMP sender and reflector. Displayed Minimum, Maximum and Average forward delay variation in micro-seconds In case the clocks on the sender and reflector are not in sync, a (*) will be displayed here.
Reverse Delay Variation(usec)
Reverse delay variation between TWAMP reflector and sender. Displayed Minimum, Maximum and Average reverse delay variation in micro-seconds In case the clocks on the sender and reflector are not in sync, a (*) will be displayed here.
 
 
show twamp server status
Show the general status of the TWAMP server
Command Syntax
show twamp server status
Parameters
None
Default
None
Command mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.2.0.
Examples
OcNOS#show twamp server status
Status                    : Enabled
Listening Port            : 862
Server VRF list           : management default vrf1
Number of connections     : 3
Number of sessions        : 15
Number of running sessions: 5
OcNOS#
test-session-name (Deprecated)
This command is not supported anymore. The “delay-measurement dynamic twamp” command under interface mode should be used to start twamp measurement instead.
Use this command to configure the TWAMP test sessions.
Use the no form of this command to un-configure or remove the configured TWAMP test sessions.
Notes:
The dscp-to-queue mapping is performed for egress only when the sender port has the default value 862. Otherwise, Queue-6 will always be used.
The dscp-to-queue mapping is done based on the first 3 bits of the dscp value.
If dscp is not supplied (value 0), Queue-6 will always be used.
Command Syntax
test-session-name WORD sender-ip (A.B.C.D|X:X::X:X|HOSTNAME) (sender-port (862|<1025-65535>)|) reflector-ip (A.B.C.D|X:X::X:X|HOSTNAME) (reflector-port (862|<1025-65535>)|)(dscp(default|cs1|af11|af12|af13|cs2|af21|af22|af23|cs3|af31|af32|af33|cs4|af41|af42|af43|cs5|ef|cs6|cs7|<0-63>)|)
no test-session-name WORD
Parameters
WORD
TWAMP test session name.
X:X::X:X
TWAMP Sender or Reflector IP address in IPv6 format.
A.B.C.D
TWAMP Sender or Reflector IP address in IPv4 format.
<1025-65535>
TWAMP Sender or Reflector UDP port number.
dscp
The DSCP value to used by the sender for TWAMP messages. This can be an explicit value 0-63, or it can be a well-known name:
(af11| af12| af13| af21| af22| af23| af31| af32| af33| af41| af42| af43| cs1| cs2| cs3| cs4| cs5| cs6| cs7| default| ef)
Default
The sender-port and reflector-port default values are 862.
The dscp default value is 0.
Command Mode
TWAMP light control mode (config-twamp-light-ctrl)
Applicability
This command was introduced before OcNOS version 3.0. The dscp parameter was added in OcNOS version 5.0.
Examples
To configure:
(config)#twamp-light control
(config-twamp-light-ctrl)# test-session-name s1 sender-ip 10.0.0.1 sender-port 1234 reflector-ip 10.0.0.1 reflector-port 1234 dscp af23
To un-configure:
(config)#twamp-light control
(config-twamp-light-ctrl)# no test-session-name s1
 
twamp-light control
Use this command to initialize the TWAMP light Control or Sender Session.
Use the no form of this command to un-initialize and to remove the configured TWAMP light control configurations.
Command Syntax
twamp-light control
no twamp-light control
Parameters
NA
Command Mode
Configuration mode
Applicability
This command was introduced before OcNOS version 3.0.
Example
#configure terminal
(config)#twamp-light control
 
 
twamp-light reflector
Use this command to initialize the TWAMP reflector.
Use the no form of this command to un-initialize and to remove the configured TWAMP light refelctor configurations.
Command Syntax
twamp-light reflector
no twamp-light reflector
Parameters
NA
Command Mode
Configuration mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
#configure terminal
(config)#twamp-light reflector
 
twamp server
Use this command to change to the twamp server mode.
Command Syntax
twamp server
Parameters
None
Default
-
Command mode
Config mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#
twamp server port
Use this command to set the twamp server mode TCP listen port.
Use the no form of this command to reset the port value to the default value 862.
Command Syntax
port (862|<1025-65535>)
Parameters
<1025-65535>
Set the TCP port value where the twamp server will be listening. It could be either the default value 862, or in the range 1025-65535.
Default
Default value is 862
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0.
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#port 2555
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no port
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server max-connection-duration
Use this command to set the maximum connection duration that a client can establish with the server in hours. The default value of this flag is 0, which means that there is no limit for the connection duration.
Use the no form of this command to set the value to the default value 0.
Command Syntax
max-connection-duration <0-120>
Parameters
<0-120>
Set the maximum connection duration value between 0 and 120 hours.
Default
Default value is 0
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#max-connection-duration 5
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no max-connection-duration
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server max-connections
Use this command to set the maximum number of connections that the server can simultaneously handle. The default value of this flag is 16.
Use the no form of this command to set the value to the default value 16.
Command Syntax
max-connections <1-32>
Parameters
<1-32>
 
Set the maximum number of connections value between 1 and 32.
Default
Default value is 16
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#max-connections 12
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no max-connections
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server max-connections-per-client
Use this command to set the maximum number of connections that the server can simultaneously handle from the same client (same IP). The default value of this flag is 1.
Use the no form of this command to set the value to the default value 1.
Command Syntax
maximum-connections-per-client <1-4>
Parameters
<1-4>
Set the maximum number of connections per client value between 1 and 4.
Default
Default value is 1
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#max-connections-per-client 3
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no max-connections-per-client
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server maximum-sessions
Use this command to set the maximum number of sessions that the server can simultaneously handle. The default value of this flag is 64.
Use the no form of this command to set the value to the default value 64.
Command Syntax
maximum-sessions <1-64>
Parameters
<1-64>
Set the maximum number of sessions between 1 and 64.
Default
Default value is 64
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#maximum-sessions 44
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no max
OcNOS(config-twamp-server)#no maximum-sessions
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server maximum-sessions-per-connection
Use this command to set the maximum number of sessions that the server can simultaneously accept on the same connection. The default value of this flag is 1.
Use the no form of this command to set the value to the default value 1.
Command Syntax
maximum-sessions-per-connection <1-64>
Parameters
<1-64>
Set the maximum number of sessions per connection between 1 and 64.
Default
Default value is 1
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#maximum-sessions-per-connection 26
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no maximum-sessions-per-connection
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server inactivity-timeout
Use this command to set the inactivity timeout in minutes. In case the server does not receive any control packet from the client during this timeout, the connection to the client is dropped and any session started by this client will be stopped.
The default value of this flag is 0. In this case the server does not check for inactivity from the client.
Use the no form of this command to set the value to the default value 0.
Command Syntax
inactivity-timeout <0-30>
Parameters
<0-30>
Set the inactivity timeout to a value between 0 and 30 in minutes.
Default
Default value is 0
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#inactivity-timeout 22
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#no inactivity-timeout
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server listen-vrf
Use this command to add custom VRFs to the list of VRFs where the TWAMP server is running. If no listen-vrf is specified, the TWAMP server is started in the default VRF only.
Multiple VRFs can be specified. The user can issue the same command multiple times, once for each VRF.
Only clients in the configured VRFs are allowed to connect to the server and only sessions to IPs in the configured VRFs are allowed to be established.
Use the no form of this command to delete a listen-vrf.
Command Syntax
listen-vrf <NAME>
no listen-vrf <NAME>
Parameters
NAME
 
VRF name to add to the server.
Default
Default value is “default”
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0.
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#listen-vrf default
OcNOS(config-twamp-server)#listen-vrf management
OcNOS(config-twamp-server)#listen-vrf vrf1
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
OcNOS(config-twamp-server)#no listen-vrf management
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
twamp server admin state
Use this command to Start/Stop the TWAMP server with the above configured parameters.
In case any of the twamp server parameters are modified after the server is started, the modification will be applied after the server is stopped and started again.
Command Syntax
server-admin-state (enable|disable)
Parameters
enable
 
Start the TWAMP server
disable
 
Stop the TWAMP server
Default
Default value is disable
Command mode
twamp-server mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-server)#server-admin-state enable
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#server-admin-state disable
OcNOS(config-twamp-server)#commit
OcNOS(config-twamp-server)#
 
twamp start-test-session (Deprecated)
This command is not supported anymore. The “delay-measurement dynamic twamp” command under interface mode should be used to start twamp measurement instead.
Use this command to start the TWAMP test session.
Command Syntax
twamp start test-session WORD packet-count <1-65535> (interval <500-10000>|) (delay-threshold <0-1000000|)
 
Parameters
WORD
TWAMP test session name.
<1-65535>
Number packed to send for test.
<500-10000>
Interval to send each packet in milliseconds.
<0-1000000>
Delay threshold, in microseconds (default = 0). A notification is sent when the average delay crosses this value during the measurement. However, no checking is carried on the delay value when it is set to 0, hence, no notification is sent.
Default
1000 for interval
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
#twamp start test-session s1 packet-count 10 interval 500 delay-threshold 100
 
 
 
twamp stop-test-session (Deprecated)
This command is not supported anymore. The “delay-measurement dynamic twamp” command under interface mode should be used to start/stop twamp measurement instead.
Use this command to stop the TWAMP test session.
Command Syntax
twamp stop test-session WORD
Parameters
WORD
TWAMP test session name.
Default
NA
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Examples
#twamp stop test-session s1
 
 
 
Show twamp server connections information
Show the existing connections information
Command Syntax
show twamp server connection (WORD|)
Parameters
WORD
The connection ID
Default
None
Command mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.2.0
Examples
OcNOS# show twamp server connection
Connection ID Client Address   Client Port
    1 100.1.0.1         59807
   2 100.1.0.2         59808
    3 100.1.0.3         59809
   4 100.1.0.4         59810
OcNOS# show twamp server connection 2
Connection ID              : 2
Client Address             : 100.1.0.2
Client Port                : 59808
Client VRF                : default
State                      : Control session established
Connection Time : Thu Feb 14 12:13:51 2019
Last Activity Time : Thu Feb 14 12:13:51 2019
Number of session requests : 7
Number of accepted sessions: 3
OcNOS#