Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Select a LAG member to Test with TWAMP

TWAMP is a layer 3 protocol, which means that test probes follow the routing table. You can select an aggregated Ethernet interface for running TWAMP tests. However, when testing over aggregated links, probes are subject to hash-based load balancing, just like any other packet. If you need to manually select the LAG member for testing, both on the way out and on the way back, you can do this by taking advantage of TWAMP support for MPLS segment routing.

TWAMP is an open protocol for measuring network performance between any two devices in a network that supports the TWAMP protocol. TWAMP consists of the TWAMP-Control protocol and TWAMP-Test protocol. The TWAMP-Control protocol is used to initiate, start and stop the test sessions at the TWAMP client. TWAMP also offers a light operation mode, where the TWAMP-Control part of the protocol is skipped and the server simply reflects any probe received on a preset UDP port (port 862 is reserved to that end). The TWAMP-Test protocol exchanges the test packets between the session sender and the session reflector.

The TWAMP server is an end system that manages one or more TWAMP sessions and is capable of configuring per-session ports. The TWAMP server listens to the TCP port. The session reflector and TWAMP server make up the TWAMP responder in an IP service-level agreement operation.

By default, TWAMP test probes are distributed across LAG members using hash-based load balancing. Because you cannot predict what path the probes take, the test results vary and cannot be used to accurately measure the performance and adherence to service level agreements for the link. In this example, you can override that load balancing to gain more accurate measurements. Along with configuring the TWAMP client and server to generate probes, you override the load balancing as follows:

  • Configure a LAG interface.
  • Additionally, configure MPLS static LSPs to explicitly select a specific LAG member each for the forward and for the return path, then configure source routing on the TWAMP client to enable the test probes to use these static LSPs.

Prerequisites

This example has the following requirements:

Table 1: Example Prequisites

Hardware requirements

PTX Series routers

Software requirements

Junos OS Evolved Release 24.4R1 or later

Licensing requirements

None

Before You Begin

Before you begin configuring the TWAMP client and the TWAMP server, ensure that you have read Understand Two-Way Active Measurement Protocol to understand how this task fits into the overall configuration process.

Functional Overview

Here's a summary of the technologies used in this example, along with a summary the show commands you use to verify that you have configured everything correctly:

Table 2: Functional Overview

Technologies used

  • TWAMP light mode

  • Aggregated Ethernet interfaces, LAGs, IEEE 802.3ad link aggregation

  • MPLS static label switched paths (LSPs)

Primary verification tasks

  • show services monitoring twamp client test-info

  • show services monitoring twamp server test-info

  • show services monitoring twamp client probe-results

  • show services monitoring twamp client history-results brief control-connection id

  • show route table mpls.0 label label detail

Topology Overview

In this topology, device R1 is the TWAMP client. As such, this device initiates, starts, and stops the TWAMP test sessions. Device R2 is the TWAMP server. As such, this device manages TWAMP test sessions and reflects TWAMP probes back to the TWAMP client.

Figure 1: Topology Network topology diagram showing TWAMP setup with R1 as client and R2 as server. R1 has interface et-1/0/0 with IP 10.1.1.1/30. R2 has interface et-1/0/0 with IP 10.1.1.2/30.

Here's a summary of the configuration tasks for this topology by device:

Table 3: Topology Overview

Hostname

Role

Function

R1

TWAMP client

Configure TWAMP client, test sessions, and aggregated Ethernet interfaces. Optionally, configure an MPLS static LSP and source routing for TWAMP.

R2

TWAMP server

Configure TWAMP test sessions, aggregated Ethernet interfaces, and the TWAMP server. Optionally, configure an MPLS static LSP for the return path.

Note:

For sample configuration and show commands for the devices, see:

Configure R1 (TWAMP Client)

