SyncE Functions

sth::emulation_synce_config

Purpose

Spirent Extension (for Spirent HLTAPI only).

Creates, modifies, or resets Synchronous Ethernet (SyncE) devices for the specified Spirent HLTAPI port. SyncE refers to a set of ITU-T recommendations designed to allow packet networks and circuit-switched networks (TDM, SONET, and SDH) to interwork.

Spirent HLTAPI allows you to create complex tests to validate SyncE implementations.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_synce_config
  [-mode {create|modify|reset}  M]
  [-port_handle <port_handle>]
  [-handle <handle>]
  [-ip_version {6 | 4_6}]
  [-ipv6_enable_gateway_learning {true | false}]
  [-encap {ethernet_ii | ethernet_vlan}]
  [-count <1-65536>]
  [-device_name <ANY>]
  [-mac_addr <aa:bb:cc:dd:ee:ff>]
  [-mac_addr_step <aa:bb:cc:dd:ee:ff>]
  [-local_ipv4_addr <a.b.c.d>]
  [-local_ipv4_addr_step <a.b.c.d>]
  [-local_ipv4_prefix_len <0-32>]
  [-gateway_ipv4_addr <a.b.c.d>]
  [-gateway_ipv4_addr_step <a.b.c.d>]
  [-link_local_ipv6_prefix_len <0-128>]
  [-link_local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-link_local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_prefix_len <0-128>]
  [-gateway_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-gateway_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-vlan_id <0-4095>]
  [-vlan_id_mode {fixed | increment}]
  [-vlan_id_step <0-4094>]
  [-vlan_id_repeat_count <0-4294967295>]
  [-vlan_id_recycle_count <0-4294967295>]
  [-vlan_cfi {0 | 1}]
  [-vlan_priority <0-7>]
  [-vlan_outer_id <0-4095>]
  [-vlan_outer_id_mode {fixed | increment}]
  [-vlan_outer_user_priority <0-7>]
  [-vlan_id_outer_count <1-4096>]
  [-vlan_id_outer_step <0-4094>]
  [-vlan_outer_id_repeat_count <0-4294967295>]
  [-vlan_outer_id_recycle_count <0-4294967295>]
  [-vlan_outer_cfi {0 | 1}]
  [-option_type {option1 | option2}]
  [-quality_level  {QL-PRC | QL-SSU-A |
                  QL-SSU-B | QL-SEC | QL-DNU | QL-STU | QL-PRS | QL-TNC |
                  QL-ST2 | QL-ST3 | QL-SMC | QL-ST3E | QL-PROV | QL-DUS }]
  [-rate <0-20>]

Arguments

-handle

Specifies the SyncE handle to be returned from this function. This argument is Mandatory for modes modify and reset.

-port_handle

Specifies the port on which to create the SyncE emulation. This argument is Mandatory for mode create.

-mode

Specifies the action to be taken. Possible values are create, modify, and reset. This argument is Mandatory . Possible values are described below:

create  Starts emulating SyncE devices on the specified
        port

modify  Changes the configuration for the emulated
        SyncE devices identified by the -handle
        argument. You must specify the -handle argument.

reset   Deletes the emulated SyncE device. You
        must specify the -handle argument.
-ip_version

Defines the IP version to be used. Possible values are 4 for IPv4, 6 for IPv6, and 4_6 for dual stack. The default is 6.

-ipv6_enable_gateway_learning

Enables or disables IPv6 learning for gateway IP addresses and MAC addresses. Possible values are true (enable) and false (disable). The default value is false.

-encap

Specifies the type of Layer 2 encapsulation. Possible values are described below:

ethernet_ii       Ethernet II

ethernet_vlan      Ethernet II with a single VLAN tag

ethernet_ii_qinq   Ethernet II with two VLAN tags. This option
                   supports Ethernet encapsulation.

The default value is ethernet_ii.

-count

Specifies the number of devices to emulate. Possible values range from 1 to 65536. The default value is 1.

-device_name

