TWAMP for Client and Server with SNMP
Overview
The Two-Way Active Measurement Protocol (TWAMP) provides a standardized method for actively measuring IP network performance. It designed to evaluate metrics such as latency, jitter, and packet loss in a controlled, repeatable manner. By leveraging a client-server model, TWAMP delivers bidirectional insights that help validate service levels and troubleshoot issues proactively.
TWAMP sessions are initiated by a client, which sends control and test packets to a server (also called a reflector). The server, in turn, responds to these probes, allowing the client to calculate round-trip performance statistics.
TWAMP Client
.The TWAMP client acts as the test originator. It’s responsible for setting up control connections, launching measurement sessions, and collecting performance data. Each session defines sender and receiver addresses, ports, and various probe parameters, such as packet count and interval timing.
Client Feature Characteristics
Feature characteristics of the client include:
• Initiating multiple test sessions across different server addresses.
• Supporting both IPv4 and IPv6 traffic.
• Defining control parameters such as sender/receiver ports and DSCP markings.
• Starting and stopping sessions based on test scenarios.
TWAMP Server
The TWAMP server in OcNOS operates as a reflector. It listens for incoming control connections from external TWAMP clients and responds to test packets once a session is active. The server tracks connection and session details throughout the lifecycle of each test.
You can configure the server to enforce limits on active connections, sessions per connection, and per-client usage. It also supports session inactivity timeouts. By using the listen-vrf option, you can enable the server to operate across multiple VRFs, allowing performance measurements in segmented routing environments.
OcNOS version 6.6.1adds SNMP integration, allowing external systems to monitor TWAMP server activity in real time.
Server Feature Characteristics
Feature characteristics of the server include:
• Accepts TWAMP control connections and test sessions without initiating communication.
• Supports multiple VRFs using listen-vrf, allowing measurement across isolated routing domains.
• Configurable Resource Limits:
• Maximum number of concurrent connections
• Maximum sessions per connection
• Per-client session and connection limits
• Session inactivity timeouts
• Allows configuration of the listening port (default 862, configurable within the TCP dynamic port range).
SNMP for TWAMP
OcNOS version 6.6.1T introduces the SNMP feature provides real-time visibility into TWAMP activity through trap notifications and MIB access. You can monitor events such as session starts, client timeouts, and threshold violations using standard SNMP tools.
SNMP Feature Characteristics
Feature characteristics of the SNMP include:
• snmpget and snmpwalk queries for TWAMP server data.
• SNMPv2-style traps for key operational events.
• NETCONF-based notifications for dynamic state changes.
Examples of trap-triggering events:
• A client establishing or disconnecting from a session.
• A session reaching its configured timeout.
• The server hitting its maximum connection or session limits.
All SNMP events follow a structured OID scheme under the IP Infusion enterprise MIB tree (.1.3.6.1.4.1.36673), ensuring compatibility with centralized network monitoring systems.
Benefits
The TWAMP Client Implementation has following benefits to network management and optimization:
• TWAMP clients adhere to standardized protocols, ensuring compatibility and interoperability with various TWAMP servers.
• SNMP traps provide immediate visibility into session events and performance issues.
• Automatic trap generation for connection limits, timeouts, and session states.
• Provides flexible deployment across virtual routing domains.
Prerequisites
Ensure that the TWAMP client has a stable and reliable network connection to the TWAMP server.
Topology
The network topology includes the interactions between TWAMP Server and TWAMP Client entities, highlighting the flow of control messages and test packets. The TWAMP Client initiates active measurement sessions by sending control messages to the TWAMP Server over the TWAMP Control Connection. The TWAMP Server, in response, configures the session and directs test packets to the TWAMP Session-Reflector, which ensures proper routing and measurement. The results of these measurements are then relayed back to the TWAMP Client for analysis.
The following diagram example shows 2 nodes connected by a physical link through interfaces xe14 on each end. We will configure the first node as a TWAMP client. The second node must have a TWAMP server running.
TWAMP Server-Client
In the below example configurations, configure the Client for IPv4 and then for IPv6.
Client Configurations
Implementation Examples for IPv4
Scenario: Configure a TWAMP client with VRF settings, specifying the VRF vrf1 and setting up an IPv4 connection with advanced session parameters.
IPv4 Client Configuration
Perform the following configuration TWAMP client on the Router.
1. Enable the Hardware profile for TWAMP IPv4.
Client(config)# hardware-profile filter twamp-ipv4 enable
2. Configure VRF to define a separate virtual routing instance within the network device
Note: This step is optional, pre-existing VRFs can be used.
Client(config)# ip vrf vrf1
Client(config-vrf)# rd 10:100
3. Configure the interface with VRF and IP address.
Client(config-if)# int xe14
Client(config-if)# ip vrf forwarding vrf1
Client(config-if)#ip address 24.1.1.1/24
4. Configure the delay-profile clients to specify parameters and customize the behavior of TWAMP client measurement. In case not configured, default values will be used.
Client(config)# delay-profile clients
Client(twamp-delay-profile)# burst-interval 1000
Client(twamp-delay-profile)#burst-count 2
5. Enable the Twamp control to configure TWAMP control settings in a network device.
Client(config)# twamp-light control
Client(config-twamp-light-ctrl)# control-admin-state enable
6. Configure TWAMP Client to define the client's settings, connections, and measurement sessions.
Client(config)# twamp client
Client(config_twamp_client)# maximum-connections 64
Client(config_twamp_client)#maximum-sessions 64
client(config_twamp_client)#maximum-sessions-per-connection 64
client(config_twamp_client)#connection test_ipv4 vrf-name vrf1
client(config_twamp_connection)#server ipv4 24.1.1.2 port 862
client(config-twamp-connection)#session session_IPV4 sender-port 5666
receiver-port 5666 sender-address ipv4 24.1.1.1 receiver-address ipv4
24.1.1.2
client(config-twamp-connection)#exit
client#twamp client start connection test_ipv6 vrf vrf1 packet-count 50
client#twamp cclient stop connection test_ipv4 vrf vrf1
client#twamp client reset connection test_ipv4 vrf vrf1
Implementation Example for IPv6
Scenario: Configure a TWAMP client with VRF settings, specifying the VRF vrf1 and setting up an IPv6 connection with advanced session parameters.
Ipv6 Client Configuration
Perform the following configuration TWAMP client on the Router.
1. Enable the Hardware profiles for TWAMP IPv6
Client(config)# hardware-profile filter twamp-ipv6 enable
Client(config-twamp-server)# hardware-profile filter twamp-ipv6-mpls enable
2. Configure VRF to define a separate virtual routing instance within the network device Note: This step is optional, pre-existing or default VRFs can be used.
Client(config)# ip vrf vrf1
Client(config-vrf)# rd 10:100
3. Configure the interface with VRF and IPv6 address.
Client(config-if)# int xe14
Client(config-if)# ip vrf forwarding vrf1
Client(config-if)#ipv6 address 2001:67c:2468::122:e:5/96
4. Configure the delay-profile clients to specify parameters and customize the behavior of TWAMP client measurement. In case not configured, default values will be used.
Client(config)# delay-profile clients
Client(twamp-delay-profile)#burst-interval 1000
Client(twamp-delay-profile)#burst-count 2
5. Enable the TWAMP control to configure TWAMP control settings in a network device.
Client(config)# twamp-light control
Client(config-twamp-light-ctrl)# control- admin-state enable
6. Configure TWAMP Client to define the client's settings, connections, and measurement sessions.
client(config)# twamp client
client(config_twamp_client)# maximum- connections 64
client(config_twamp_client)#maximum-sessions 64
client(config_twamp_client)#maximum-sessions- per-connection 64
client(config_twamp_client)#connection test_ipv6 vrf-name vrf1
client(config_twamp_connection)#server ipv6 2001:67c:2468::122:e:4 port 862
client(config-twamp-connection)#session session_IPV6 sender-port 5666
receiver-port 5666 sender-address ipv6 2001:67c:2468::122:e:5 receiver-
address ipv6 2001:67c:2468::122:e:4
client(config-twamp-connection)#exit
client#twamp client start connection test_ipv6 vrf vrf1 packet-count 50
client#twamp client stop connection test_ipv6 vrf vrf1
client#twamp client reset connection test_ipv6 vrf vrf1
New CLI Commands
Here is the compilation of new commands for configuring TWAMP client.
• twamp client, maximum-sessions, maximum-connections, maximum-sessions-per-connection, connection, server, session, twamp client start connection, twamp client stop connection and twamp client reset connection.
twamp client
Use this command to enable and configure the TWAMP client.
Command Syntax
twamp client
Parameters
None
Default
N/A
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#
OcNOS(config)#twamp client
OcNOS(config-twamp-client)#
twamp client maximum-connections
Use this command to set the maximum number of connections that the client can create. 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
max-connections <1-64>
Parameters
<1-64>
Set the maximum number of connections value between 1 and 64.
Default
64
Command mode
twamp-client mode
Applicability
This command was introduced in OcNOS version 6.4.1
Examples
OcNOS(config)#twamp client
OcNOS(config-twamp-client)# maximum-connections 10
OcNOS(config-twamp-client)#commit
OcNOS(config-twamp-client)#no max-connections
OcNOS(config-twamp-client)#commit
twamp client maximum-sessions
Use this command to set the maximum number of test sessions that the client can simultaneously handle.
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
64
Command mode
twamp-client mode
Applicability
This command was introduced in OcNOS version 6.4.1
Examples
OcNOS(config)#twamp client
OcNOS(config-twamp-client )#maximum-sessions 44
OcNOS(config-twamp-client)#commit
OcNOS(config-twamp-client )#no maximum-sessions
OcNOS(config-twamp-client )#commit
OcNOS(config-twamp-client )#
twamp client maximum-sessions-per-connection
Use this command to set the maximum number of test sessions that the client can simultaneously create 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
1
Command mode
twamp-client mode
Applicability
This command was introduced in OcNOS version 6.4.1
Examples
OcNOS(config)#twamp server
OcNOS(config-twamp-client )#maximum-sessions-per-connection 26
OcNOS(config-twamp-client )#commit
OcNOS(config-twamp-client )#no maximum-sessions-per-connection
OcNOS(config-twamp-client)#commit
OcNOS(config-twamp-client)#
twamp connection
Use this command to create a connection between the server and the client.
Multiple connections 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 remove the connection.
Command Syntax
connection NAME <vrf-name NAME>
no connection NAME <vrf-name NAME>
Parameters
NAME
connection name to add to the client.
Default
N/A
Command mode
twamp-client mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#twamp client
OcNOS(config-twamp-client)#connection Connection1 vrf VRF1
OcNOS(config-twamp-client)#commit
OcNOS(config-twamp-client)#
OcNOS(config-twamp-client)#no connection Connection1 vrf VRF1
OcNOS(config-twamp-client)#commit
twamp client server
Use this command to configure the server ip address(ipv4/ipv6), hostname, and port number.
Command Syntax
server (ipv4 A.B.C.D|ipv6 X:X::X:X|HOSTNAME) (port (862|<1025-65535>)|)
Parameters
ipv4 A.B.C.D | Specifies the target server's IPv4 address |
ipv6 X:X::X:X | Specifies the target server's IPv6 address |
HOSTNAME | Specifies the target server's hostname |
port (862|<1025-65535> | Specifies the port number on which the TWAMP server is listening for control connections. 862 is the default port. |
Default
N/A
Command mode
twamp-client connection mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#twamp client
OcNOS(config_twamp_client)#connection con4
OcNOS(config-twamp-connection)#server ipv4 192.168.1.100 port 862
OcNOS(config-twamp-connection)#commit
OcNOS(config)#twamp client
OcNOS(config_twamp_client)#connection con6
OcNOS(config-twamp-connection)#server ipv6 2001:0db8:85a3:0000:0000:8a2e:0370:7334 port 5000
OcNOS(config-twamp-connection)#commit
OcNOS(config)#twamp client
OcNOS(config_twamp_client)#connection conhost
OcNOS(config-twamp-connection)#server pe1-host port 5100
OcNOS(config-twamp-connection)#commit
twamp client session
Use this command to request a session from the server.
Command Syntax
session <session-name> sender-port <port> receiver-port <port> (sender-address
<address>|) (receiver-address <address>|) (start-time <TIME>|) (interface
<IFNAME>|)
Parameters
session-name | Specifies the name of the TWAMP client session. |
port | Specifies the sender and receiver port numbers to be used in the session. |
address | Specifies the sender and receiver addresses(optional). In case the receiver-address is not specified, the configured server address used for the connection is used for this session. In case the sender address is not specified, the client address used for the connection is used for this session. |
TIME | Defines the start time of the session (optional). |
IFNAME | Specifies the interface to be associated with the session (optional). |
Default
N/A
Command mode
twamp-client-connection mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#twamp client
OcNOS(config_twamp_client)#connection testipv6
OcNOS(config-twamp-connection)#server ipv6 2001:67c:2468::122:e:5 port 862 OcNOS(config-twamp-connection)#session session_IPV6 sender-port 5666 receiver-port 5666 sender-address ipv6 2001:67c:2468::122:e:5 receiver-address ipv6 2001:67c:2468::122:e:4
OcNOS(config)# twamp client
OcNOS(config_twamp_client)#connection test_ipv4 vrf-name vrf1
OcNOS(config_twamp_connection)#server ipv4 24.1.1.2 port 862
OcNOS(config-twamp-connection)#session session_IPV4 sender-port 5666 receiver-port 5666 sender-address ipv4 24.1.1.1 receiver-address ipv4 24.1.1.2
twamp client start connection
Use this command to start the sessions already requested from the server and accepted by the server over the specified connection.
Command Syntax
twamp client start connection <NAME> packet-count <0-1000000> (vrf NAME |)
Parameters
NAME | Specifies the name of the TWAMP client connection to be used for the session. |
0-1000000 | Specifies the number of packets to be used in the session. It can be any value between 0 and 1,000,000. |
vrf NAME | Specifies the a Virtual Routing and Forwarding (VRF) context for the TWAMP client session (optional). |
Default
N/A
Command mode
exec mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#twamp client
OcNOS(config-twamp-client)#twamp client start connection MyConnection packet-count 1000 vrf VRF1
OcNOS(config-twamp-client)#commit
twamp client stop connection
Use this command to stop the sessions already requested from the server and accepted by the server over the specified connection.
This command is only effective if the packet-count specified in the start command is not elapsed. In case the packet-count is elapsed, the sessions are stopped automatically, and this command would not have any effect.
Command Syntax
twamp client stop connection <NAME>(vrf NAME)
Parameters
NAME | Specifies the name of the TWAMP client connection to be stopped. |
vrf NAME | Specifies the a VRFcontext for the TWAMP client session (optional). |
Default
N/A
Command mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS(config)#twamp client
OcNOS(config-twamp-client)#twamp client stop connection MyConnection vrf VRF1
OcNOS(config-twamp-client)#commit
twamp client reset connection
Use this command to reset the TWAMP client sessions on a connection.
Command Syntax
twamp client reset connection NAME (session NAME|) (vrf WORD|)
Parameters
NAME | Specifies the name of the connection where the sessions will be reset. |
NAME | Specifies the name of the session to be reset. If not specified, all sessions on the connection will be reset. |
WORD | Specifies the name of the vrf where the connection is operating. If not specified, the default vrf will be used. |
Default
N/A
Command mode
Exec mode
Applicability
This command was introduced in OcNOS version 6.4.1.
Examples
OcNOS#twamp client reset connection test_ipv6 vrf vrf1
Validation
Show Output commands.
• Verify using the below show command that the Connection status of test_ipv6 is Established. This indicates the Client established the connection properly with the server.
OcNOS#show twamp client connection
connection Name Server address Server port VRF Status
test_ipv6 2001:67c:2468::122:e:4 862 vrf1 Established
• Verify using the below show command that the Session session_IPV6 is in Accepted state.
OcNOS#show twamp client session
Connection name Session name Sender Receiver State
test_ipv6 session_IPV6 2001:67c:2468::122:e:52001:67c:2468::122:e:4Accepted
• Verify to display the results of the measurement for the session session_IPV6.
OcNOS#show twamp-statistics
=========================================
TWAMP Test-Session Statistics
=========================================
Test-Session Name : session_IPV6
Start Time : 2023 Oct 16 20:37:32
Elapsed time(milli sec) : 15013
Packets Sent : 30
Packets Received : 30
Packet Loss(%) : 0.00
Round Trip Delay(usec)
Minimum : 61
Maximum : 260
Average : 112
Forward Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Round Trip Delay Variation(usec)
Minimum : 75
Maximum : 90
Average : 84
Forward Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
(*) - Time is not in sync between Sender and Reflector
• Verify that the connection and session are in Running state after the user issues the start command.
OcNOS#show twamp client connection
connection Name Server address Server port VRF Status
test_ipv6 2001:67c:2468::122:e:4 862 vrf1 Running
OcNOS#
OcNOS#sh twamp client session
Connection name Session name Sender Receiver State
test_ipv6 session_IPV6 2001:67c:2468::122:e:52001:67c:2468::122:e:4Started
connection Name Server address Server port VRF Status
connection_vrf 10.1.1.1 862 vrf1 Running
Server Configuration
Follow the steps below to configure the TWAMP server. These steps allow you to set up server parameters such as port number, session limits, timeouts, and VRF support.
1. Enter TWAMP server configuration mode.
server(config)# twamp server
2. Configure the listening port to define TCP port on which the TWAMP server listens for incoming connections.
server(config-twamp-server)# port 5555
3. Set Maximum Connection Duration to specify the maximum duration (in hours) that a connection remains active.
server(config-twamp-server)# max-connection-duration 3
4. Define maximum number of connections to set the total number of connections that the TWAMP server can accept concurrently.
server(config-twamp-server)# max-connections 17
5. Set maximum connections per client to limit the number of concurrent connections that a single client can establish.
server(config-twamp-server)# max-connections-per-client 3
6. Define maximum sessions to specify the total number of TWAMP sessions the server can support across all connections.
server(config-twamp-server)# maximum-sessions 25
7. Set maximum sessions per connection to limit the number of TWAMP sessions allowed per connection.
server(config-twamp-server)# maximum-sessions-per-connection 20
8. Configure inactivity timeout to specify the timeout period (in minutes) after which an inactive session will be terminated.
server(config-twamp-server)# inactivity-timeout 5
9. Add listening VRF for the active twamp server.
server(config-twamp-server)# listen-vrf vrf123
Note: If no VRF is specified, the server runs in the default VRF.
10. Enable the TWAMP Server with the configured parameters.
server(config-twamp-server)# server-admin-state enable
Validation
Show twamp server sessions information
7047-TWAMP#show twamp server session
Connection ID Session Id
Sender Receiver State
199 2B.00.00.03:E7548F41C6BC5154:5D180E4F
43.0.0.2 43.0.0.3 Started
200 29.00.00.03:E7548F41C6DAA92E:103A923B
41.0.0.2 41.0.0.3 Started
201 2C.00.00.03:E7548F41C6E5ABC0:36294112
44.0.0.2 44.0.0.3 Started
202 2C.00.00.03:E7548F41C7161A1D:63CFE863
44.0.0.2 44.0.0.3 Started
203 2A.00.00.03:E7548F41C82B94D9:47C8C30A
42.0.0.2 42.0.0.3 Started
204 2C.00.00.03:E7548F41C917A461:E0C3DE71
44.0.0.2 44.0.0.3 Started
7047-TWAMP#
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:00Timeout : 5 sec
Configuration to Trigger TWAMP Traps
Prerequisites
For configurations using the server and client, the following settings are enabled:
• hardware-profile filter twamp-ipv4 enable
• IPv6
• snmp-server enable traps twamp
For configurations using the controller and reflector, the following settings are disabled:
• hardware-profile filter twamp-ipv4 enable and IPv6
• snmp-server enable traps twamp
Basic Snmp config are already present.
OID for IGP-TE: 1.3.6.1.4.1.36673.1600
OID for TWAMP: 1.3.6.1.4.1.36673.1601
OID for TWAMP-CLIENT: 1.3.6.1.4.1.36673.1603
Perform the following steps on the TWAMP server and client devices.
1. Configure the TWAMP Server
(Reflector)(config)# twamp-light reflector
(config-twamp-reflector)# reflector-admin-state enable
(config-twamp-reflector)# reflector-name R1
(config-twamp-reflector)# reflector-ip ipv4 192.168.2.1
(config-twamp-reflector)# reflector-port 862
(config-twamp-reflector)# commit
(config-twamp-reflector)# exit
(config)# twamp server
(config-twamp-server)# port 862
(config-twamp-server)# max-connections 2
(config-twamp-server)# max-connections-per-client 2
(config-twamp-server)# maximum-sessions 64
(config-twamp-server)# maximum-sessions-per-connection 64
(config-twamp-server)# inactivity-timeout 1
(config-twamp-server)# listen-vrf default
(config-twamp-server)# server-admin-state enable
(config-twamp-server)# commit
(config-twamp-server)# exit
2. Configure the TWAMP Client.
twampclient# configure terminal
twampclient(config)# twamp-light control
twampclient(config-twamp-control)# control-admin-state enable
twampclient(config-twamp-control)# exit
twampclient(config)# twamp client
twampclient(config-twamp-client)# maximum-connections 10
twampclient(config-twamp-client)# maximum-sessions 10
twampclient(config-twamp-client)# connection test1
twampclient(config-twamp-connection)# server ipv4 192.168.2.1 port 862
twampclient(config-twamp-connection)# session s1 sender-port 1025 receiver-
port 1025 \sender-address ipv4 192.168.2.2 receiver-address ipv4 192.168.2.1
twampclient(config-twamp-connection)# exit-connection
twampclient(config-twamp-client)# commit
twampclient(config-twamp-client)# exit
3. Perform reflector and controller configurations for delay and loss measurement:
1. Enable TWAMP Light Control
CONTROLLER(config)# twamp-light control
CONTROLLER(config-twamp-light-ctrl)# control-admin-state enable
CONTROLLER(config-twamp-light-ctrl)# commit
CONTROLLER(config-twamp-light-ctrl)# end
2. Configure Delay Profile Parameters
CONTROLLER(config)# delay-profile interfaces
CONTROLLER(config-dp-intf)# burst-interval 2000
CONTROLLER(config-dp-intf)# burst-count 5
CONTROLLER(config-dp-intf)# interval 60
CONTROLLER(config-dp-intf)# advertisement accelerated
CONTROLLER(config-dp-intf)# advertisement accelerated threshold 10
CONTROLLER(config-dp-intf)# advertisement accelerated minimum-change 1
CONTROLLER(config-dp-intf)# notification enabled
CONTROLLER(config-dp-intf)# notification threshold 1
CONTROLLER(config-dp-intf)# notification minimum-change 10
3. Configure Interface for Delay and Loss Measurement
CONTROLLER(config)# interface xe16
CONTROLLER(config-if)# delay-measurement dynamic twamp reflecor-ip
10.1.1.2 sender-ip 10.1.1.1
CONTROLLER(config-if)# loss-measurement dynamic
CONTROLLER(config-if)# commit
4. Reflector Configuration:
1. Enable TWAMP light reflector
REFLECTOR(config)# twamp-light reflector
REFLECTOR(config-twamp-light-ref)# reflector-admin-state enable
2. Configure Reflector Parameters:
REFLECTOR(config-twamp-light-ref)# reflector-name r1 reflector-ip ipv4
10.1.1.2 reflector-port 862 sender-ip ipv4 10.1.1.1 sender-port 862
REFLECTOR(config-twamp-light-ref)# commit
REFLECTOR(config-twamp-light-ref)# end
5. Trigger the Desired Trap.
Trap Name/OID | Twamp Server Config | Twamp Client Config | Trigger |
---|
twamp-server-client-connected" or "iso.3.6.1.4.1.36673.1601.0.1" and "twamp-server-session-accepted" or "iso.3.6.1.4.1.36673.1601.0.3 | Config from client and server | Config from client and server | No Specific Trigger |
"twamp-server-client-"disconnected" or "iso.3.6.1.4.1.36673.1601.0.2 | Config from client and server | Config from client and server | Remove the created Connection that is no connection <Connection-name> |
twamp-server-sessions-started" or "iso.3.6.1.4.1.36673.1601.0.4" | Config from client and server | Config from client and server | Start the session that is twamp client start connection <connection-name> |
twamp-server-sessions-stopped" or "iso.3.6.1.4.1.36673.1601.0.5 | Config from client and server | Config from client and server | Stop the connection that is twamp client stop connection <connection-name> |
twamp-server-client-inactivity-timeout" or "iso.3.6.1.4.1.36673.1601.0.6 | inactivity-timeout 1 | Config from client and server | Start the connection and keep the system idle for 1 minute |
twamp-server-maximum-connections-exceeded" or "iso.3.6.1.4.1.36673.1601.0.8" | max-connections 2 | Already config for two connection to server exists | When the third connection to server is created |
twamp-server-maximum-sessions-exceeded" or "iso.3.6.1.4.1.36673.1601.0.9" | maximum-sessions 2 | Already config for two session to server exists | When third session to server is created |
twamp-server-maximum-connections-per-client-exceeded" or "iso.3.6.1.4.1.36673.1601.0.10" | max-connections-per-client 2 | Already two connection to sever exists | When third connection to server is made |
twamp-server-maximum-sessions-per-connection-exceeded" or "iso.3.6.1.4.1.36673.1601.0.11" | maximum-sessions-per-connection 1 | Already 1 session to server exists | When second session to server is created |
twamp-delay-threshold-breached or ".1.3.6.1.4.1.36673.1601.0.12 | Config from controller and reflector | Config from controller and reflector | This notification is generated when the configured delay-threshold is breached. |
twamp-client-session-accepted or ".1.3.6.1.4.1.36673.1603.0.1 | Config from client and server | Config from client and server | When a Session is accepted by the TWAMP Server to the TWAMP Client. So, The TWAMP Client can get to know when the acceptance as been done, since the accept may not be synchronous. |
twamp-client-sessions-started or ".1.3.6.1.4.1.36673.1603.0.2 | Config from client and server | Config from client and server | When a Session is started with the Twamp Server, the trap is generated to inform the TWAMP Client side that it has started |
twamp-client-sessions-stopped or ".1.3.6.1.4.1.36673.1603.0.3 | Config from client and server | Config from client and server | When a Session is stopped with the Twamp Server, the trap is generated to inform the TWAMP Client side that it has stopped |
twamp-delay-measurement-threshold-crossed or ".1.3.6.1.4.1.36673.1600.0.1 | Config from controller and reflector | Config from controller and reflector | When an interface is configured to run the interface delay profile, it will calculate the RTT delay. If the delay supprass the default thresholds (in case no thresholds were set) or if it crosses the configured thresholds, the trap will be generated. |
twamp-delay-measurement-loss-changed or ".1.3.6.1.4.1.36673.1600.0.2 | Config from controller and reflector | Config from controller and reflector | When the packet loss changes from the last measured loss this trap will be generated |
Validation
TRAPS: (Highlighted)
For twamp-server-client-connected and twamp-server-session-accepted
iso.3.6.1.2.1.1.3.0 = Timeticks: (3523800) 9:47:18.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.1 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.9.1.1 = Gauge32: 4 iso.3.6.1.4.1.36673.1601.9.1.2 = STRING: "192.168.2.2" iso.3.6.1.4.1.36673.1601.9.1.3 = Gauge32: 21191 iso.3.6.1.4.1.36673.1601.9.1.4 = STRING: "default"
2025-04-12 20:29:52 <UNKNOWN> [UDP: [10.16.113.127]:46007->[10.16.99.107]:12162]:
iso.3.6.1.2.1.1.3.0 = Timeticks: (3523800) 9:47:18.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.3
NOTIFICATION:
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T16:16:02Z</eventTime>
<twamp-server-client-connected xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<connection-id>5</connection-id>
<client-address>192.168.2.2</client-address>
<client-port>33482</client-port>
<client-vrf>default</client-vrf>
</twamp-server-client-connected>
</notification>
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T16:16:02Z</eventTime>
<twamp-server-session-accepted xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<session-id>C0.A8.02.01:EBA510428393CCD0:B92D265A</session-id>
<connection-id>6</connection-id>
<sender-address>192.168.2.2</sender-address>
<sender-port>1025</sender-port>
<receiver-address>192.168.2.1</receiver-address>
<receiver-port>1025</receiver-port>
<receiver-vrf>default</receiver-vrf>
</twamp-server-session-accepted>
</notification>
twamp-server-client-”disconnected” or “iso.3.6.1.4.1.36673.1601.0.2”
TRAPS:
iso.3.6.1.2.1.1.3.0 = Timeticks: (4422700) 12:17:07.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.2 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.9.1.1 = Gauge32: 9 iso.3.6.1.4.1.36673.1601.9.1.2 = STRING: "192.168.2.2" iso.3.6.1.4.1.36673.1601.9.1.3 = Gauge32: 37 iso.3.6.1.4.1.36673.1601.9.1.4 = STRING: "default"
NOTIFICATIONS:
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T17:33:00Z</eventTime>
<twamp-server-client-disconnected xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<connection-id>11</connection-id>
<client-address>192.168.2.2</client-address>
<client-port>37</client-port>
<client-vrf>default</client-vrf>
</twamp-server-client-disconnected>
</notification>
twamp-server-sessions-started” or “iso.3.6.1.4.1.36673.1601.0.4
Start connection from client to generate traps
TRAPS:
iso.3.6.1.2.1.1.3.0 = Timeticks: (4483300) 12:27:13.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.4 iso.3.6.1.2.1.1.5.0 = STRING:
"TWAMPSERVER" iso.3.6.1.4.1.36673.1601.10.1.1 = STRING: "C0.A8.02.01:EBA522DDC5B9D7FD:8C0A1D0A" iso.3.6.1.4.1.36673.1601.10.1.2 = Gauge32: 12
NOTIFICATION:
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T17:44:37Z</eventTime>
<twamp-server-sessions-started xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<session-id>C0.A8.02.01:EBA524F84EA92E62:D5E78A33</session-id>
<connection-id>13</connection-id>
</twamp-server-sessions-started>
</notification>
twamp-server-sessions-stopped” or “iso.3.6.1.4.1.36673.1601.0.5
TRAPS:
iso.3.6.1.2.1.1.3.0 = Timeticks: (4645600) 12:54:16.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.5 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.10.1.1 = STRING: "C0.A8.02.01:EBA52644088626F6:FD04027E" iso.3.6.1.4.1.36673.1601.10.1.2 = Gauge32: 14
2025-04-12 23:36:49 <UNKNOWN> [UDP: [10.16.113.121]:39643->[10.16.99.107]:12162]:
NOTIFICATION:
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T18:06:41Z</eventTime>
<twamp-server-sessions-stopped xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<session-id>C0.A8.02.01:EBA52644088626F6:FD04027E</session-id>
<connection-id>14</connection-id>
</twamp-server-sessions-stopped>
</notification>
twamp-server-client-inactivity-timeout or iso.3.6.1.4.1.36673.1601.0.6
TRAPS:(Highlighted)
iso.3.6.1.2.1.1.3.0 = Timeticks: (4763300) 13:13:53.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.6 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.9.1.1 = Gauge32: 15 iso.3.6.1.4.1.36673.1601.9.1.7 = Hex-STRING: 07 E9 04 0C 12 18 1D 00
NOTIFICATION:
yangcli ocnos@10.16.113.127> 2025 Apr 12 18:32:18.887 : TWAMPSERVER : OAM : WARN : Connection 17 has been inactive for 1 minutes, closing the conenction
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T18:40:18Z</eventTime>
<twamp-server-client-inactivity-timeout xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<connection-id>21</connection-id>
<last-activity-time>2025-04-12T18:38:23Z</last-activity-time>
</twamp-server-client-inactivity-timeout>
</notification>
twamp-server-maximum-connections-exceeded or iso.3.6.1.4.1.36673.1601.0.8
TRAPS: (Highlighted)
2025-04-13 00:51:22 <UNKNOWN> [UDP: [10.16.113.127]:46007->[10.16.99.107]:12162]:
iso.3.6.1.2.1.1.3.0 = Timeticks: (5092800) 14:08:48.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.8 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.1 = Gauge32: 2
NOTIFICATION:
yangcli ocnos@10.16.113.127> 2025 Apr 12 19:27:33.057 : TWAMPSERVER : OAM : ERROR : Maximum number of connections 2 reached, rejecting the new connection
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-12T19:27:33Z</eventTime>
<twamp-server-maximum-connections-exceeded xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<max-connections>2</max-connections>
</twamp-server-maximum-connections-exceeded>
</notification>
twamp-server-maximum-sessions-exceeded” or “iso.3.6.1.4.1.36673.1601.0.9”
TWAMPSERVER CONFIG:
TWAMPSERVER#sh run twamp
twamp-light reflector
reflector-admin-state enable
reflector-name R1 reflector-ip ipv4 192.168.2.1 reflector-port 862
twamp server
port 862
max-connections 32
max-connections-per-client 4
maximum-sessions 2
maximum-sessions-per-connection 1
listen-vrf default
server-admin-state enable
TRAPS: (Highlighted)
iso.3.6.1.2.1.1.3.0 = Timeticks: (15810800) 1 day, 19:55:08.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.9
iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.3 = Gauge32: 2
NOTIFICATION:
yangcli ocnos@10.16.113.127> create-subscription
RPC OK Reply 1 for session 11:
yangcli ocnos@10.16.113.127> 2025 Apr 14 01:13:31.831 : TWAMPSERVER : OAM : WARN : Maximum number of sessions 2 reached on the server
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-14T01:13:31Z</eventTime>
<twamp-server-client-connected xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<connection-id>54</connection-id>
<client-address>192.168.2.2</client-address>
<client-port>44259</client-port>
<client-vrf>default</client-vrf>
</twamp-server-client-connected>
</notification>
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-14T01:13:31Z</eventTime>
<twamp-server-maximum-sessions-exceeded xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<maximum-sessions>2</maximum-sessions>
</twamp-server-maximum-sessions-exceeded>
</notification>
twamp-server-maximum-connections-per-client-exceeded” or “iso.3.6.1.4.1.36673.1601.0.10”
TRAPS: (Highlighted)
iso.3.6.1.2.1.1.3.0 = Timeticks: (16085400) 1 day, 20:40:54.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.10 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.2 = Gauge32: 2 iso.3.6.1.4.1.36673.1601.9.1.1 = Gauge32: 59
NOTIFICATIONS:
yangcli ocnos@10.16.113.127> 2025 Apr 14 01:57:50.958 : TWAMPSERVER : OAM : ERROR : Maximum number connections 2 from client 192.168.2.2 reached
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-14T01:57:50Z</eventTime> Two-way Active Measurement Protocol Server <twamp-server-maximum-connections-per-client-exceeded xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<max-connections-per-client>2</max-connections-per-client>
<connection-id>59</connection-id>
</twamp-server-maximum-connections-per-client-exceeded>
</notification>
twamp-server-maximum-sessions-per-connection-exceeded” or “iso.3.6.1.4.1.36673.1601.0.11”
TRAPS: (Highlighted)
iso.3.6.1.2.1.1.3.0 = Timeticks: (15881200) 1 day, 20:06:52.00 iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.36673.1601.0.11 iso.3.6.1.2.1.1.5.0 = STRING: "TWAMPSERVER" iso.3.6.1.4.1.36673.1601.4 = Gauge32: 1 iso.3.6.1.4.1.36673.1601.9.1.1 = Gauge32: 51
NOTIFICATIONS: Two-way Active Measurement Protocol Server
yangcli ocnos@10.16.113.127> create-subscription
RPC OK Reply 1 for session 12:
yangcli ocnos@10.16.113.127> 2025 Apr 14 01:24:46.865 : TWAMPSERVER : OAM : WARN : Maximum number of sessions 1 reached for client 51
Incoming notification:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-04-14T01:24:46Z</eventTime>
<twamp-server-maximum-sessions-per-connection-exceeded xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-twamp">
<severity>minor</severity>
<eventClass>state</eventClass>
<maximum-sessions-per-connection>1</maximum-sessions-per-connection>
<connection-id>51</connection-id>
</twamp-server-maximum-sessions-per-connection-exceeded>
</notification>
yangcli ocnos@10.16.113.127>
Abbreviations
The following are some key abbreviations and their meanings relevant to this document:
TCP | Transmission Control Protocol |
---|
TWAMP | Two-way Active Measurement Protocol Client |
VRF | Virtual Routing and Forwarding |
RD | Route Distinguisher |
Glossary
The following provides definitions for key terms used throughout this document.
TWAMP | Two-Way Active Measurement Protocol, a standardized protocol for measuring network performance in a bidirectional manner. |
---|
Client | In the context of TWAMP, the client is a device or software component responsible for initiating TWAMP test sessions and measuring network performance. |
Session | A measurement session in TWAMP involves the exchange of test packets between the client and the server to assess network performance. |
Server | The counterpart to the client, the server in TWAMP receives test packets, conducts measurements, and provides results to the client. |
Test Packets | Data packets exchanged between the client and server to measure network performance, including metrics like latency, jitter, and packet loss. |
Initiate | The action of starting a TWAMP test session from the client to the server. |
Latency | The time it takes for data packets to travel from the client to the server and back, often measured in milliseconds. |