Académique Documents
Professionnel Documents
Culture Documents
Purpose:
Creates, modifies, or deletes an TWAMP client/server on the specified device
Synopsis:
sth::emulation_twamp_config
[-handle <device_handle>]
[-mode {create modify delete}]
[-type {server client}]
[-connection_retry_cnt <0-65535>]
[-connection_retry_interval <10-300>]
[-ipv6_if_type {global linklocal}]
[-ip_version {ipv4 ipv6}]
[-peer_ipv4_addr <IPV4 address>]
[-peer_ipv6_addr <IPV6 address>]
[-scalability_mode {discard_test_session_statistics normal}]
[-server_ipv6_if_type {global linklocal}]
[-server_ip_version {ipv4 ipv6}]
[-server_mode {unauthenticated}]
[-server_willing_to_participate {true false}]
Arguments:
-handle
Specifies Device handle on which TWAMP client/server will get
created. This argument is mandatory create, modify or delete mod
es.
-mode
Specifies the action to perform. Possible values are create,modi
fy
and delete. This argument is mandatory. The modes are described
below: Possible values are:
create
le
when type is client and it creates TWAMP client
on
the provided device handle when type is server
modify
delete
ectively
e device
handle passed to argument
handle?
-type
Specifies the type of TWAMP to be configured. This argument is
mandatory. Possible values are client and server.
client TWAMP client
server TWAMP server
-connection_retry_cnt
Number of times to attempt a connection before timing out
Value Range: 0-65535
-server_willing_to_participate
Sets the bit value bit in the modes field
Possible Values: true, false
Return Values
handle
f
status
log
Examples
#To create a TWAMP client on device1
set device_ret2 [sth::emulation_twamp_config\
-mode
-handle
create\
$devicehandl
e1\
-type
-connection_retry_cnt
-ip_version
-peer_ipv4_addr
-scalability_mode
-connection_retry_interval
client\
200\
ipv4\
192.85.1.1\
normal \
40 \
]
#To create a TWAMP twamp server on device2
set device_ret3 [sth::emulation_twamp_config\
-mode
-handle
create\
$devicehandle2
\
-type
-server_ip_version
-server_mode
server\
ipv4 \
unauthenticate
-server_willing_to_participate
true\
d \
]
Note: Need to use sth::emulation_device_config to create devices and get han
dles
$devicehandle1 and $devicehandle2
################################################################################
######################
sth::emulation_twamp_session_config
Purpose:
Creates, modifies, or deletes an TWAMP session on the specified TWAMP client
device
Synopsis:
sth::emulation_twamp_session_config
[-handle <device_handle session_handle>]
[-mode {create modify delete}]
[-dscp <0-63>]
[-duration <0 - 4294967295>]
[-duration_mode {continuous | packets | seconds}]
[-frame_rate <1-1000>]
[-pck_cnt <0 - 4294967295>]
[-padding_len <27-9000>]
[-padding_pattern {random | user_defined}]
[-padding_user_defined_pattern <ANY>]
[-scalability_mode {discard_test_session_statistics normal}]
[-session_name <String Name>]
[-session_dst_udp_port <1-65535>]
[-session_src_udp_port <1-65535>]
[-start_delay <0 - 4294967295>]
[-timeout <0 - 4294967295>]
[-ttl <1-255>]
Arguments:
-handle
Specify device handle on which twamp client is created when mode
is
create. specify session handle when mode is modify and delete.
-mode
Specifies the action to perform. Possible values are create,modif
y and
delete. This argument is mandatory. The modes are described below
:
create
modify
delete
ice handle.
on.
-dscp
Differentiated Service Code Point value
Value Range: 0-63
The default value is 0
-duration
Number of seconds to run the test session. This argument is only
valid
when duration_mode is set to seconds.
Value Range: 0 - 4294967295
The default value is 60
-duration_mode
Determines how the test duration is defined
Possible Values: seconds, packets, continuous
Default: seconds
-frame_rate
Rate at which to send TWAMP-Test packets in frames per second
Value Range: 1-1000
The default value is 10
-pck_cnt
mat of the
padding pattern
Default: random
-padding_user_defined_pattern
Bit pattern for filling the padding. This argument is only valid
when
padding_pattern is set to user_defined.
Default Value: 0x0000
-scalability_mode
Enables or disables test session result collection
Possible Values:
normal
Include the test session res
ult collection
discard_test_session_statistics
Discard the test session res
ult collection
This can reduce the demand o
n
the processor for large-scal
e testing
Default: normal
-session_name
A text name for the test session
-session_dst_udp_port
UDP port to which TWAMP-Test packets are sent by the Session-Ref
lector
Value Range: 1-65535
The default value is 5450
-session_src_udp_port
UDP port from which TWAMP-Test packets are sent by the Session-S
ender
Value Range: 1-65535
The default value is 5450
-start_delay
Number of seconds to wait between receiving an Accept-Session me
ssage and
sending the first TWAMP-Test packet
Value Range: 0 - 4294967295
Default: 5
-timeout
Number of seconds that the Session-Reflector waits after receivi
ng a
Stop-Sessions message
Value Range: 0 - 4294967295
Default: 5
-ttl
Specifies the value for time to live
Value Range: 1-255
The default value is 255
Return Values
handle
returns handle of twamp client test session when mode is create.
status
Success (1) or failure (0) of the operation.
log
it will be returned only when the status is 0.
Examples:
#To create a session on the specified TWAMP client:
set device_ret4 [sth::emulation_twamp_session_config\
-mode
-handle
-dscp
-duration
-duration_mode
-frame_rate
-pck_cnt
-padding_len
-session_dst_udp_port
-session_src_udp_port
-start_delay
-timeout
-ttl
-padding_pattern
-scalability_mode
create\
$devicehandle1\
2\
120\
seconds\
50\
200\
140\
5450\
5451\
6\
60\
254\
random\
normal\ ]
################################################################################
######################
sth::emulation_twamp_control
Purpose:
Controls TWAMP clients or servers
Synopsis:
sth::emulation_twamp_control
[-handle <device_handle>]
[-port_handle <port_handle>]
[-mode {start | stop | establish | request_twamp_sessions |
start_twamp_sessions | stop_twamp_sessions pause_twamp_session_traff
ic |
resume_twamp_session_traffic}]
[-delay_time <0 - 4294967295>]
Arguments:
-handle
Specifies TWAMP client or server handle that will be controlled
-port_handle
Specifies port handle on which the TWAMP devices will be control
led.
Cannot be used when -handle is used.
-mode
Specifies the type of the action to perform on the devices. This
argument is mandatory
Possible Values:
start
Starts the TWAMP emulation. For a TWAMP server,sets
the
server to listen to incoming TCP connections from cl
ients
on port 862. For a TWAMP client, initializes a contr
ol
connection to the server. After the connection is
established,sends Request-TW-Session message and
Start-Session message.
stop
s
listening for additional incoming connection request
s.
For a TWAMP client, stops all test sessions and clos
es
the control connection to the server.
establish
m
clients on port 862. For a TWAMP client,initializes
a
control connection to the server.
request_twamp_session
start_twamp_sessions
stop_twamp_sessions
AMP clients.
sending
TWAMP-Test packets. Only valid for TWAMP
clients.
pause_twamp_session_traffic
to simulate
a broken connection. Only valid
for TWAMP clients.
resume_twamp_session_traffic
ts after
pausing the TWAMP session traffi
c.
Only valid for TWAMP clients.
-delay_time
Number of seconds to wait before sending TWAMP-Test packets. Thi
s
argument is only valid when action is set to start_twamp_session
s.
Return Values
status
log
Examples:
#To start a TWAMP server
set server_start [sth::emulation_twamp_control\
-handle
$devicehandle2\
-mode
start\ ]
#To start TWAMP client
set client_start [sth::emulation_twamp_control\
-handle
$devicehandle1\
-mode
start\ ]
################################################################################
######################
sth::emulation_twamp_stats
Purpose
Returns specified TWAMP statistics
Synopsis:
sth::emulation_twamp_stats
[-handle <device_handle>]
[-port_handle <port_handle>]
[-mode {state_summary | client server | test_session | port_test_session
|
aggregated_client | aggregated_server}]
Arguments:
-handle
Specifies TWAMP client or server device handle that will be
controlled
-port_handle
Specifies port handle on which the TWAMP devices will be control
led.
Cantnot be used when -handle is used.
-mode
The statistics mode for the configured TWAMP. This argument is
mandatory.
Possible Values:
client
TWAMP client results
server
TWAMP server results
test_session
TWAMP test session results
state_summary
TWAMP state results
aggregated_client TWAMP port aggregated client results
aggregated_server TWAMP port aggregated server results
port_test_session TWAMP port aggregated test session results
Return Values
status
log
Depending on the results mode, the following keys will be returned with valu
es:
When mode is test_session:
----------------------------------------------------Field
Description
----------------------------------------------------avg_jitter
avg_latency
avg_server_processing_time
icroseconds.
max_latency
max_server_processing_time
icroseconds.
max_jitter
min_latency
min_server_processing_time
icroseconds.
min_jitter
Sample output:
{host1 {{1 {{state INPROGRESS} {min_server_processing_time 2.9997900946}
{min_jitter 0.0947595275999902} {max_latency 4888.7419541495} {avg_latency
385.634075224945} {max_server_processing_time 42.99986293395}
{avg_server_processing_time 3.90568675110269} {min_latency 160.38497707475}
{max_jitter 4508.2419847165} {avg_jitter 169.303826100785}}} {2 {{state
INPROGRESS} {min_server_processing_time 0} {min_jitter 0.198007641749996}
{max_latency 4796.8849847165} {avg_latency 443.271588829106}
{max_server_processing_time 32.00001170535} {avg_server_processing_time
1.7784448535283} {min_latency 203.62999235825} {max_jitter 4254.02} {avg_jit
ter
196.97011539471}}}}}
-------------------------------------------------------------When mode is server:
----------------------------------------------------Field
Description
-----------------------------------------------------
rx_req_tw_sess_cnt
rx_start_sess_cnt
rx_stop_sess_cnt
State
tx_accept_sess_cnt
tx_failed_sess_cnt
tx_start_ack_cnt
Sample output:
{host3 {{state STARTED} {tx_accept_sess_cnt 2} {rx_stop_sess_cnt 0}
{rx_start_sess_cnt 1} {rx_req_tw_sess_cnt 2} {tx_failed_sess_cnt 0}
{tx_start_ack_cnt 1}}} {status 1}
----------------------------------------------------------When mode is client:
----------------------------------------------------Field
Description
----------------------------------------------------rx_accept_sess_cnt
rx_failed_sess_cnt
rx_start_ack_cnt
state
client
Idle
Waiting for reconnection
Connecting
Established
Test sessions requested
tx_req_tw_sess_cnt
tx_start_sess_cnt
tx_stop_sess_cnt
Sample output:
{host2 {{state SESSIONS_REQUESTED} {rx_start_ack_cnt 1} {tx_stop_sess_cnt 0}
{tx_start_sess_cnt 1} {tx_req_tw_sess_cnt 2} {rx_accept_sess_cnt 2}
{rx_failed_sess_cnt 0}}} {status 1}
--------------------------------------------------------------When mode is state_summary:
----------------------------------------------------Field
Description
----------------------------------------------------connect_cnt
Number of TWAMP test sessions accepted.
established_cnt
idle_cnt
sess_requested_cnt
connections_down_cnt
connections_up_cnt
Sample output:
{port1 {{established_cnt 0} {idle_cnt 0} {connections_down_cnt 0} {connect_c
nt 0}
{sess_requested_cnt 2} {connections_up_cnt 2}}} {port2 {{established_cnt 0}
{idle_cnt 0} {connections_down_cnt 0} {connect_cnt 0} {sess_requested_cnt 0}
{connections_up_cnt 2}}} {status 1}
-------------------------------------------------When mode is aggregated_server
----------------------------------------------------Field
Description
----------------------------------------------------rx_req_tw_sess_cnt
rx_start_sess_cnt
rx_stop_sess_cnt
tx_accept_sess_cnt
tx_failed_sess_cnt
zero Accept value.
tx_start_ack_cnt
Sample output:
{port2 {{tx_accept_sess_cnt 4} {rx_stop_sess_cnt 0} {rx_start_sess_cnt 2}
{rx_req_tw_sess_cnt 4} {tx_failed_sess_cnt 0} {tx_start_ack_cnt 2}}} {status
1}
------------------------------------------------------------------------------When mode is aggregated_client:
----------------------------------------------------Field
Description
----------------------------------------------------rx_accept_sess_cnt
rx_failed_sess_cnt
rx_start_ack_cnt
tx_req_tw_sess_cnt
tx_start_sess_cnt
tx_stop_sess_cnt
Sample output:
{port1 {{rx_start_ack_cnt 2} {tx_stop_sess_cnt 0} {tx_start_sess_cnt 2}
{tx_req_tw_sess_cnt 4} {rx_accept_sess_cnt 4} {rx_failed_sess_cnt 0}}} {stat
us 1}
------------------------------------------------When mode is port_test_session:
----------------------------------------------------Field
Description
----------------------------------------------------avg_jitter
avg_latency
avg_server_processing_time
Average server processing time reported in microseco
nds.
max_latency
max_server_processing_time
Maximum server processing time reported in microseco
nds.
max_jitter
min_latency
min_server_processing_time
Minimum server processing time reported in microseco
nds.
min_jitter
Sample output:
{port1 {{min_server_processing_time 0} {min_jitter 0.00499999999999545}
{max_latency 2903.07999235825} {avg_latency 386.015483591499}
{max_server_processing_time 51.9999317097} {avg_server_processing_time
1.8580093887173} {min_latency 120.88021754715} {max_jitter 2681.8527900946}
{avg_jitter 159.769369268522}}} {port2 {{min_server_processing_time 0}
{min_jitter 0} {max_latency 0} {avg_latency 0} {max_server_processing_time 0
}
{avg_server_processing_time 0} {min_latency 0} {max_jitter 0} {avg_jitter 0}
}}
{status 1}
Examples:
#To get the results of server when state is started
while { $state != "STARTED" } {
set result_server_state [sth::emulation_twamp_stats\
-handle
$devicehandle2\
-mode
server\ ]