UDP loopback¶
This task pushes UDP packets from a Test Agent towards a network device (router/switch) acting as reflector. The reflector device loops each UDP packet back to the Test Agent.
The primary purpose of the UDP loopback task is to achieve very high data throughput in testing. To enable this, the reflector device needs to be configured in either of two special ways so that any UDP traffic can be looped back in hardware (in the forwarding plane). The possibilities are described below.
Note
Either of these special reflector configurations is required for the UDP loopback task to work.
With such a configuration in place, the reflector device does not create a new packet to send back; rather, it forwards the same packet it has received back to the Test Agent originating it. This is different from the procedures for TWAMP or UDP echo, where the reflector does create a new packet which it sends back to the Test Agent.
This task works with IPv4 as well as IPv6.
Prerequisites¶
To perform UDP loopback measurements, you need to install at least one Test Agent. For guidance on how to deploy a new Test Agent, see the installation guides found here.
You also need to have a device (router or switch) available in your network that can serve as reflector of UDP packets.
Reflector configuration¶
Either IP loopback configuration or NAT (network address translation) is required on the reflector device in order for that device to reflect the UDP traffic back to the Test Agent.
The use of Cisco equipment is assumed in the description that follows. Equipment from other manufacturers needs to be configured correspondingly.
Option 1: IP loopback configuration¶
Many types of network devices, such as routers, switches and smart SFPs, can be configured to receive an IP packet with a combination of source and destination IP address, switch the two addresses, and send back the modified IP packet.
The diagram below illustrates how the IP addressing in the packet changes in the course of transferring the packet from the Test Agent to the reflector device and back again.
! Specify the SLA ID to start the IP SLA session.
ip sla 1
! Specify the service performance type as IP and the destination IP address.
! Specify the target for the SLA session. The options are: service instance, interface,
! vrf, and bridge-domain.
service-performance type ip dest-ip-addr 10.0.1.78 interface gi0/0/0 service instance 1
! Specify the number of interactions and the delay between iterations.
frequency iteration 1 delay 1
! Configure the loopback direction.
loopback direction internal
! Specify the packet profile, defining the packets to be generated.
profile packet
! Specify the source IP address.
source-ip-addr 192.168.0.1
! Specify the VLAN ID that is populated in the outer VLAN tag of the packet.
outer-vlan 301
! Specify the period of time for which to send packets.
duration time 30000
Option 2: NAT configuration¶
In a Cisco router, the network address translation takes place prior to packet forwarding. The WAN interface where the traffic enters the router (GigabitEthernet X
in the example below) needs to be defined as the NAT “outside” interface, and a loopback interface (loopback Y
below) needs to be defined as the NAT “inside” interface. Network address translation is then set up using the ip nat inside
command.
With this NAT setup, the following happens:
The source IP address in the packet sent from Test Agent to reflector is retained as source IP address when the packet is reflected back to the Test Agent.
The destination IP address in the packet sent from Test Agent to reflector is exchanged (according to the IP NAT table) for the Test Agent IP address when the packet is reflected back to the Test Agent.
In the reflection step, therefore, the source and destination addresses are the same.
The diagram that follows illustrates how the IP addressing in the packet changes in the course of transferring the packet from the Test Agent to the reflector device and back again.
Below is shown how to do the NAT configuration, which is mandatory:
! Create a "loopback Y" interface with an IP address and define it as "inside".
! In the above example, this IP address is 10.0.1.78 (i.e. reflector address)
interface loopback Y
ip add <loopback interface IP address> 255.255.255.255
ip nat inside
! Define the WAN interface as "outside"
interface GigabitEthernet X
ip nat outside
! Create a NAT entry which translates the loopback address into the Test Agent's IP address.
! This redirects traffic with the loopback address as destination to the Test Agent.
! In the above example, the Test Agent has IP address 192.168.0.1
ip nat inside source static <Test Agent IP address> <loopback interface IP address>
Routing configuration (always needed)¶
Routing configuration requirements are more variable, as explained further in the comments below. Announcing the loopback address in some way is however mandatory.
In the case of IP loopback, the loopback address is the IP address of the interface where the IP loopback functionality has been turned on.
In the NAT case, the loopback address is equal to the address of the loopback interface (named “Y” in the example above).
The configuration may look something like this:
! Tell the router how to send traffic to the Test Agent.
! This can be skipped if the Test Agent IP address is already available in routing tables.
! In the above example, <next-hop IP address> is "GigabitEthernet X"
ip route <Test Agent IP address> 255.255.255.255 <next-hop IP address>
! For the Test Agent to reach the loopback address, the latter must be announced in the
! routing. Below, this is done via BGP (Border Gateway Protocol).
! Enter into BGP configuration with relevant AS (autonomous system) number
router bgp <AS number>
! Add loopback address to BGP to have it announced via this protocol
network <loopback interface IP address> mask 255.255.255.255
When done configuring the router, add a UDP loopback task to your test or monitor, and fill in the mandatory parameters as shown below.
Parameters¶
See the common parameters page for the following:
Parameters that are set on the test step level: Duration, Fail threshold, and Wait for ready.
SLA thresholds for monitors: SLA Good and SLA Acceptable.
Advanced settings common to all test tasks: Delayed start.
General¶
Sender: Test Agent interface that will act as sender (and receiver) of UDP packets.
Host: IP address of device acting as reflector.
UDP port: UDP destination port on reflector device. The same port will be used as source port on the Test Agent.
Rate (Mbit/s): Rate at which the sender will send Ethernet frames in Mbit/s.
Rate (packets/s): Number of Ethernet frames the sender will send each second.
Frame size (bytes): Size of Layer 2 Ethernet frame for the flow.
Changing one Rate parameter will cause the other to adjust automatically to agree with it.
Thresholds for errored seconds (ES)¶
Rate (Mbit/s): Ethernet rate threshold for triggering an errored second.
Loss (%): Round-trip packet loss threshold for triggering an errored second.
Delay (ms): Round-trip delay threshold for triggering an errored second.
Delay variation (ms): Round-trip jitter threshold for triggering an errored second.
Expected DSCP:
------
selected in drop-down box).
Thresholds for severely errored seconds (SES)¶
Loss (%): Packet loss threshold for triggering a severely errored second. Min: 0%. No default.
Delay (ms): Delay threshold for triggering a severely errored second. Min: 1 ms. No default.
Delay variation (ms): Delay variation threshold for triggering a severely errored second. Min: 1 ms. No default.
Advanced¶
DSCP: Differentiated Services Code Point or IP Precedence to be used in IP packet headers.
VLAN priority (PCP): The Priority Code Point to be used in the VLAN header.
Result metrics¶
Received packets: Number of Ethernet packets received.
Rate (Mbit/s): Received Ethernet packet rate.
Min round-trip delay (ms): Minimum round-trip delay.
Average round-trip delay (ms): Average round-trip delay.
Max round-trip delay (ms): Maximum round-trip delay.
Average round-trip DV (ms): Average round-trip delay variation.
Lost packets: Number of lost packets.
Loss (%): Packet loss in percent.
Misorders: Number of packet misorderings.
ES (%): Aggregated errored second (ES) percentage, taking into account all types of error.
ES rate (%): Accumulated errored second percentage for received rate.
ES loss (%): Accumulated errored second percentage for packet loss.
ES delay (%): Accumulated errored second percentage for round-trip delay.
ES delay variation (%): Accumulated errored second percentage for round-trip delay variation.
ES DSCP (%): Accumulated errored second percentage for DSCP.
SES (%): Aggregated severely errored second (SES) percentage, taking into account all types of error.
Unavailable seconds (%): Unavailable second (UAS) percentage.
SLA: Service level agreement fulfillment: equal to (100 – ES) %.