OcNOS SP : Layer 3 Guide : Two-Way Active Measurement Protocol Configuration : Two-Way Active Measurement Protocol Client
Two-Way Active Measurement Protocol Client
Overview
The Two-way Active Measurement Protocol (TWAMP) Client implementation is a network performance measurement feature that facilitates TWAMP on routers. This feature implements the client-side of the control session. The TWAMP Client is responsible for initiating and controlling network performance tests, while the TWAMP server receives these test requests, conducts the tests, and provides measurement results. The TWAMP client is used in conjunction with a TWAMP server on the other end to conduct bidirectional measurements, assess the network, troubleshoot issues, and ensure the quality of service in the network infrastructure.
Feature Characteristics
The Two-way Active Measurement Protocol Client feature has the following characteristics:
The Twamp client initiates when a user creates a client connection to the server address and port.
The Twamp client establishes a TCP connection with the designated server address and port.
The server accepts the connection to establish the TCP session and ensures the seamless communication and exchange control messages with other TWAMP-compliant devices.
Both IPv4 and IPv6 are supported.
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.
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 Client
In the below example configurations, configure the Client for IPv4 and then for IPv6.
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.
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
Enables the hardware profile filter for TWAMP IPv4 traffic. This applies for both MPLS and non-MPLS.
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
Enters the configuration mode for VRF vrf1.
Client(config-vrf)# rd 10:100
Configures the RD for VRF vrf1 to 10:100
3. Configure the interface with VRF and IP address.
.
Client(config-if)# int xe14
Enters the configuration mode for interface xe14.
Client(config-if)# ip vrf forwarding vrf1
Associates the interface xe14 with VRF vrf1.
Client(config-if)#ip address 24.1.1.1/24
Configures an IPv4 address on the interface.
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
Enters the delay profile configuration
Client(twamp-delay-profile)# burst-interval 1000
Sets the burst interval to 1000 milliseconds in the delay profile.
Client(twamp-delay-profile)#burst-count 2
Sets the burst count to 2 in the delay profile
5. .Enable the Twamp control to configure TWAMP control settings in a network device.
 
Client(config)# twamp-light control
Enters the TWAMP Light control configuration.
Client(config-twamp-light-ctrl)# control-admin-state enable
Enables the TWAMP control administrative state.
6. Configure TWAMP Client to define the client's settings, connections, and measurement sessions.
 
Client(config)# twamp client
Enters the configuration for the TWAMP client.
Client(config_twamp_client)# maximum-connections 64
Sets the maximum number of connections that the TWAMP client can establish to 64.
Client(config_twamp_client)#maximum-sessions 64
Sets the maximum number of sessions that the TWAMP client can create to 64.
client(config_twamp_client)#maximum-sessions-per-connection 64
Sets the maximum number of sessions that can be created per connection to 64.
client(config_twamp_client)#connection test_ipv4 vrf-name vrf1
Configures a specific TWAMP client connection named test_ipv4 within the context of VRF vrf1.
client(config_twamp_connection)#server ipv4 24.1.1.2 port 862
Configures the server for the TWAMP client connection. It specifies the IPv4 address of the TWAMP server (24.1.1.1) and the port (862) on which the server listens for control connections.
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
Configures a specific TWAMP session within the connection. It defines the session name (session_IPV4), sender and receiver ports (5666), sender and receiver Ipv4 addresses, and sets up the parameters for the session.
client(config-twamp-connection)#exit
Exits the current configuration mode for the TWAMP client connection.
Client#twamp client start connection test_ipv6 vrf vrf1 packet-count 50
Initiates the TWAMP client for a specific connection named test_ipv6 in VRF vrf1 with a packet count of 50.
OcNOS#twamp cclient stop connection test_ipv4 vrf vrf1
Stops the TWAMP client for the test_ipv4 connection within VRF vrf1. This command is only needed if the user wants to stop the session before the 50 packets are sent, otherwise the session will automatically stop after 50 packets.
OcNOS#twamp client reset connection test_ipv4 vrf vrf1
Resets TWAMP client for the test_ipv4 connection within 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.
 
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
Enables the hardware profile filter for IPv6 traffic.
Client(config-twamp-server)# hardware-profile filter twamp-ipv6-mpls enable
Enables the hardware profile filter for IPv6 traffic over MPLS. This profile, in addition to twamp-ipv6, needs to be enabled when TWAMP IPv6 is running over MPLS.
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
Enters the configuration mode for VRF vrf1.
Client(config-vrf)# rd 10:100
Configures the RD for VRF vrf1 to 10:100
3. Configure the interface with VRF and IPv6 address.
 
Client(config-if)# int xe14
Enters the configuration mode for interface xe14.
Client(config-if)# ip vrf forwarding vrf1
Associates the interface xe14 with VRF vrf1.
Client(config-if)#ipv6 address 2001:67c:2468::122:e:5/96
Configures an IPv6 address on the interface.
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
Enters the delay profile configuration
Client(twamp-delay-profile)#burst-interval 1000
Sets the burst interval to 1000 milliseconds in the delay profile.
Client(twamp-delay-profile)#burst-count 2
Sets the burst count to 2 in the delay profile
5. Enable the TWAMP control to configure TWAMP control settings in a network device.
 
Client(config)# twamp-light control
Enters the TWAMP Light control configuration.
Client(config-twamp-light-ctrl)# control- admin-state enable
Enables the TWAMP control administrative state.
6. Configure TWAMP Client to define the client's settings, connections, and measurement sessions.
 
Client(config)# twamp client
Enters the configuration for the TWAMP client.
Client(config_twamp_client)# maximum- connections 64
Sets the maximum number of connections that the TWAMP client can establish to 64.
Client(config_twamp_client)#maximum-sessions 64
Sets the maximum number of sessions that the TWAMP client can create to 64.
client(config_twamp_client)#maximum-sessions- per-connection 64
Sets the maximum number of sessions that can be created per connection to 64.
client(config_twamp_client)#connection test_ipv6 vrf-name vrf1
Configures a specific TWAMP client connection named test_ipv6 within the context of VRF vrf1.
client(config_twamp_connection)#server ipv6 2001:67c:2468::122:e:4 port 862
Configures the server for the TWAMP client connection. It specifies the IPv6 address of the TWAMP server (2001:67c:2468::122:e:4) and the port (862) on which the server listens for control connections.
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
Configures a specific TWAMP session within the connection. It defines the session name (session_IPV6), sender and receiver ports (5666), sender and receiver IPv6 addresses, and sets up the parameters for the session.
client(config-twamp-connection)#exit
Exits the current configuration mode for the TWAMP client connection.
Client#twamp client start connection test_ipv6 vrf vrf1 packet-count 50
Initiates the TWAMP client for a specific connection named test_ipv6 in VRF vrf1 with a packet count of 50.
OcNOS#twamp client stop connection test_ipv6 vrf vrf1
Stops the TWAMP client for the test_ipv6 connection within VRF vrf1. This command is only needed if the user wants to stop the session before the 50 packets are sent, otherwise the session will automatically stop after 50 packets.
OcNOS#twamp client reset connection test_ipv6 vrf vrf1
Resets TWAMP client for the test_ipv6 connection within 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
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.