Specifies the name of the emulated device

-mac_addr

Specifies the first MAC address to use. Each client must have a unique source MAC address. The value must be in MAC format. The default value is 00:10:94:00:00:01.

-mac_addr_step

Specifies the increment used to generate additional MAC addresses for SyncE hosts. The default value is 00:00:00:00:00:01.

-local_ipv4_addr

Specifies the starting IPv4 address of the emulated devices. The value must be in IPv4 format. The default value is 192.85.1.3. This argument is only available when -ip_version is set to 4_6.

-local_ipv4_addr_step

Specifies the increment used to generate IPv4 addresses for multiple devices. The value must be in IPv4 format. The default value is 0.0.0.1. This argument is only available when -ip_version is set to 4_6.

-local_ipv4_prefix_len

Specifies the IPv4 address prefix length. Possible values range from 0 to 32. The default value is 24. This argument is only available when -ip_version is set to 4_6.

-gateway_ipv4_addr

Specifies the first IPv4 gateway address for the emulated devices. The value must be in IPv4 format. The default value is 192.85.1.1. This argument is only available when -ip_version is set to 4_6.

-gateway_ipv4_addr_step

Specifies the increment used to generate IPv4 gateway addresses for multiple devices. The value must be in IPv4 format. The default value is 0.0.0.0. This argument is only available when -ip_version is set to 4_6.

Specifies the starting link local IPv6 address for emulated devices. The value must be in IPv6 format. The default is FE80::1.

Specifies the difference between link local IPv6 addresses of consecutive devices when multiple emulated devices are created. The value must be in IPv6 format. The default is ::1.

Specifies the prefix length for the link local IPv6 address of the emulated device. Possible values range from 0 to 128. The default is 64.

-local_ipv6_addr

Specifies the starting address of the emulated IPv6 devices. The value must be in IPv6 format. The default value is 2001::2.

-local_ipv6_addr_step

Specifies the increment used to generate IPv6 gateway addresses for multiple devices. The value must be in IPv6 format. The default value is 0::1.

-local_ipv6_prefix_len

Specifies the IPv6 address prefix length. Possible values range from 0 to 128. The default value is 64.

-gateway_ipv6_addr

Configures the first IPv6 gateway address for the emulated IPv6 devices. The value must be in IPv6 format. The default value is ::0.

-gateway_ipv6_addr_step

Defines the increment used to generate IPv6 gateway addresses for multiple devices. The value must be in IPv6 format. The default value is ::.

-vlan_id

The VLAN ID of the first VLAN sub-interface. Possible values range from 0 to 4095. The default value is 1.

-vlan_id_mode

Specifies the VLAN ID assignment mode for configurations of multiple devices when -count is greater than 1. Possible values are described below:

fixed       The VLAN ID (the value of the -vlan_id argument)
            is the same for all devices.

increment   Spirent HLTAPI assigns unique VLAN IDs.
            When you use this mode, you must also specify
            -vlan_id_step to define the increment value.
-vlan_id_step

The value that Spirent HLTAPI uses to increment the VLAN ID. Possible values range from 0 to 4094. The default value is 1.

-vlan_id_repeat_count

Number of times to repeat the same IPv4 address before incrementing it for the inner VLAN. The value must be an integer. The default value is 0.

-vlan_id_recycle_count

Number of times to increment the IPv4 address before returning to the starting value. The value must be an integer. The default value is 0.

-vlan_cfi

Sets the Canonical Format Indicator (CFI) field in VLAN for the emulated router node. Possible values are 0 (Ethernet) and 1 (Token Ring). The default is 1. If set to 0, it indicates the network is Ethernet. If set to 1, it indicates the network is Token Ring and packets are dropped by Ethernet ports.

-vlan_priority

VLAN priority for the VLANs on this port. Possible values range from 0 to 7. The default value is 0.

-vlan_outer_id

Specifies the starting outer VLAN ID for the QinQ encapsulation. Possible values range from 0 to 4095. The default value is 100. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_id_outer_step