The following example shows a procedure for a TWAMP client configuration with a LAG interface to ensure that TWAMP probes follow a fixed path. In an optional step, you configure MPLS static LSPs on the LAG interface for the forward path and configure segment routing for the TWAMP test session to explicitly select a specific LAG member for the forward and return paths. For this ability, you do not need to use MPLS segment routing across the network. You simply need to set up the LAG interface on both the TWAMP client and the TWAMP server to process basic MPLS. For this example, no packet, TWAMP or otherwise, needs to leave the client or server with an MPLS tag; this is a local routing scheme.

  1. Configure the number of aggregated Ethernet interfaces for device R1.
  2. Configure aggregated Ethernet interfaces to form a link aggregation group (LAG) for device R1.
  3. Configure the control session from device R1 to device R2.

    This example uses TWAMP light mode.

  4. Configure the test session from device R1 to device R2 for collecting probe results.
  5. (Optional) Explicitly select the LAG member that the test probes can use.
    1. Configure MPLS to explicitly select a specific LAG member for the forward path.

      The static LSP for the forward path is configured on the TWAMP client device. The static LSP for the return path is configured on the TWAMP server device.

    2. Configure MPLS source routing for the TWAMP test session so that the test session can use the specific LAG members.

      Use the LSP numbers configured on the TWAMP client device and on the TWAMP server device in these configuration commands.

  6. Display the configuration.

    From the configuration mode on Device R1, confirm your configuration by entering the show | no-more command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration. The output below includes the optional MPLS configuration. When the output does display the intended configuration, move on to the next step.

  7. Commit the configuration.

Configure R2 (TWAMP Server)

The following example shows a procedure for a TWAMP server configuration with a LAG interface, for both the forward and return paths, to ensure that TWAMP probes follow a fixed path. In an optional step, you configure MPLS static LSPs on the LAG interface to explicitly select a specific LAG member for the return path.

  1. Configure the number of aggregated Ethernet interfaces for device R2.
  2. Configure aggregated Ethernet interfaces to form a link aggregation group (LAG) for device R2.
  3. Configure the TWAMP server.

    This example uses TWAMP light mode.

  4. (Optional) Configure MPLS to explicitly select a specific LAG member for the return path.
  5. Display the configuration.

    From the configuration mode on Device R2, confirm your configuration by entering the show | no-more command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration. The output below includes the optional MPLS configuration. When the output does display the intended configuration, move on to the next step.

  6. Commit the configuration.

Verification

Confirm that the configuration is working properly.

Table 4: Verification Commands
Command Task

show services monitoring twamp client test-info

Verify that the TWAMP client is established and active on device R1.

show services monitoring twamp server test-info

Verify that the TWAMP test sessions are established on device R2.

show services monitoring twamp client probe-results

Verify that the TWAMP test sessions are generating probes.

show services monitoring twamp client history-results brief control-connection id

Verify that a particular TWAMP control connection is established and active.

show route table mpls.0 label label detail

(Optional) If you have configured MPLS static LSPs and source routing for TWAMP, verify that the MPLS static LSPs for the paths are established and active. For the forward path, issue this command on the TWAMP client device. For the return path, issue this command on the TWAMP server device.

Verify TWAMP Client Sessions

Purpose

Verify that the TWAMP client sessions are established on device R1.

Action

From operational mode, enter the show services monitoring twamp client test-info command.

Meaning

The configured control and test sessions (c1 and member-1, respectively) are established on device R1.

Verify TWAMP Server Test Sessions

Purpose

Verify that the TWAMP server control sessions are established on device R2.

Action

From operational mode, enter the show services monitoring twamp server test-info command.

Meaning

The test session on device R2 is established and active, with device R1 as the client and device R2 as the server.

Verify that Probe Results are Generated

Purpose

Verify that the TWAMP test sessions are generating probes.

Action

From operational mode, enter the show services monitoring twamp client probe-results command on device R1.

Meaning

The configured control and test sessions (c1 and member-1, respectively) on device R1 are generating probe results.

Verify Details about a Particular Control Session

Purpose

Verify that a particular TWAMP control connection is established and active.

Action

From operational mode, enter the show services monitoring twamp client history-results brief control-connection c1 command on device R1.

Meaning

The configured control and test sessions (c1 and member-1, respectively) are active on device R1. The command also produces a history of what tests have run.

Verify the MPLS Static LSP for the Forward or Return Path

Purpose

(Optional) If you have configured MPLS static LSPs and source routing for TWAMP, verify that the MPLS static LSPs for the paths are established and active. For the forward path, issue this command on the TWAMP client device (R1). For the return path, issue this command on the TWAMP server device (R2).

Action

From operational mode, for the forward path, enter the show route table mpls.0 label 700001 detail command on device R1.

From operational mode, for the return path, you would enter the show route table mpls.0 label 800001 detail command on device R2. You would see similar output to the above example, except that the next hop is device R1.

Meaning

The static LSP for the forward path is active, and the next hop is the TWAMP server device, R2.

Configuration Commands Appendix

Set command output for both device R1 (TWAMP client) and device R2 (TWAMP server):

Show Commands Appendix

Verifying on device R1 (TWAMP client):

Verifying on device R2 (TWAMP server):