Two-Way Active Measurement Protocol

Note: I have worked on this full-time in Rust before, but I was a noob and didn’t build it properly.

Introduction

A more accurate network analysis tool for calculating round-trip delays between two devices. A better alternative to ping so to speak.

One requirement for it is that it is based on the client-server architecture, so it requires a TWAMP client/server to be present on both devices.

The RFC provides an example implementation (Appendex I) called TWAMP Light which removes the requirement of TWAMP-Control, and is a way for adopting TWAMP quickly.

Communication

TWAMP uses two protocols for it’s operation:

  • TWAMP-Control
  • TWAMP-Test

TWAMP-Control

Used for starting/stopping sessions and comms other than the actual test. Uses 862/tcp.

TWAMP-Test

Used for the actual test. Uses 862/udp.

Model

Example model is also present in the RFC.

Responder

Controller

TWAMP-Control

TWAMP-Test

Control Client

Session-Sender

Server

Session-Reflector

Communication flow

Session-ReflectorSession-SenderServerControl-ClientSession-ReflectorSession-SenderServerControl-Clientloop[TWAMP-Test]TCP connection initGreetings! I support X security/integrity mode(s)yeah wutever, I choose XAcceptableyeah gimme test session with Y detailsAcceptable sirAight i'ma start yeeting packetsAcknowledgedYEET!Chomp chomp! YEET!AIGHT ENOUGH!ok :'(