Vous êtes sur la page 1sur 13

sth::emulation_twamp_config

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

Creates TWAMP client on the provided device hand

le
when type is client and it creates TWAMP client
on
the provided device handle when type is server
modify

Changes the configuration for TWAMP client and


TWAMP server when type is client and server resp

delete

Deletes TWAMP client or TWAMP server based on th

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

The default value is 100


-connection_retry_interval
Number of seconds to wait between connection attempts
Value Range: 10-300
The default value is 30
-ipv6_if_type
Specifies source IPv6 Address Type for TWAMP Client
Possible values:
linklocal
Takes link local IPv6 address from emulated devic
e
global
Takes global address from emulated device
The default value is global.
-ip_version
Specifies the IP version of TWAMP client.
Possible values: ipv4 ipv6,
The default value is ipv4
-peer_ipv4_addr
IPv4 address of the peer (the DUT port)
Input value must be in the IPv4 format.
-peer_ipv6_addr
IPv6 address of the peer (the DUT port)
Input value must be in the IPv6 format.
-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 on the Processor for
large-scale testing
Default: normal
-server_ipv6_if_type
Specifies source IPv6 Address Type for TWAMP Server
Possible values:
linklocal
takes link local IPv6 address from emulated devi
ce
global
takes global address from emulated device
The default value is global
-server_ip_version
Specifies the IP version of TWAMP server.
Possible values: ipv4 ipv6,
The default value is ipv4
-server_mode
The security mode. Currently Spirent HLTAPI only supports on
e mode.
Possible values: unauthenticated,
The default value is unauthenticated

-server_willing_to_participate
Sets the bit value bit in the modes field
Possible Values: true, false
Return Values
handle

handle of TWAMP client when type is client and handle o

f
status
log

TWAMP server when type is server.


Success (1) or failure (0) of the operation
it will be returned only when the status is 0

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

Creates TWAMP client session on the provided dev

modify

Changes the configuration for TWAMP client sessi

delete

Deletes TWAMP client session.

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

Number of packets to run the test session. This argument is only


valid
when duration_mode is set to packets.
Value Range: 0 - 4294967295
Default: 100
-padding_len
Number of octets to be appended to a normal One-Way Active Measu
rement
Protocol Test (OWAMP-Test) packet
Value Range: 27 - 9000
Default: 128
-padding_pattern
Type of data to be used for padding
Possible Values:
user_defined
when padding_pattern is user_defined, we can spe
cify
random

Bit pattern for filling the padding


when padding_pattern is random, takes random for

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

Stops the TWAMP emulation. For a TWAMP server,


closes the control connection to the client and 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

Starts TWAMP emulation. For a TWAMP server, sets


the server to listen to incoming TCP connections fro

m
clients on port 862. For a TWAMP client,initializes
a
control connection to the server.
request_twamp_session

Sends a Request-TW-Session message.


Only valid for TWAMP clients.

start_twamp_sessions

Sends a Start-Session message followed


by TWAMP-Test packets. Only valid for TW

stop_twamp_sessions

Sends a Stop-Sessions message and stops

AMP clients.
sending
TWAMP-Test packets. Only valid for TWAMP
clients.
pause_twamp_session_traffic

Stops sending TWAMP-Test packets

to simulate
a broken connection. Only valid
for TWAMP clients.

resume_twamp_session_traffic

Resumes sending TWAMP-Test packe

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

Success (1) or failure (0) of the operation.


it will be returned only when the status is 0.

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

Success (1) or failure (0) of the operation.


it will be returned only when the status is 0.

Depending on the results mode, the following keys will be returned with valu
es:
When mode is test_session:
----------------------------------------------------Field
Description
----------------------------------------------------avg_jitter

Average jitter reported in microseconds.

avg_latency

Average latency reported in microseconds.

avg_server_processing_time
icroseconds.
max_latency
max_server_processing_time
icroseconds.

Average server processing time reported in m


Maximum latency reported in microseconds.
Maximum server processing time reported in m

max_jitter

Minimum jitter reported in microseconds.

min_latency

Minimum latency reported in microseconds.

min_server_processing_time
icroseconds.
min_jitter

Minimum server processing time reported in m


Minimum jitter reported in microseconds.

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

Number of Request-TW-Session messages received.

rx_start_sess_cnt

Number of Start-Session messages received.

rx_stop_sess_cnt

Number of Stop-Session messages received.

State

state of TWAMP server


Possible Values:
IDLE
when server is idle
STARTED when server is started

tx_accept_sess_cnt

Number of Accept-Session messages sent.

tx_failed_sess_cnt

Number of Stop-Session messages sent


with a non-zero Accept value.
Number of Start-Ack messages sent.

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

Number of Accept-Session messages received.

rx_failed_sess_cnt

Number of Stop-Session messages received with


a non-zero Accept value.
Number of Start-Ack messages received.

rx_start_ack_cnt
state

State of the Twamp


Possible Values
IDLE
WAIT_FOR_RECONNECT
CONNECT
ESTABLISHED
SESSIONS_REQUESTED

client
Idle
Waiting for reconnection
Connecting
Established
Test sessions requested

tx_req_tw_sess_cnt

Number of Request-TW-Session messages sent.

tx_start_sess_cnt

Number of Start-Session messages sent.

tx_stop_sess_cnt

Number of Stop-Session messages sent.

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

Number of TWAMP test sessions in progress.

idle_cnt

Number of TWAMP control sessions that do not have


test sessions running.

sess_requested_cnt

Number of TWAMP test sessions requested.

connections_down_cnt

Number of TWAMP control sessions rejected.

connections_up_cnt

Number of TWAMP control sessions accepted.

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

Number of Request-TW-Session messages received.

rx_start_sess_cnt

Number of Start-Session messages received.

rx_stop_sess_cnt

Number of Stop-Session messages received.

tx_accept_sess_cnt

Number of Accept-Session messages sent.

tx_failed_sess_cnt
zero Accept value.
tx_start_ack_cnt

Number of Stop-Session messages sent with a nonNumber of Start-Ack messages sent.

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

Number of Accept-Session messages received.

rx_failed_sess_cnt

Number of Stop-Session messages received with a


non-zero Accept value.

rx_start_ack_cnt

Number of Start-Ack messages received.

tx_req_tw_sess_cnt

Number of Request-TW-Session messages sent.

tx_start_sess_cnt

Number of Start-Session messages sent.

tx_stop_sess_cnt

Number of Stop-Session messages sent.

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

Average jitter reported in microseconds.

avg_latency

Average latency reported in microseconds.

avg_server_processing_time
Average server processing time reported in microseco
nds.
max_latency

Maximum latency reported in microseconds.

max_server_processing_time
Maximum server processing time reported in microseco
nds.
max_jitter

Minimum jitter reported in microseconds.

min_latency

Minimum latency reported in microseconds.

min_server_processing_time
Minimum server processing time reported in microseco
nds.
min_jitter

Minimum jitter reported in microseconds.

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\ ]

set state [keylget result_server_state $devicehandle2.state]


}
set result_server [sth::emulation_twamp_stats\
-handle
$devicehandle2\
-mode
server\ ]

Vous aimerez peut-être aussi