Specifies the step value to increment the outer VLAN IDs. Possible values range from 0 to 4095. The default value is 1. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_id_outer_count

Defines the number of outer VLAN IDs to use when creating SyncE devices. VLAN membership is assigned in round-robin fashion. The number of sessions must be divided evenly into the outer VLAN count. Possible values range from 1 to 4096. The default value is 1. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_id_repeat_count

Number of times to repeat the same IPv4 address before incrementing it for the outer VLAN. The value must be an integer. The default value is 0.

-vlan_outer_id_recycle_count

Number of times to increment the IPv4 address before returning to the starting value. The value must be an integer. The default value is 0.

-vlan_outer_cfi

Specifies the Canonical Format Indicator (CFI) value for the VLAN outer header. Possible values are 0 and 1. The default value is 0. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_user_priority

Specifies the VLAN priority to assign to the outer VLAN header. Possible values range from 0 to 7. The default value is 0. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_id_mode

Specifies how Spirent HLTAPI assigns VLAN tags to packets in the specified outer header when router count is greater than 1. Possible values are:

fixed            The outer VLAN ID is the same for all packets.
            The fixed outer VLAN ID is the value of the
            -vlan_outer_id argument.

increment   For all packets, the outer VLAN tag ID
            increments by the step specified in the
            -vlan_outer_id_step argument.

This argument is available when -encapsulation is set to ethernet_ii_qinq.

-option_type

Specifies the SyncE option type. Possible values are:

option1   European synchronization network
option2   United States synchronization network

The default value is option2.

-quality_level

Specifies the SyncE quality level. Available quality level options depend on the value of -option_type. When option_type is option1, following values are available:

QL-PRC      Primary reference clock
QL-SSU-A    Synchronization supply unit A
QL-SSU-B    Synchronization supply unit B
QL-SEC      SDH equipment clock
QL-DNU      Do not use

When option_type is option2, following values are available:

QL-STU   Synchronization traceability unknown
QL-PRS   Primary reference source
QL-TNC    Transit node clock
QL-ST2   Stratum 2
QL-ST3   Stratum 3
QL-SMC  SONET minimum clock
QL-ST3E  Stratum 3 enhanced
QL-PROV Provisionable by network operator
QL-DUS   Do not use for synchronization

The default value is QL-PRS.

-rate

Specifies the clock rate, in number of messages to send per second. Possible values range from 0 to 20. The default value is 1.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle                A list of handles that identify the device emulation
                      created by the ``sth::emulation_synce_config`` function

synce_device_handle   A list of handles that identify the SyncE device emulation
                      created by the ``sth::emulation_synce_config`` function

port_handle           The port handle on which SyncE devices are configured

status                 $SUCCESS or $FAILURE

log                   An error message (if the operation failed)

Description

The sth::emulation_synce_config function creates, modifies, or deletes SyncE device emulations. Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.)

When you create SyncE devices, you must use the -port_handle argument to specify the Spirent HLTAPI port that the emulated SyncE devices will use. (The port handle value is contained in the keyed list returned by the sth::connect function.) In addition to specifying -port_handle, you can provide one or more of the following arguments when you create SynCE devices or use their default values:

-count
-ip_version
-option_type
-quality_level
-rate

In the modify mode, you can change the configuration of the created SyncE devices except for these arguments:

-port_handle,
-encap
-ip_version
-count

In the reset mode, you can remove the created device. If a creation, configuration, or deletion fails, Spirent HLTAPI returns an error message. For example, if the user tries to modify a non-existing session handle, an error message will be returned.

Examples

The following example creates SyncE device emulation on dual stack:

set device_ret0 [sth::emulation_synce_config\
      -mode                                         create\
      -ip_version                                   4_6\
      -encap                                        ethernet_ii\
      -port_handle                                  $port1\
      -gateway_ipv6_addr                            6001::1 \
      -local_ipv6_addr                              6001::2 \
      -local_ipv6_addr_step                         ::1 \
      -link_local_ipv6_prefix_len                   64 \
      -link_local_ipv6_addr_step                    ::1 \
      -link_local_ipv6_addr                         fe80::4 \
      -mac_addr                                     00:10:74:00:01:01 \
      -mac_addr_step                                00:00:00:00:00:01 \
      -local_ipv4_addr_step                         0.0.0.1 \
      -local_ipv4_prefix_len                        24 \
      -gateway_ipv4_addr_step                       0.0.0.0 \
      -gateway_ipv4_addr                            192.85.1.2 \
      -local_ipv4_addr                              192.85.1.1 \
      -quality_level                                QL-STU \
      -rate                                         8 \
      -use_partial_block_state                      false\
      -option_type                                  option2\
]

Sample Output:

{port_handle port1} {handle emulateddevice1}
{synce_device_handle syncethdeviceconfig1} {status 1}

sth::emulation_synce_control

Purpose

Spirent Extension (for Spirent HLTAPI only).

Starts, stops, or deletes the SyncE emulation on the specified device or port

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_synce_control
   [-port_handle <port_handle_list>]
   [-handle <device_handle_list> ]
   [-action {start | stop | delete}   M]

Arguments

-action

Specifies the action to be performed. This argument is Mandatory . Possible values are described below:

start     Starts the SyncE emulation
stop      Stops the SyncE emulation
delete    Deletes the SyncE configuration
-port_handle

Specifies a list of ports on which to perform the action. You must specify -handle or -port_handle, but not both.

-handle

Specifies a list of devices on which to perform the action. You must specify -handle or -port_handle, but not both.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status                 $SUCCESS or $FAILURE

log                   An error message (if the operation failed)

Description

The sth::emulation_synce_control function controls the starting and stopping of SyncE devices. It also provides an option to delete SyncE configurations from the selected ports or devices.

Examples

The following example starts SyncE devices on port1 and port2:

set ctrl_ret1 [sth::emulation_synce_control    \
        -port_handle                 "$port1 $port2"\
        -action                       start\
]

Sample Output:

{status 1}

sth::emulation_synce_stats

Purpose

Spirent Extension (for Spirent HLTAPI only).

Retrieves SyncE statistics

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_synce_stats
  [-port_handle <port_handle>]
  [-handle <device_handle>]
  [-mode {port|device|option1|option2}  M]

Arguments

-handle

Specifies the handle of the device on which to retrieve statistics. If no handle is specified, then statistics for all devices configured on the port will be returned. You must specify -handle or -port_handle, but not both.

-port_handle

Specifies the port on which to retrieve statistics. You must specify -handle or -port_handle, but not both.

-mode

Specifies the kind of information you want to see. Possible values are described below:

port Returns statistics for the specified port device Returns SyncE device results option1 Returns SyncE option 1 device results option2 Returns SyncE option 2 device results

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status                 $SUCCESS or $FAILURE

log                   An error message (if the operation failed)

The following are statistics when you specify -mode port:

tx_info_msgs  Number of Information messages sent
tx_events     Number of Event messages sent
rx_info_msgs  Number of Information messages received
rx_events     Number of Event messages received

The following are statistics when you specify -mode device:

rx_avg_info_msg_inter_arrival_time      Average delay in seconds between two
                                        received Information messages
rx_events                               Number of Event messages received
rx_info_msgs                            Number of Information messages received
rx_max_info_msg_inter_arrival_time      Maximum delay in seconds between two
                                        received Information messages
rx_min_info_msg_inter_arrival_time      Minimum delay in seconds between two
                                        received Information messages
rx_ql                                   Received quality level
rx_ql_num                               Received quality level as an
                                        integer value
tx_events                               Number of Event messages sent
tx_info_msgs                            Number of Information messages sent
tx_ql                                   Transmitted quality level
tx_ql_num                               Transmitted quality level as an integer
                                        value

The following are statistics when you specify -mode option1:

