Two-way Active Measurement Protocol Server
Two-way Active Measurement Protocol (TWAMP) is an open protocol for measuring network performance between any two devices.
Here, we need to start the TWAMP server by using server admin state enable command. From TWAMP client, we need to configure test session with client control connection name, test session name along with ip address of server interface, probe count & dscp code points.
The sessions will stop automatically, once it reached the configure inactivity time set from twamp server. To stop TWAMP server, the user need to disable server admin state from twamp server.
Topology
BGP Peer-Groups with L2VPN EVPN address-family
Note: TWAMP client is not supported on OcNOS.
Configuration
Configuring TWAMP Server on the Router
SERVER(config)# twamp server | Use this command to change to the twamp server mode. |
SERVER(config-twamp-server)#port 5555 | Set the TCP port value where the twamp server will be listening. It could be either the default value 862, or in the range 1025-65535. |
SERVER(config-twamp-server)# max-connection-duration 3 | Set the maximum connection duration value between 0 and 120 hours. |
SERVER(config-twamp-server)# max-connections 17 | Set the maximum number of connections value between 1 and 32. |
SERVER(config-twamp-server)# max-connections-per-client 3 | Set the maximum number of connections per client value between 1 and 4. |
SERVER(config-twamp-server)# maximum-sessions 25 | Set the maximum number of sessions between 1 and 64. |
SERVER(config-twamp-server)# maximum-sessions-per-connection 20 | Set the maximum number of sessions per connection between 1 and 64. |
SERVER(config-twamp-server)# inactivity-timeout 5 | Set the inactivity timeout to a value between 0 and 30 in minutes. |
SERVER(config-twamp-server)# listen-vrf vrf123 | Use this command to add custom VRFs to the list of VRFs where the TWAMP server is running. If no listen-vrf is specified, the TWAMP server is started in the default VRF only. Multiple VRFs 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. |
SERVER(config-twamp-server)# server-admin-state enable | Use this command to Start/Stop the TWAMP server with the above configured parameters. In case any of the twamp server parameters are modified after the server is started, the modification will be applied after the server is stopped and started again. |
SERVER(config-twamp-server)#commit | Commit the candidate configuration to the running configuration |
Validation
SERVER#sh running-config twamp
twamp server
max-connection-duration 2
max-connections 10
max-connections-per-client 4
maximum-sessions 30
maximum-sessions-per-connection 20
inactivity-timeout 2
listen-vrf default
listen-vrf management
listen-vrf vrf-111
listen-vrf vrf-112
listen-vrf vrf-222
listen-vrf vrf1
listen-vrf vrf2
Show twamp server status:
SERVER#show twamp server status
Status : Not Enabled
Listening Port : 862
Server VRF list : default management vrf-111 vrf-112 vrf-222 vrf1 vrf2
Number of connections : 0
Number of sessions : 0
Number of running sessions: 0
OcNOS#show twamp server status
Status : Enabled
Listening Port : 862
Server VRF list : management default vrf1
Number of connections : 3
Number of sessions : 15
Number of running sessions: 5
Show twamp server connections information
OcNOS# show twamp server connection
Connection ID Client Address Client Port
1 100.1.0.1 59807
2 100.1.0.2 59808
3 100.1.0.3 59809
4 100.1.0.4 59810
OcNOS# show twamp server connection 2
Connection ID : 2
Client Address : 100.1.0.2
Client Port : 59808
Client VRF : default
State : Control session established
Connection Time : Thu Feb 14 12:13:51 2019
Last Activity Time : Thu Feb 14 12:13:51 2019
Number of session requests : 7
Number of accepted sessions: 3
OcNOS#
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:00
Timeout : 5 sec