Configuring TWAMP Client and TWAMP Server to Reconnect Automatically After TWAMP Server Unavailability
You can run TWAMP client automatically without any manual intervention during network failures or configuration changes. In case of a network outage or connection loss between a TWAMP client and TWAMP server, all the affected TWAMP TCP control connections and UDP test-sessions are lost. At each test-interval, the TWAMP client continues to send the control packets to re-establish connectivity with TWAMP server till is successful. All the statistics will be maintained during that network failure.
This procedure is for Junos OS only. To configure the TWAMP client:
- Configure the interfaces.
[edit interfaces] user@router1# set si-2/2/0 unit 0 family inet user@router1# set si-2/2/0 unit 10 rpm twamp-client user@router1# set si-2/2/0 unit 10 family inet address 192.168.20.1/32
- Configure the chassis.
[edit chassis] user@router1# set fpc 2 pic 2 inline-services bandwidth 1g
- Configure the services.
[edit services] user@router1# set rpm twamp client control-connection c1 destination-interface si-2/2/0.10 user@router1# set rpm twamp client control-connection c1 persistent-results user@router1# set rpm twamp client control-connection c1 history-size 500 user@router1# set rpm twamp client control-connection c1 routing instance IN user@router1# set rpm twamp client control-connection c1 target-address 192.0.2.2 user@router1# set rpm twamp client control-connection c1 tcp-keepidle 20 user@router1# set rpm twamp client control-connection c1 tcp-keepintvl 4 user@router1# set rpm twamp client control-connection c1 tcp-keepcnt 10 user@router1# set rpm twamp client control-connection c1 test-interval 4 user@router1# set rpm twamp client control-connection c1 traps control-connection-closed user@router1# set rpm twamp client control-connection c1 test-session t1 target-address 192.0.2.2 user@router1# set rpm twamp client control-connection c1 test-session t1 data-fill-with-zeros user@router1# set rpm twamp client control-connection c1 test-session t1 data-size 1400 user@router1# set rpm twamp client control-connection c1 test-session t1 probe-count 20 user@router1# set rpm twamp client control-connection c1 test-session t1 probe-interval 1 user@router1# set rpm twamp client control-connection c1 test-session t2 target-address 192.0.2.2 user@router1# set rpm twamp client control-connection c1 test-session t1 data-fill-with-zeros user@router1# set rpm twamp client control-connection c1 test-session t1 data-size 1400 user@router1# set rpm twamp client control-connection c1 test-session t1 probe-count 20 user@router1# set rpm twamp client control-connection c1 test-session t1 probe-interval 1 user@router1# set rpm twamp client control-connection c1 test-session t1 thresholds total-loss 10 user@router1# set rpm twamp client control-connection c1 test-session t1 thresholds jitter-gress 20 user@router1# set rpm twamp client control-connection c1 test-session t2 target-address 192.0.3.1 user@router1# set rpm twamp client control-connection c1 test-session t2 data-fill-with-zeros user@router1# set rpm twamp client control-connection c1 test-session t2 data-size 1400 user@router1# set rpm twamp client control-connection c1 test-session t2 probe-count 15 user@router1# set rpm twamp client control-connection c1 test-session t2 probe-interval 1 user@router1# set rpm twamp client control-connection c1 test-session t2 thresholds total-loss 10 user@router1# set rpm twamp client control-connection c1 test-session t2 thresholds jitter-gress 20
To configure the TWAMP server:
Configure the interfaces.
[edit interfaces] user@router1# set si-1/1/0 unit 30 family inet user@router1# set si-1/1/0 unit 30 rpm twamp-server user@router1# set si-1/1/0 unit 30 family inet address 192.02.2/24
Configure the chassis.
[edit chassis] user@router1# set fpc 1 pic 1 inline-services bandwidth 1g
Configure the services.
[edit services] user@router1# set rpm twamp server tcp-keepidle 200 user@router1# set rpm twamp server tcp-keepintvl 20 user@router1# set rpm twamp server tcp-keepcnt 210 user@router1# set rpm twamp server authentication-mode none user@router1# set rpm twamp server server-inactivity-timeout 5 user@router1# set rpm twamp server reflector-inactivity-timeout 15 user@router1# set rpm twamp server max-connection-duration 0 user@router1# set rpm twamp server maximum-sessions 100 user@router1# set rpm twamp server maximum-sessions-per-connection 50 user@router1# set rpm twamp server maximum-connections 500 user@router1# set rpm twamp server maximum-connections-per-client 500 user@router1# set rpm twamp server port 862 user@router1# set rpm twamp server client-list Client1 address 192.168.20.1/24
When the TWAMP server is reachable, the output for Junos OS
is as follows. The TWAMP-Server-Status
is Connected
and the Number-Of-Retries-With-TWAMP-Server
is 1
user@router1> show services rpm twamp client probe-results | no-more Jan 11 11:43:42 Owner: c1, Test: t1 server-address: 192.0.2.2, server-port: 862, Client address: 192.168.20.1, Client port: 58991 TWAMP-Server-Status: Connected, Number-Of-Retries-With-TWAMP-Server: 1 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 20 probes Probe results: Response received Probe sent time: Fri Jan 11 11:43:41 2019 Probe rcvd/timeout time: Fri Jan 11 11:43:41 2019 Rtt: 57 usec, Egress jitter: 1 usec, Ingress jitter: -1 usec, Round trip jitter: 0 usec Egress interarrival jitter: 43 usec, Ingress interarrival jitter: 43 usec, Round trip interarrival jitter: 1 usec Results over current test: ....... ........ Owner: c1, Test: t2 server-address: 192.0.2.2, server-port: 862, Client address: 192.168.20.1, Client port: 58991 TWAMP-Server-Status: Connected, Number-Of-Retries-With-TWAMP-Server: 1 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 15 probes Probe results: Response received Probe sent time: Fri Jan 11 11:43:36 2019 Probe rcvd/timeout time: Fri Jan 11 11:43:36 2019 Rtt: 58 usec, Egress jitter: 1 usec, Ingress jitter: -1 usec, Round trip jitter: 0 usec Egress interarrival jitter: 28 usec, Ingress interarrival jitter: 28 usec, Round trip interarrival jitter: 0 usec Results over current test: Probes sent: 15, Probes received: 15, Loss percentage: 0.000000 Measurement: Round trip time Samples: 15, Minimum: 57 usec, Maximum: 59 usec, Average: 58 usec, Peak to peak: 2 usec, Stddev: 1 usec, Sum: 866 usec Measurement: Positive egress jitter ........ Measurement: Round trip time Samples: 105, Minimum: 57 usec, Maximum: 59 usec, Average: 58 usec, Peak to peak: 2 usec, Stddev: 1 usec, Sum: 6062 usec Measurement: Positive egress jitter Samples: 77, Minimum: 0 usec, Maximum: 398 usec, Average: 12 usec, Peak to peak: 398 usec, Stddev: 63 usec, Sum: 925 usec Measurement: Negative egress jitter Samples: 18, Minimum: 16 usec, Maximum: 431 usec, Average: 69 usec, Peak to peak: 415 usec, Stddev: 91 usec, Sum: 1248 usec Measurement: Positive ingress jitter Samples: 19, Minimum: 0 usec, Maximum: 431 usec, Average: 66 usec, Peak to peak: 431 usec, Stddev: 90 usec, Sum: 1249 usec Measurement: Negative ingress jitter Samples: 76, Minimum: 1 usec, Maximum: 397 usec, Average: 12 usec, Peak to peak: 396 usec, Stddev: 63 usec, Sum: 922 usec Measurement: Positive round trip jitter Samples: 79, Minimum: 0 usec, Maximum: 1 usec, Average: 0 usec, Peak to peak: 1 usec, Stddev: 0 usec, Sum: 26 usec Measurement: Negative round trip jitter Samples: 25, Minimum: 1 usec, Maximum: 1 usec, Average: 1 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 25 usec
After the server is deactivated using the command deactivate
interfaces si-1/1/0 unit 30
, the output is as follows for Junos
OS. The TWAMP-Server-Status
is Not Connected
and the Number-Of-Retries-With-TWAMP-Server
is 12:
user@router1> show services rpm twamp client probe-results control-connection c1 | no-more Jan 11 11:48:24 Owner: c1, Test: t1 server-address: 192.0.2.2, server-port: 862, Client address: 192.168.20.1, Client port: 58991 TWAMP-Server-Status: Not Connected, Number-Of-Retries-With-TWAMP-Server: 12 Reflector address: 192.0.2.2, Reflector port: 14779, Sender address: 192.168.20.1, sender-port: 14779 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 20 probes Probe results: Response received Probe sent time: Fri Jan 11 11:45:38 2019 Probe rcvd/timeout time: Fri Jan 11 11:45:38 2019 Rtt: 55 usec, Egress jitter: -17 usec, Ingress jitter: 18 usec, Round trip jitter: 1 usec Egress interarrival jitter: 37 usec, Ingress interarrival jitter: 37 usec, Round trip interarrival jitter: 0 usec Results over current test: Probes sent: 10, Probes received: 10, Loss percentage: 0.000000 Measurement: Round trip time ......... Samples: 17, Minimum: 0 usec, Maximum: 3 usec, Average: 0 usec, Peak to peak: 3 usec, Stddev: 1 usec, Sum: 4 usec Measurement: Negative round trip jitter Samples: 3, Minimum: 1 usec, Maximum: 3 usec, Average: 2 usec, Peak to peak: 2 usec, Stddev: 1 usec, Sum: 5 usec Results over all tests: Probes sent: 210, Probes received: 210, Loss percentage: 0.000000 ........ TWAMP-Server-Status: Not Connected, Number-Of-Retries-With-TWAMP-Server: 12 Reflector address: 192.0.2.2, Reflector port: 14778, Sender address: 192.168.20.1, sender-port: 14778 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 15 probes Probe results: Response received Probe sent time: Fri Jan 11 11:45:38 2019 Probe rcvd/timeout time: Fri Jan 11 11:45:38 2019 Rtt: 58 usec, Egress jitter: -18 usec, Ingress jitter: 19 usec, Round trip jitter: 0 usec .......... Results over all tests: Probes sent: 160, Probes received: 160, Loss percentage: 0.000000 Measurement: Round trip time Samples: 160, Minimum: 57 usec, Maximum: 59 usec, Average: 58 usec, Peak to peak: 2 usec, Stddev: 1 usec, Sum: 9232 usec Measurement: Positive egress jitter Samples: 119, Minimum: 0 usec, Maximum: 398 usec, Average: 12 usec, Peak to peak: 398 usec, Stddev: 62 usec, Sum: 1398 usec Measurement: Negative egress jitter Samples: 27, Minimum: 16 usec, Maximum: 431 usec, Average: 64 usec, Peak to peak: 415 usec, Stddev: 76 usec, Sum: 1723 usec Measurement: Positive ingress jitter Samples: 28, Minimum: 0 usec, Maximum: 431 usec, Average: 62 usec, Peak to peak: 431 usec, Stddev: 76 usec, Sum: 1727 usec Measurement: Negative ingress jitter Samples: 118, Minimum: 1 usec, Maximum: 397 usec, Average: 12 usec, Peak to peak: 396 usec, Stddev: 62 usec, Sum: 1400 usec Measurement: Positive round trip jitter Samples: 120, Minimum: 0 usec, Maximum: 1 usec, Average: 0 usec, Peak to peak: 1 usec, Stddev: 0 usec, Sum: 39 usec Measurement: Negative round trip jitter Samples: 39, Minimum: 1 usec, Maximum: 1 usec, Average: 1 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 39 usec
After activating the server using the activate interfaces
si-1/1/0 unit 30
command the output is as follows for Junos
OS. The TWAMP-Server-Status
is Connected
and the Number-Of-Retries-With-TWAMP-Server
is 12.
user@router1> show services rpm twamp client probe-results control-connection c1 | no-more Jan 11 11:48:50 Owner: c1, Test: t1 server-address: 192.0.2.2, server-port: 862, Client address: 192.168.20.1, Client port: 58991 TWAMP-Server-Status: Connected, Number-Of-Retries-With-TWAMP-Server: 12 Reflector address: 192.0.2.2, Reflector port: 14963, Sender address: 192.168.20.1, sender-port: 14963 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 20 probes Probe results: Response received Probe sent time: Fri Jan 11 11:48:50 2019 Probe rcvd/timeout time: Fri Jan 11 11:48:50 2019 ..... Results over all tests: Probes sent: 218, Probes received: 218, Loss percentage: 0.000000 Measurement: Round trip time Samples: 218, Minimum: 54 usec, Maximum: 59 usec, Average: 56 usec, Peak to peak: 5 usec, Stddev: 1 usec, Sum: 12160 usec ...... Owner: c1, Test: t2 server-address: 192.0.2.2, server-port: 862, Client address: 192.168.20.1, Client port: 58991 TWAMP-Server-Status: Connected, Number-Of-Retries-With-TWAMP-Server: 12 Reflector address: 192.0.2.2, Reflector port: 14962, Sender address: 192.168.20.1, sender-port: 14962 Routing Instance Name: IN Destination interface name: si-2/2/0.10 Test size: 15 probes Probe results: Response received Probe sent time: Fri Jan 11 11:48:50 2019 Probe rcvd/timeout time: Fri Jan 11 11:48:50 2019 Rtt: 57 usec, Egress jitter: 2 usec, Ingress jitter: -3 usec, ...... Results over all tests: Probes sent: 168, Probes received: 168, Loss percentage: 0.000000 Measurement: Round trip time Samples: 168, Minimum: 57 usec, Maximum: 59 usec, Average: 58 usec, Peak to peak: 2 usec, Stddev: 1 usec, Sum: 9691 usec Measurement: Positive egress jitter Samples: 124, Minimum: 0 usec, Maximum: 398 usec, Average: 11 usec, Peak to peak: 398 usec, Stddev: 61 usec, Sum: 1406 usec Measurement: Negative egress jitter Samples: 29, Minimum: 16 usec, Maximum: 431 usec, Average: 62 usec, Peak to peak: 415 usec, Stddev: 74 usec, Sum: 1806 usec Measurement: Positive ingress jitter Samples: 30, Minimum: 0 usec, Maximum: 431 usec, Average: 60 usec, Peak to peak: 431 usec, Stddev: 74 usec, Sum: 1811 usec Measurement: Negative ingress jitter Samples: 123, Minimum: 1 usec, Maximum: 397 usec, Average: 11 usec, Peak to peak: 396 usec, Stddev: 61 usec, Sum: 1410 usec Measurement: Positive round trip jitter Samples: 125, Minimum: 0 usec, Maximum: 1 usec, Average: 0 usec, Peak to peak: 1 usec, Stddev: 0 usec, Sum: 42 usec Measurement: Negative round trip jitter Samples: 42, Minimum: 1 usec, Maximum: 1 usec, Average: 1 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 42 usec