rx_ql_dnu_count       Number of QL-DNU (Do Not Use) messages received
rx_ql_prc_count       Number of QL-PRC (Primary Reference Clock) messages received
rx_ql_sec_count       Number of QL-SEC (SDH Equipment Clock) messages received
rx_ql_ssua_count      Number of QL-SSU-A (Synchronization Supply Unit) messages received
rx_ql_ssub_count      Number of QL-SSU-B (Synchronization Supply Unit) messages received
rx_ql_unsup_count     Number of unsupported messages received
tx_ql_dnu_count       Number of QL-DNU (Do Not Use) messages sent
tx_ql_prc_count       Number of QL-PRC (Primary Reference Clock) messages sent
tx_ql_sec_count       Number of QL-SEC (SDH Equipment Clock) messages sent
tx_ql_ssua_count      Number of QL-SSU-A (Synchronization Supply Unit) messages sent
tx_ql_ssub_count      Number of QL-SSU-B (Synchronization Supply Unit) messages sent
tx_ql_unsup_count     Number of unsupported messages sent

The following are statistics when you specify -mode option2:

rx_ql_dus_count    Number of QL-DUS (Do Not Use) messages received
rx_ql_prov_count   Number of QL-PROV (Provisionable by network operator) messages received
rx_ql_prs_count    Number of QL-PRS (Primary Reference Source) messages received
rx_ql_smc_count    Number of QL-SMC messages received
rx_ql_st2_count    Number of QL-ST2 (Stratum 2) messages received
rx_ql_st3_count    Number of QL-ST2 (Stratum 3) messages received
rx_ql_st3e_count   Number of QL-ST2 (Stratum 3 Enhanced) messages received
rx_ql_stu_count    Number of QL-STU (Synchronization Traceability Unknown) messages received
rx_ql_tnc_count    Number of QL-TNC (Transit Node Clock) messages received
rx_ql_unsup_count  Number of unsupported messages received
tx_ql_dus_count    Number of QL-DUS (Do Not Use) messages sent
tx_ql_prov_count   Number of QL-PROV (Provisionable by network operator) messages sent
tx_ql_prs_count    Number of QL-PRS (Primary Reference Source) messages sent
tx_ql_smc_count    Number of QL-SMC (SONET Minimum Clock) messages sent
tx_ql_st2_count    Number of QL-ST2 (Stratum 2) messages sent
tx_ql_st3_count    Number of QL-ST2 (Stratum 3) messages sent
tx_ql_st3e_count   Number of QL-ST2 (Stratum 3 Enhanced) messages sent
tx_ql_stu_count    Number of QL-STU (Synchronization Traceability Unknown) messages sent
tx_ql_tnc_count    Number of QL-TNC (Transit Node Clock) messages sent
tx_ql_unsup_count  Number of unsupported messages sent

Examples

Sample Input:

set results_ret1 [sth::emulation_synce_stats    \
    -port_handle                     "$port1 $port2"\
    -mode                             device\
]

Sample Output:

{status 1} {emulateddevice20 {{device_result {{tx_ql QL-DNU} {tx_info_msgs 97}
{tx_events 3} {rx_ql_num 2} {rx_min_info_msg_inter_arrival_time 0.998351} {rx_ql
QL-PRC} {rx_info_msgs 96} {rx_events 3} {tx_ql_num 15}
{rx_max_info_msg_inter_arrival_time 1.002698} {rx_avg_info_msg_inter_arrival_time
1.000047531} {clock_state SLAVE}}}}} {emulateddevice23 {{device_result {{tx_ql
QL-PRC} {tx_info_msgs 96} {tx_events 3} {rx_ql_num 15}
{rx_min_info_msg_inter_arrival_time 0.998861} {rx_ql QL-DNU} {rx_info_msgs 97}
{rx_events 3} {tx_ql_num 2} {rx_max_info_msg_inter_arrival_time 1.002398}
{rx_avg_info_msg_inter_arrival_time 1.000035957} {clock_state MASTER}}}}}