Session Functions

arp control

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
This is a Spirent Extension created to perform Address Resolution Protocol (ARP) on specified ports, devices and streamblocks

Synopsis:

Note: M indicates the argument is `Mandatory`.

       arp control
           arp_target= {all|alldevice|allstream|port|stream|device} M
           arpnd_report_retrieve= {0|1}
           arp_cache_retrieve= {0|1}
           handle= <list of streamblock handles or device handles> M
                               `Mandatory` when arp_target= stream|device
           port_handle= <list of port handles> M
                               `Mandatory` when arp_target= port
           wait= {true|false}

Arguments:

arp_target
                Specifies the range of objects on which ARP will be performed.
                This argument is `Mandatory`. Possible values are listed below::

                 port    -   ARP will be applied to ports specified by port_handle
                 stream  -   ARP will be applied to streams specified by handle
                 device  -   ARP will be applied to devices specified by handle
                 all     -   ARP will be applied to all streamblocks, devices, and ports
                 allstream - ARP will be applied to all streamblocks
                 alldevice - ARP will be applied to all devices

                The default is port.

arp_cache_retrieve
                Determines whether to retrieve the ARP cache table. Possible
                values are 1 and 0. When it is set to 1, Spirent HLTAPI will
                retrieve the ARP cache table. The default is 0.

arpnd_report_retrieve
                Determines whether to retrieve the ARP or Neighbor Discovery (ND)
                statistics after each ARP/ND operation. Possible values are 1 and
                0. When it is set to 1, Spirent HLTAPI will retrieve the
                ARP/ND statistics. The default is 0.

handle
                Specifies a list of handles of the streamblocks or devices on which
                ARP is to be performed. This argument is `Mandatory` when arp_target
                is set to stream or device.

port_handle
                Specifies a list of handles of the ports on which ARP is to be
                performed. This argument is `Mandatory` when arp_target is set
                to port.

wait
                `Spirent Extension (for Spirent HLTAPI only).`

                Determines whether the command should wait for all ARP/ND
                sessions to finish. Possible values are true and false. The
                default value is true.
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 (1) or failure (0) of the operation

arpnd_status    Success (1) or failure (0) of the overall ARP operation

When arp_cache_retrieve is set to 1, key arpnd_cache is returned with the following details:

arpnd_cache
           <port_handle>.<arpnd_cache0>.location          Host name
           <port_handle>.<arpnd_cache0>.ip                Host IP address
           <port_handle>.<arpnd_cache0>.gateway_ip        Gateway IP address
           <port_handle>.<arpnd_cache0>.resolved_mac      Resolved MAC address

When arp_cache_retrieve is set to 1, key arpnd_cache is returned with the following details:

arpnd_report
     <port_handle>.<arpnd_report>.arpnd_status            ARP status
     <port_handle>.<arpnd_report>.failed_arpnd_count      Number of failed ARP
                                                          operations
     <port_handle>.<arpnd_report>.successful_arpnd_count  Number of successful
                                                          ARP operations
     <port_handle>.<arpnd_report>.attempted_arpnd_count   Total ARP attempts
Description:
The arp control function starts Address Resolution Protocol (ARP) on specified ports, devices and streamblocks. Use the arp_target argument to specify the range of the objects on which you want to run ARP. (See arp_target for more information about the usage.)
Examples:

To perform ARP on all devices:

set arp [arp control arp_target=alldevice
    arpnd_report_retrieve= 1
    arp_cache_retrieve= 1]

Sample Output:

{status 1} {port1 {{arpnd_cache0 {{location Router1} {ip 30.1.1.2} {gateway_ip
30.1.1.1} {resolved_mac 00:00:01:00:00:01}}} {arpnd_cache1 {{location Router1}
{ip 3001::2} {gateway_ip 3001::1} {resolved_mac 00:00:01:00:00:01}}}
{arpnd_cache2 {{location StreamBlock_1-2} {ip 30.1.1.2} {gateway_ip 30.1.1.1}
{resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache3 {{location StreamBlock_6} {ip
30.1.1.2} {gateway_ip 30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}}}} {port2
{{arpnd_cache0 {{location Router2} {ip 40.1.1.2} {gateway_ip 40.1 .1.1}
{resolved_mac 00:00:01:00:00:01}}} {arpnd_cache1 {{location Router2} {ip
2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac 00:00:01:00:00:01}}}
{arpnd_cache2 {{location StreamBlock_4-1} {ip 2001:0:1:1::1} {gateway_ip
2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache3 {{location
StreamBlock_7} {ip 2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac
00:30:96:a9:94:0a}}}}} {arpnd_report {{port1 {{arpnd_status SUCCESSFUL}
{failed_arpnd_count 0} {successful_arpnd_count 2} {attempted_arpnd_count 2 }}}
{port2 {{arpnd_status SUCCESSFUL} {failed_arpnd_count 0} {successful_arpnd_count
2} {attempted_arpnd_count 2}}}}} {arpnd_status 1}

To perform ARP on all Streamblocks:

set arp [arp control arp_target=allstream
    arpnd_report_retrieve= 1
    arp_cache_retrieve= 1]

Sample Output:

{status 1} {port1 {{arpnd_cache0 {{location Router1} {ip 30.1.1.2} {gateway_ip
30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache1 {{location Router1}
{ip 3001::2} {gat eway_ip 3001::1} {resolved_mac 00:30:96:a9:94:0a}}}
{arpnd_cache2 {{location StreamBlock_1-2} {ip 30.1.1.2} {gateway_ip 30.1.1.1}
{resolved_mac 00:30:96:a9:94:0a}}} {arpndcache3 {{location StreamBlock_6} {ip
30.1.1.2} {gateway_ip 30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}}}} {port2
{{arpnd_cache0 {{location Router2} {ip 40.1.1.2} {gateway_ip 40.1 .1.1}
{resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache1 {{location Router2} {ip
2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}}
{arpnd_cache2 {{location StreamBlock_4-1} {ip 2001:0:1:1::1} {gateway_ip
2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache3 {{location
StreamBlock_7} {ip 2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac
00:30:96:a9:94:0a}}}}} {arpnd_status 1}

To perform ARP on specified streamblocks:

set arp [arp control port_handle="$port1 $port2"
      arp_target= stream
      handle= "$strm_id1 $strm_id2 $strm_id3 $strm_id4"
      arpnd_report_retrieve= 1
      arp_cache_retrieve= 1]

Sample Output:

{status 1} {port1 {{arpnd_cache0 {{location StreamBlock_1-2} {ip 30.1.1.2}
{gateway_ip 30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}}
{arpnd_cache1 {{location StreamBlock_6} {ip 30.1.1.2} {gateway_ip 30.1.1.1}
{resolved_mac 00:30:96:a9:94:0a}}}}} {port2 {{arpnd_cache0 {{location
StreamBlock_4-1} {ip 2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved _mac
00:30:96:a9:94:0a}}} {arpnd_cache1 {{location StreamBlock_7} {ip 2001:0:1:1::1}
{gateway_ip 2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}}}}
{arpnd_report {{port1 {{arpnd_status SUCCESSFUL} {failed_arpnd_count 0}
{successful_arpnd_count 2} {attempted_arpnd_count 2}}} {port2 {{arpnd_status
SUCCESSFUL} {failed_arpnd_count 0} {successful_arpnd_count 2}
{attempted_arpnd_count 2}}}}} {arpnd_status 1}

To perform ARP on specified devices:

set arp [arp control port_handle="$port1 $port2"
     arp_target= device
     handle= "$src_hdl $dst_hdl"
     arpnd_report_retrieve= 1
     arp_cache_retrieve= 1]

Sample Output:

{status 1} {port1 {{arpnd_cache0 {{location Router1} {ip 30.1.1.2} {gateway_ip
30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache1 {{location Router1}
{ip 3001::2} {gateway_ip 3001::1} {resolved_mac 00:30:96:a9:94:0a}}}}} {port2
{{arpnd_cache0 {{location Router2} {ip 40.1.1.2} {gateway_ip 40.1.1.1}
{resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache1 {{location Router2} {ip
2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}}}}
{arpnd_report {{port1 {{arpnd_status SUCCESSFUL} {failed_arpnd_count 0}
{successful_arpnd_count 2} {attempted_arpnd_count 2}}} {port2 {{arpnd_status
SUCCESSFUL} {failed_arpnd_count 0} {successful_arpnd_count 2}
{attempted_arpnd_count 2}}}}} {arpnd_status 1}

To perform ARP on specified ports:

set arp [arp control port_handle="$port1 $port2"
    arp_target= port
    arpnd_report_retrieve= 1
    arp_cache_retrieve= 1]

Sample Output:

{gateway_ip 3001::1} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache2 {{location
StreamBlock_1-2} {ip 30.1.1.2} {gateway_ip 30.1.1.1} {resolved_mac
00:30:96:a9:94:0a}}} {arpnd_cache3 {{location StreamBlock_6} {ip 30.1.1.2}
{gateway_ip 30.1.1.1} {resolved_mac 00:30:96:a9:94:0a}}}}} {port2 {{arpnd_cache0
{{location Router2} {ip 40.1.1.2} {gateway_ip 40.1 .1.1} {resolved_mac
00:30:96:a9:94:0a}}} {arpnd_cache1 {{location Router2} {ip 2001:0:1:1::1}
{gateway_ip 2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache2
{{location StreamBlock_4-1} {ip 2001:0:1:1::1} {gateway_ip 2001:0:1:1::2}
{resolved_mac 00:30:96:a9:94:0a}}} {arpnd_cache3 {{location StreamBlock_7} {ip
2001:0:1:1::1} {gateway_ip 2001:0:1:1::2} {resolved_mac 00:30:96:a9:94:0a}}}}}
{arpnd_report {{port1 {{arpnd_status SUCCESSFUL} {failed_arpnd_count 0}
{successful_arpnd_count 4} {attempted_arpnd_count 4 }}} {port2 {{arpnd_status
SUCCESSFUL} {failed_arpnd_count 0} {successful_arpnd_count 4}
{attempted_arpnd_count 4}}}}} {arpnd_status 1}

End of Procedure Header

connect

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Initializes one or more Spirent HLTAPI chassis and reserves ports on the initialized chassis. All reserved ports will reset any existing traffic or port configurations to an initialized startup state.

Synopsis:

Note: 1. M indicates the argument is `Mandatory`.
      2. S indicates the argument is for `scaling` scenarios.

    connect

        device= <list of IP addresses or names> M
        port_list= {<slot>/<port>} M
        advanced_interleaving= {true|false}
                       Available when scheduling_mode= rate_based.
        offline= {1|0}
        break_locks= {1|0}
        reset=
        scheduling_mode= {RATE_BASED|PORT_BASED|PRIORITY_BASED |
                          MANUAL_BASED}]
        cfg_based_scheduling= <alphanumeric>
        timeout= {0|1|3|10|30|100|300}
        username= <string>
        sync= {1|0}
        nobios= {1|0}
        chassis_list= <list of IP addresses or names> S
        slot_list= <chassis>/<slot> S
        location_list= //<chassis>/<slot>/<port> S

Arguments:

advanced_interleaving
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables the option to interleave packets to
                reduce the burstiness of traffic. This argument is
                available when scheduling_mode is set to rate_based.
                Possible values are true and false. The default value is
                false.

break_locks
                Breaks port locks established by another user or process. To
                break the locks, set the value of the break_locks argument to 1.
                The default is 0. Use the port_list argument to identify the
                ports.

device
                Specifies one or more Spirent HLTAPI chassis for connection.
                You can specify a list of IP addresses in IPv4 format, host
                names, or domain names, separated by spaces. Spirent HLTAPI
                does not validate the device argument value(s). This argument is
                `Mandatory`.

nobios
                (Not supported in this release)
                Specifies whether HLTAPI will download BIOS to cards. Possible
                values are 0 (do not download BIOS to cards) and 1 (download
                BIOS). The default is 0.

offline
                Specifies whether HLTAPI will create offline ports or not.
                Possible values are 0 (create online ports) and 1 (create
                offline ports). The default is 0.

port_list
                Reserves the specified ports on the specified device host. This
                argument is `Mandatory`. Specify a port using the format
                "slot/port" as follows::


                 port_list {4/6}

                To skip the ports for a chassis, specify empty brackets { }
                in its place. For example, if you specified three chassis
                but only need to use the ports on the third chassis, you
                would specify the following::


                 device Ip1 Ip2 Ip3
                 port_list { } { } {4/6}

                For each IP address, host name, or domain name value specified
                for the device argument, there can be a corresponding slot/port
                value. Any port value that you specify for the port_list
                argument must correspond to a port on the specified chassis.

reset
                Removes all port traffic configurations for the specified chassis
                and ports (using the device and/or -port_list arguments).
                Use the reset argument when you want to create a new test
                configuration for a connection that you have already
                established. You can also use reset in combination with
                break_locks to establish a connection to a chassis and reserve
                (and reinitialize) ports.

                The following example deletes the ports and disconnects from the
                chassis, and then reconnects to the chassis and reserves the
                ports provided in the port list (port_list)::


                 connect device=$device port_handle $port_list -reset

                Note: To run HLTAPI for Perl or HLTAPI for Python scripts
                      successfully, you must specify any value other than null
                      for this  argument. To continue the above example::


                       # HLTAPI for Perl
                       connect (
                           device => "$device",
                           port_list => "$port_list",
                           offline => '0',
                           reset => '1');

                       # HLTAPI for Python
                         sth.connect (
                             device = device,
                             port_list = port_list,
                             offline = 0,
                             reset = 1)

scheduling_mode
                Specifies the traffic load scheduling mode. Possible values are
                described below::


                 port_Based - The load is controlled at port level; guarantees a
                        fixed interframe gap (IFG) for Layer 2 testing. The order of
                        frames sent is determined by the order of the configured
                        stream blocks.

                 rate_based - Use this mode to allow multiple load values for
                        streams within the same stream block.

                 priority_based - Highpriority stream blocks are scheduled first,
                        lower priority stream blocks are fit into gaps left available
                        by higher priority stream blocks.

                 manual_based - Use this scheduling mode to configure tightly
                        controlled traffic for functional testing.

                The default value is rate_based.

cfg_based_scheduling
                Specifies that the configuration of the traffic load scheduling mode
                must be the same as in the STC configuration file. When this argument
                is specified, the scheduling mode on each port will be the same as in
                the STC configuration file.

sync
                Synchronizes the timestamps of all of the specified chassis, using
                the first chassis specified in the device argument as the master
                clock source. To synchronize the timestamps, set the value of the
                sync argument to 1. The default is 1.

username
                Specifies the name of the user. This name is only displayed
                for locked ports. If the user name includes spaces, Spirent
                HLTAPI uses only the last word of the name.

timeout
                Establishes a time period for the connection attempt. The
                value is the number of seconds before the time period expires.
                The timeout value can be one of the following: 0, 1, 3, 10, 30,
                100, 300, 1000.

chassis_list
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a list of chassises under which the ports will be
                connected. The value can be the IP address or the name of
                the chassis.

                Note: Use this argument for `scaling` test scenarios.

slot_list
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a list of slots to be used, in the format of
                <chassis>/<slot>.

                Note: Use this argument for `scaling` test scenarios.

location_list
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a list of locations to be connected, in the format of
                //<chassis>/<slot>/<port>.

                Note: Use this argument for `scaling` test scenarios.

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:

tgen_reset
Removes all port traffic configurations for the specified chassis and ports (using the device and/or -port_list arguments). Use the reset argument when you want to create a new test configuration for a connection that you have already established. You can also use reset in combination with break_locks to establish a connection to a chassis and reserve (and reinitialize) ports.
connect_timeout
Timeout in seconds to wait before failing connection to chassis

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:

intf_mode
ixnetwork_tcl_server
master_device
mode
remove_streams
tcl_server
tgen_type
tool_version
reset
Ciscospecific Arguments:

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

config_file
forceload
handle
nobios
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):

port_handle.<device>.<port>  The port information for the connected
                             chassis (see below).

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

log                         An error message (if the operation
                            failed).

offline                     The created ports are online (0) or
                            offline (1).
Description:

The connect function establishes a connection with one or more Spirent HLTAPI chassis and reserves a set of ports. When you successfully connect to a chassis and reserve ports, the ports are locked (reserved) for your use. You can use the break_locks and -reset arguments to gain access to a port locked by another user. If you break existing locks, the connect function resets any existing port and traffic configurations to an initialized startup state.

Spirent HLTAPI returns an error message if it cannot establish connections with the specified ports. For example, if a port is already reserved, the connect function returns an error. In this case, you can call the connect function again, using the break_locks argument.

The function returns the requested data (device and port information) and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list.

The key values to access the data returned from the connect function are:

port_handle.<device>.<port>

Port information is structured as a keyed list that is embedded within the primary keyed list returned by the connect function. The deviceport keyed list contains information about all of the connected chassis. You can use the following forms of key values to retrieve information about ports.

port_handle is a value that uniquely identifies a port on a chassis.
The returned port handle value is used as input to the interface config function as well as other functions.

<device> is the value of the device argument passed into the call.

<port> is the value of the port_list argument passed into the call.
If two ports are in different port groups, then all of the ports in the port group are reserved.
status
The key “status” retrieves a value indicating the success (1) or failure (0) of the operation.
log
The key “log” retrieves a message describing the last error that occurred during the operation. If the operation was successful - {status 1} - the log value is null.
offline
The key “offline” retrieves a value indicating the created ports are online (0) or offline (1).
Examples:

The following connect function returns a keyed list containing device and port information:

connect device=10.100.19.110 username abc -port_list "4/6 4/3"

Here is an example of the output for the above sample input function:

{port_handle {{10 {{100 {{19 {{110 {{4/6 port1} {4/3 port2}}}}}}}}}}} {status 1}

This keyed list describes ports on the device with the IP address 10.100.19.110. Because the ports are not locked, a username is not returned. This function established a connection with ports 1 and 2 on slot 4 of the specified device. The port handle for port 1 is 60, and the port handle for port 2 is 84. You will use these port handle values as input to other functions.

Sample Output:

{port_handle {{10 {{100 {{19 {{110 {{4/6 60} {4/3 84}}}}}}}}}}} {status 1}

To reserve all ports under the chassis in the chassis list:

set chassislist "10.61.67.79 10.61.67.197"
set intStatus [connect chassis_list=$chassislist]

Sample Output:

{port_handle {{10 {{61 {{67 {{79 {{1/1 port1}}} {197 {{1/1 port2}}}}}}}}}}} {offline 0} {status 1}

To reserve all ports under the slots in the slot list:

set slotlist "10.61.67.79/1 10.61.67.197/1"
set intStatus [connect slot_list=$slotlist]

Sample Output:

{port_handle {{10 {{61 {{67 {{79 {{1/1 port1}}} {197 {{1/1 port2}}}}}}}}}}} {offline 0} {status 1}

To reserve the specified port:

set locationlist {//10.61.39.164/1/1 //10.61.39.164/1/2}
set intStatus [connect location_list=$locationlist]

Sample Output:

{port_handle {{10 {{61 {{39 {{164 {{1/1 port1} {1/2 port2}}}}}}}}}}} {status 1}

End of Procedure Header

device info

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Returns information about ports on the connected chassis, chassis or module serial number, temperature and fan status; also returns the current versions of the HLTAPI functional specification and Spirent TestCenter software.

Synopsis:

Note: M indicates the argument is `Mandatory`.
     device info
        ports
        port_handle= <handle>
        fspec_version
        getchassisinfo

Arguments:

ports
     Produces port information.

fspec_version
     Produces version information.

port_handle
     Produces the default port name.

getchassisinfo
     Specifies to return the information about chassis and module serial number,
     fan and temperature status.
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):

version
               Version numbers for HLTAPI specification and Spirent
               TestCenter software.

deviceport-key
               The port information for the connected chassis (see
               below).

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

log            An error message (if the operation failed).
Description:

The device_info function provides information about the availability of ports on the connected chassis, chassis or module serial number, temperature, fan status. It can also identify the Spirent HLTAPI version and the version of the HLTAPI specification that the Spirent TestCenter software supports.

This function returns the requested data (version or chassis or port information) and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list.

The key values to access the data returned from the device_info function are:

version
       The key "version" retrieves a string containing the software and
       functional specification version numbers.

deviceport-key
       Port information is structured as a keyed list that is embedded within
       the primary keyed list returned by the device_info function. The
       deviceport keyed list contains information about all of the connected
       chassis. You can use the following forms of key values to retrieve
       information about ports::


       <device>.available.<port>.type

       <device>.inuse.<port>.type

       <device>.inuse.<port>.owner

       <device> is the IP address of a connected chassis.

       <port> identifies a port on the chassis, specified as slot/port.

       Note that the keys shown above are fully qualified. When you specify
       a fully qualified key, the keylget function returns information
       about a single port. If you specify a partial key, keylget returns
       the corresponding information. For example, if you specify the
       <device>.available form, the function will return a keyed list
       containing information about all available ports on the specified
       chassis. If you are using only one port in a port group, not only will
       that port show as "in use", but the other port in that port group will
       also show as "in use" as all the ports in the port group get reserved.

status
      The key "status" retrieves a value indicating the success (1) or
      failure (0) of the operation.

log
      The key "log" retrieves a message describing the last error that
      occurred during the operation. If the operation was successful -
      {status 1} - the log value is null.
Examples:

To obtain port information:

set port_data [device info ports=]

The port_data variable contains the following keyed list:

{{10 {{100 {{19 {{112 {{available {{4/0 {{type ethernet}}} {4/1 {{type
ethernet}}} {4/2 {{type ethernet}}} {4/3 {{type ethernet}}} {4/4 {{type
ethernet}}} {4/5 {{type ethernet}}}}} {inuse {{4/6 {{owner smith} {type
ethernet}}} {4/7 {{owner smith} {type ethernet}}}}}}}}}}}}} {status 1}}

This keyed list describes ports on the device with the IP address 10.100.19.112. The information is organized into a hierarchy based on device, availability, port, owner, and type. The keyed list could be represented as follows:

10.100.19.112  available  4/0  type ethernet
                          4/1  type ethernet

                          4/2  type ethernet

                          4/3  type ethernet

                          4/4  type ethernet

                          4/5  type ethernet

              inuse       4/6  owner smith

                              type ethernet

                          4/7  owner smith

                              type ethernet

status 1

To obtain the default port name:

device_info porthandle= $p0 $p1

Keyed list returned:

{port_handle {{port1 {{port_name {10.100.19.9881= //8/1}}}} {port2 {{
port_name {10.100.19.9883= //8/3}}}}}} {status 1}
port1: 10.100.19.9881= //8/1
port2: 10.100.19.9883= //8/3

To obtain chassis information:

set chassis_data [device info getchassisinfo=]

The chassis_data variable contains the following keyed list:

{10 {{61 {{39 {{164 {{chassis_serial_number E08331036} {temp_state NORMAL}
    {fan_id {{0 {{fan_state ON}}} {1 {{fan_state ON}}} {2 {{fan_state ON}}} {3
    {{fan_state STALLED}}} {4 {{fan_state ON}}} {5 {{fan_state ON}}}}} {slot {{1
    {{module_serial_number N08101810} {module_model_type WAN-2003A}}} {2
    {{module_serial_number M06190560} {module_model_type MSA-2001B}}} {6
    {{module_serial_number E10370839} {module_model_type CM-1GD4}}} {8
    {{module_serial_number E10430095} {module_model_type CV-10GS8}}} {11
    {{module_serial_number E10350452} {module_model_type CV-10GS8}}}}}}}}}}}}} {status 1}

This keyed list describes the serial number, temperature, fan state, module type and slot serial number details on the device with the IP address 10.61.39.164.

End of Procedure Header

interface config

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Creates, modifies, or deletes a port configuration.

Synopsis:

Note: 1. M indicates the argument is `Mandatory`.
      2. S indicates the argument is for `scaling` scenarios.

   interface config
        port_handle= <port_handle_list> M
        mode= {config|modify|destroy} M
        performance_mode= {STC_DEFAULT|STC_L1|STC_MGIG|STC_PERF|STC_ROUTING}
        port_name= <port name>
         mode= config
           intf_mode= {ethernet}
                alternate_speeds= {ether100|ether10000|ether2500|ether1000|ether5Gig|
                                   speed_unknown} ]
                arpnd_report_retrieve= {1|0}
                arp_req_retries= <0-100>
                arp_req_timer= <1-100000>
                arp_send_req= {1|0}
                arp_target= { stream|device|port|all }
                arp_cache_retrieve= {1|0}
                autonegotiation= {1|0}
                autonegotiation_role_enable= {1|0}
                autonegotiation_role= {slave|master|fault}
                block_mode= {one_host_per_block|one_device_per_block|
                             one_network_per_block|
                             multiple_networks_per_block|
                             multiple_device_per_block} S]
                control_plane_mtu < 016383= >
                collision_exponent= <1-10>
                count= <integer> S
                crc32= {true|false}
                create_host= {true|false}
                data_path_mode= {normal|local_loopback}
                deficit_idle_count= {true|false}
                dst_mac_addr= <aa.bb.cc.dd.ee.ff>
                duplex= {full|half}
                enforce_mtu_on_rx=  {true|false}
                enable_ping_response= {1|0}
                expand= {true|false} S
                fec_option=
                            {ieee_cr_74_base_support|ieee_cr_74_base_support_req|
                            ieee_cr_108_rs_support|ieee_cr_108_rs_support_req|
                            ieee_cr_s_74_base_support|ieee_cr_s_74_base_support_req|
                            consortium_25g_74_base_support|consortium_25g_74_base_support_req|
                            consortium_25g_rs_support|consortium_25g_rs_support_req|
                            disable_fec|enable_74_base|enable_108_rs
                            consortium_50g_74_base_support|consortium_50g_74_base_support_req|
                            consortium_50g_rs_support|consortium_50g_rs_support_req|
                            disable_fec_50g|enable_74_base_50g|enable_91_rs}]
                forward_error_correct= {true|false}
                flow_control= {true|false}
                framing= {sonet|sdh}
                gateway= <a.b.c.d>
                    gateway_step= <a.b.c.d>
                internal_ppm_adjust= <-100-100>
                intf_ip_addr= <a.b.c.d>
                intf_ip_addr_step= <a.b.c.d>
                ipv6_intf_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                ipv6_intf_addr_step=  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                ipv6_prefix_length= <0-128>
                ipv6_gateway= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                ipv6_gateway_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                ipv6_resolve_gateway_mac= {true|false}
                netmask= <a.b.c.d>
                path_signal_label= {HDLC|PPP|ATM|ETHERNET_10G_WAN}
                phy_mode= {copper|fiber}
                rx_equalization= <0-15>
                port_handle= <port_handle_list>
                port_mode= {LAN|WAN}
                scramble= {true|false}
                speed= {ether10|ether100|ether1000|ether2500|ether10000|ether5Gig|
                       ether25Gig|ether100Gig|ether40Gig|ether50Gig|ether400Gig|ether200Gig|ether800Gig}]
                pfc_negotiate_by_dcbx= {0|1}
                priority0= {0|1}
                priority1= {0|1}
                priority2= {0|1}
                priority3= {0|1}
                priority4= {0|1}
                priority5= {0|1}
                priority6= {0|1}
                priority7= {0|1}
                pfc_priority_enable= {Boolean list}
                pfc_priority_pause_quanta= <0-65535>
                pfc_send_xon= {0|1}
                pfc_xon_delay= <1-3273000>
                pfc_xon_delay_unit= {pause_quanta|microseconds}
                resolve_gateway_mac= {true|false}
                src_mac_addr= {<aaaa.bbbb.cccc>|<aaaa:bbbb:cccc>|
                          <aa.bb.cc.dd.ee.ff>|<aa:bb:cc:dd:ee:ff>|
                          <aabb-cc-dd-ee-ff>}
                src_mac_addr_step= {<aaaa.bbbb.cccc>|<aaaa:bbbb:cccc>|
                          <aa.bb.cc.dd.ee.ff>|<aa:bb:cc:dd:ee:ff>|
                          <aabb-cc-dd-ee-ff>}
                transmit_clock_source= {internal|bits|loop|external internal_ppm_adj }
                tx_preemphasis_main_tap= <0-31>
                tx_preemphasis_post_tap= <0-15>
                vlan= {1|0}
                vlan_id= <0-4095>
                 vlan_cfi= {0|1}
                 vlan_id_count= <1-4096>
                 vlan_id_step= <0-4095>
                 vlan_user_priority= <0-7>
                qinq_incr_mode= {both|inner|outer}
                vlan_outer_id= <0-4095>
                 vlan_outer_cfi= {0|1}
                 vlan_outer_id_count= <1-4096>
                 vlan_outer_id_step= <0-4095>
                 vlan_outer_user_priority= <0-7>
             ]
               intf_mode= {atm}
                 framing= {sonet|sdh}
                 control_plane_mtu= < 0-16383>
                                 rx_hec= {0|1}
                 lais_lrdi_threshold= <5-65535>}
                 tx_s1= <0-65535>
                 tx_fcs= <16|32>
                 clocksource= { internal|loop|external}
                 speed= {oc3|oc12|oc48}
              intf_mode= {pos_hdlc|pos_ppp}
                 speed= {ether10|ether100|ether1000|ether10000|ether9_286|
                          oc3|oc12|oc48|oc192}]
                 framing= {sonet|sdh}
                 control_plane_mtu= < 0-16383>
                 clocksource= {internal|loop|external}
                 lais_lrdi_threshold= <5-65535>}
                 tx_s1= <0-65535>
                tx_fcs= <16|32>
            ]
              intf_mode= fc
                 data_path_mode= {LINE_MONITOR|LOCAL_LOOPBACK|NORMAL}
                 internal_ppm_adjust <100= - 100>
                 speed= {ether2000|ether4000|ether8000|ether10000}
                 control_plane_mtu= <0 - 16383>
                 transmit_clock_source= {INTERNAL|INTERNAL_PPM_ADJ}
                 receiver_ready_delay_max= <0 - 500000>
                 receiver_ready_delay_min= <0 - 500000>
                 receiver_ready_delay_mode= {fixed|random}
                 receiver_ready_delay_units= {us|ms}
                 max_recv_size= <64 - 2120>
                 receiver_timeout= <1 -65535>
                 rx_credits= <1 - 65535>
                 topology=  {PTP_PRIVATE|PTP_PUBLIC}
                 traffic_class= {TRAFFIC_CLASS_2|TRAFFIC_CLASS_3}
                 tx_credits= <1 - 65535>
            ]
          mode= modify
              alternate_speeds= {ether100|ether10000|ether2500|ether1000|ether5Gig|
                                speed_unknown} ]
              arp_req_retries= <0-100>
              arp_req_timer= <1-100000>
              arp_send_req= {1|0}
              arp_target= {stream|device|port|all}
              arp_cache_retrieve= {1|0}
              autonegotiation= {1|0}
              autonegotiation_role_enable= {1|0}
              autonegotiation_role= {slave|master|fault}
              collision_exponent= <1-10>
              control_plane_mtu < 016383= >
              crc32= {true|false}
              data_path_mode= {normal|local_loopback}
              deficit_idle_count= {true|false}
              dst_mac_addr= <aa.bb.cc.dd.ee.ff>
              duplex= {full|half}
              enforce_mtu_on_rx=  {true|false}
              flow_control= {true|false}
              framing= {sonet|sdh}
              intf_ip_addr= <a.b.c.d>
              intf_ip_addr_step= <a.b.c.d>
              internal_ppm_adjust= <-100-100>
              ipv6_intf_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
              ipv6_prefix_length= <0-128>
              ipv6_intf_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
              ipv6_gateway= <a.b.c.d>
              ipv6_gateway_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
              ipv6_resolve_gateway_mac= {true|false}
              netmask= <a.b.c.d>
              path_signal_label= {HDLC|PPP|ATM|ETHERNET_10G_WAN}
              pfc_negotiate_by_dcbx= {0|1}
              priority0= {0|1}
              priority1= {0|1}
              priority2= {0|1}
              priority3= {0|1}
              priority4= {0|1}
              priority5= {0|1}
              priority6= {0|1}
              priority7= {0|1}
              pfc_priority_enable= {Boolean list}
              pfc_priority_pause_quanta= <0-65535>
              pfc_send_xon= {0|1}
              pfc_xon_delay= <1-3273000>
              pfc_xon_delay_unit= {pause_quanta|microseconds}
              phy_mode= {copper|fiber}
              port_handle= <port_handle>
              port_mode= {lan|wan}
              port_loadunit= {percent_line_rate|frames_per_second|inter_burst_gap|
                            bits_per_second|kilobits_per_second|megabits_per_second}]
              port_load= <double>
              resolve_gateway_mac= {true|false}
              scramble= {true|false}
              scheduling_mode= {rate_based|port_based|priority_based| manual_based}
                 speed= {ether10|ether100|ether1000|ether2500|ether10000|ether5Gig|
                        ether40Gig|ether50G|ether100Gig|ether400Gig}]
              src_mac_addr= {<aaaa.bbbb.cccc>|<aaaa:bbbb:cccc>|
                  <aa.bb.cc.dd.ee.ff>|<aa:bb:cc:dd:ee:ff>|
                  <aabb-cc-dd-ee-ff>}
                        src_mac_addr_step= {<aaaa.bbbb.cccc>|<aaaa:bbbb:cccc>|
                             <aa.bb.cc.dd.ee.ff>|<aa:bb:cc:dd:ee:ff>|
                             <aabb-cc-dd-ee-ff>}
              transmit_clock_source= {internal|bits|loop|external internal_ppm_adj }
              tx_preemphasis_post_tap= <0-15>
              tx_preemphasis_main_tap= <0-31>
              vlan= {1|0}
              vlan_id= <0-4095>
              vlan_cfi= {0|1}
              vlan_id_count= <1-4096>
              vlan_id_step= <0-4095>
              vlan_user_priority= <0-7>
              qinq_incr_mode= {both|inner|outer}
              vlan_outer_id= <0-4095>
              vlan_outer_cfi= {0|1}
              vlan_outer_id_count= <1-4096>
              vlan_outer_id_step= <0-4095>
              vlan_outer_user_priority= <0-7>
           mode= destroy
           detection_mode= {auto_detect|manual|advanced}
           cable_length_type= {optical|copper_0m_2m|copper_3m|copper_5m|copper_7m|copper_0m_1m|copper_2m|copper_5m_active|copper_7m_active}
           tx_deemphasis_post_tap= <0-71>
           tx_deemphasis_pre_tap= <0-71>
           tx_main_tap_swing= <0-31>
         manual_schedule_stream_handle= <stream_handle_list> M
         manual_schedule_entry_handle= <manual_schedule_entry_handle_list>
         manual_schedule_inter_frame_gap= <ANY>
         manual_schedule_inter_burst_gap= <ANY>
         manual_schedule_inter_entry_gap= <ANY>
         manual_schedule_burst_size= <integer>
         manual_schedule_burst_count= <integer>
         manual_schedule_loop_count= <integer>
         manual_schedule_cont_transmission= {true|false}
         manual_schedule_inter_frame_gap_unit= {PERCENT_LINE_RATE|FRAMES_PER_SECOND|BYTES|MILLISECONDS|NANOSECONDS|BITS_PER_SECOND|KILOBITS_PER_SECOND|MEGABITS_PER_SECOND}
         manual_schedule_inter_burst_gap_unit= {PERCENT_LINE_RATE|FRAMES_PER_SECOND|BYTES|MILLISECONDS|NANOSECONDS|BITS_PER_SECOND|KILOBITS_PER_SECOND|MEGABITS_PER_SECOND}
         manual_schedule_inter_entry_gap_unit= {PERCENT_LINE_RATE|FRAMES_PER_SECOND|BYTES|MILLISECONDS|NANOSECONDS|BITS_PER_SECOND|KILOBITS_PER_SECOND|MEGABITS_PER_SECOND}
         enable_auto_negotiation_master_slave= {true|false}
         priority_flow_control_array= {true|false}
         optimized_xon= {enable|disable}
         auto_negotiation_master_slave= {slave|master|fault}
         test_mode= {normal_operation|normal_operation_full_power|transmit_droop|master_transmit_jitter|slave_transmit_jitter|transmitter_distortion}
         pfc_cable_delay= <double>
         pfc_cable_delay_type= {fiber|copper}
         port_setup_mode= {portconfig_only|registers_only}
         ignore_link_status= {true|false}
         advertise_ieee= {true|false}
         advertise_nbaset= {true|false}
         down_shift_enable= {true|false}
         enable_8023_br_per_port= {true|false}
         custom_fec_mode= {none|kr_fec|rs_fec|kp4_fec}
         cfp_interface= <ANY>

Arguments:

alternate_speeds
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies alternate speeds for the port. This argument is
                available when autonegotiation is enabled. Possible values are
                ether100, ether1000, ether2500, ether10000, ether5Gig, and
                speed_unknown. The default value is speed_unknown.

arpnd_report_retrieve
                Determines whether to retrieve the Address Resolution Protocol
                (ARP)/Neighbor Discovery (ND) statistics after each ARP/ND
                Operation. Possible values are 1 and 0. When it is set to 1, this
                command will retrieve the ARP/ND Statistics. When it is set to 0,
                the command will not. The default is 0. This argument is only
                available when arp_send_req is set to 1.

arp_req_retries
                The ARP retry count to use. Possible values range from 0 to 100.
                The default is 3. The mode argument must be set to config or
                modify. This argument is only available when arp_send_req is set
                to 1.

arp_req_timer
                The interval between ARP messages in milliseconds. Possible
                values range from 1 to 100000. The default is 10. The mode
                argument must be set to either config or modify. This
                argument is only available when arp_send_req is set to 1.

arp_send_req
                Enables or disables sending ARP requests on the specified
                Ethernet port. Valid values are 0 and 1. The default is 1
                (enable ARP on the port). The mode argument must be set to
                config or modify. ARP is sent when you call
                traffic control action=run port_handle $porthandle
                You must also enable::


                 traffic config mac_discover_gw=<a.b.c.d>.

                See Description for interface config below for more about
                enabling ARP.

arp_target
                Specifies the object that the ARP will be applied to. Possible
                values are listed below::


                  port - ARP will be applied to ports. This is the default.
                  stream - ARP will be applied to streams.
                  device - ARP will be applied to devices.
                  all - ARP will be applied to streams, devices, and ports.

                This argument is only available when arp_send_req is set to 1.

arp_cache_retrieve
                Determines whether to retrieve the ARP cache table per port.
                Possible values are 1 and 0. When it is set to 1, this
                command will retrieve the ARP cache table per port. When it
                is set to 0, the command will not. The default is 0.
                This argument is only available when arp_send_req is set to 1.
                The following example applies the ARP to streams, devices, and
                ports. It also checks the ARP results and retrieves the ARP
                cache table per port::


                  set returnedString [interface config port_handle=$portHnd
                                              mode modify
                                              arp_send_req 1
                                              arp_target all
                                              arp_cache_retrieve 1

                Then the return values will look like this::


                 <ARP FAIL>

                 {arpnd_status 0} {arpnd_cache {{10.61.37.23-2-1 //2/1
                 port_address    11.1.1.10       11.1.1.11   00:00:00:00:00:00}
                 {10.61.37.23-2-1 //2/1   StreamBlock 1 :0    10.1.1.10   10.1.1.11
                 00:10:94:00:00:32}}}
                 {status 1}

                 <ARP SUCCESS>

                 {arpnd_status 1} {arpnd_cache {{10.61.37.23-2-3 //2/3
                  port_address 11.1.1.11 11.1.1.10 00:10:94:00:00:31}
                 {10.61.37.23-2-3 //2/3 StreamBlock 2 :0 10.1.1.11 10.1.1.10
                  00:10:94:00:00:02}}}
                 {status 1}

autonegotiation
                Enables or disables autonegotiation of the port speed. Valid
                values are 0 and 1. The default is 1 (enable). The mode argument
                must be set to config or modify.

autonegotiation_role_enable
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables autonegotiation roles. Valid values are 0
                and 1. The default is 1 (enable). You must set mode to config
                or modify.

autonegotiation_role
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the port role for autonegotiation. Valid values are
                slave, master, and fault. The default value is master. This
                argument is available when autonegotiation_role_enable is set to
                0, and mode is set to config or modify.

block_mode
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the device block mode. Emulated device objects may be
                used to represent a single device or a block of many devices for
                higher scalability. Emulated device blocks are not supported by
                all protocols (for example, routing protocols) and have less
                granularity of control at the protocol level and in traffic
                configuration. Possible values are described below::


                 one_device_per_block          One emulated device block is created
                                               for each device

                 one_network_per_block         One emulated device block is created
                                               for each network

                 multiple_networks_per_block   One emulated device block may represent
                                               multiple networks. Note that there
                                               are limitations to what can be
                                               represented as a single emulated
                                               device block using this mode.

                 multiple_device_per_block     Multiple devices per block


clocksource
                Specifies the transmitter clock source. Possible values are::


                 internal - Specifies that a crystal on the interface provides the
                            transmit clock. This is the default.

                 loop - Specifies that a clock recovered from the received data is
                        used as the transmit clock.

                 external - Specifies that the transmit clock is locked to an
                            external reference signal provided to the interface.

control_plane_mtu
                Sets the maximum transmission unit (MTU) size (in bytes) for the
                port. The MTU defines the largest size of packets that an
                interface can transmit without the need to fragment. IP packets
                larger than the MTU specified must be fragmented. Valid values
                range from  0 to 16383. The default is 1500. The mode argument
                must be set to either config or modify.

collision_exponent
                Sets the exponent used in the collision backoff algorithm. Larger
                exponents indicate larger backoff times after collisions occur.
                Possible values range from 1 to 10. The default value is 10.
                This argument is for 100Gig, 40Gig, 25Gig, 50Gig, 400Gig and 800Gig only.

count
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of emulated devices to create. This option
                is similar to the Create Device wizard in the Spirent TestCenter
                GUI. Use this option for large `scaling` configurations.
                You must set create_host to false.

crc32
                Enables or disables the CRC32. CRC32 is the Cyclic Redundancy
                Checksum in which the digital signature is a 32bit number. Valid
                values are true and false. The default is true (enable).
                You can use this argument only when mode is set to config or
                modify and speed is set to ether10000.

create_host
                Determines whether to create a host named as port_address.
                Possible values are true and false. If it is set to true, a host
                named as port_address will be created. The default value is true.
                The value will be false if the script is automatically
                in Save as HLTAPI.

data_path_mode
                Sets the path for the port to transmit data. Possible values are
                normal and local_loopback::


                 normal - Generate data from Spirent TestCenter to the DUT and
                          analyze incoming data from the DUT

                 local_loopback - The port will transmit in a loopback mode, so
                          transmitted data will be received by the transmitting port
                          without going out on the wire.

                The default is "normal". This argument works only with Ethernet
                fiber mode.

deficit_idle_count
                Enables or disables a Deficit Idle Count (DIC), which maintains
                the count of characters deleted or inserted. DIC adds or
                subtracts up to 3 bytes to/from the nominal 12byte inter-frame
                gap to maintain the 10GbE frame rate. Therefore, the minimum gap
                at the XGMII transmit interface can be 9 to 15 bytes, but
                averages 12 bytes. To achieve the maximum 10Gb/s throughput, test
                tools and devices under test must have DIC enabled. Valid values
                are true and false. The default is false (disable). This argument
                is only applicable for Ethernet 10Gig, 25Gig, 40Gig, 50Gig, 100Gig,
                400Gig and 800Gig fiber.

dst_mac_addr
                Defines the destination MAC address {aa:bb:cc:dd:ee:ff}, which is
                the address of the next hop (gateway). The mode argument must be
                set to either config or modify.

duplex
                For Ethernet 10/100 interfaces only, specifies the duplex mode as
                either half or full. The default is full. The mode argument must
                be set to config or modify.

enforce_mtu_on_rx
                Enforces MTU for Rxcontrol packets or not. Possible values are
                true or false. When you set this argument to true, MTU will be
                enforced for Rx control packets. The default is false.

enable_ping_response
                Enables or disables the host to repsonse to ping. Valid values
                are 0 (disable) and 1 (enable). The default is 0. You must set
                mode config or modify.

expand
                `Spirent Extension (for Spirent HLTAPI only).`

                Determines whether to expand the specified device parameters into
                emulated device objects. Possible values are true and false.

                If it is set to true, a list of emulated devices will be created
                and their handles returned.

                If it is set to false, param_handle will be returned, which can be
                passed to protocol configuration APIs, for example,
                   mode activate in emulation isis config.

fec_option
                Specifies a list of FEC options. Currently this argument is
                valid for 25G Ethernet and 50G (speed ether25Gig and ether50Gig).
                Possible values are described below:  :


                When auto_negotiation is set to true::


                   Value                            Description
                                      (FEC mode, physical type, FEC action and type)

                 ieee_cr_74_base_support
                                               IEEE standard, 25G BASECR physical
                                               type, Support for Clause 74 Base R FEC

                 ieee_cr_74_base_support_req
                                               IEEE standard, CR physical type,
                                               Support and Request for Clause 74
                                               Base R

                 ieee_cr_108_rs_support
                                               IEEE standard, CR physical type,
                                               Support for Clause 108 RS

                 ieee_cr_108_rs_support_req
                                               IEEE standard, CR physical type,
                                               Support and Request for Clause 108
                                               RS

                 ieee_cr_s_74_base_support
                                               IEEE Standard, CR-S physical type,
                                               Support for Clause 74 Base R.

                 ieee_cr_s_74_base_support_req
                                               IEEE Standard, CR-S physical type,
                                               Support and Request for Clause 74
                                               Base R

                 consortium_25g_74_base_support
                                               Consortium 25G standard,
                                               Support for Clause 74 Base R

                 consortium_25g_74_base_support_req
                                               Consortium 25G standard,
                                               Support and Request for Clause
                                               74 Base R

                 consortium_25g_rs_support
                                               Consortium 25G standard,
                                               Support for Clause 91 RS

                 consortium_25g_rs_support_req
                                               Consortium 25G standard,
                                               Support and Request for for
                                               Clause 91 RS

                 consortium_50g_74_base_support
                                               Consortium 50G standard,
                                               Support for Clause 74 Base R

                 consortium_50g_74_base_support_req
                                               Consortium 50G standard,
                                               Support and Request for Clause
                                               74 Base R

                 consortium_50g_rs_support
                                               Consortium 50G standard,
                                               Support for Clause 91 RS

                 consortium_50g_rs_support_req
                                               Consortium 50G standard,
                                               Support and Request for for
                                               Clause 91 RS

                When auto_negotiation is set to false::


                  Value                   Description

                  disable_fec              Disable FEC for 25Gig and 40Gig
                  enable_74_base           Force Clause 74 Base R (25Gig and 40Gig)
                  enable_108_rs            Force Clause 108 R (25Gig)

                  disable_fec_50g          Disable FEC for 50Gig
                  enable_74_base_50g       Force Clause 74 Base R
                  enable_91_rs             Force Clause 91 R (50Gig)

                Note: You can only specify one FEC option for one FC type. Here
                      is an example::


                       {{ieee_cr_74_base_support} {ieee_cr_108_rs_support}
                       {consortium_25g_74_base_support} {consortium_25g_rs_support}}


flow_control
                Enables or disables data transmission rate management. Enabling
                flow control sends a PAUSE frame to temporarily halt the
                transmission of data from the sender, so it does not send data
                faster than another computer can receive it. Only ports
                configured for fullduplex mode can send PAUSE frames (see the
                description for duplex). Valid values are true and false. The
                default is false (disable).

forward_error_correct
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables or disables Forward Error Correction (FEC). Valid values
                are true (enable) and false (disable). The default is true. This
                argument is only valid for Ethernet 100G fiber.

framing
                Specifies the type of framing format for a POS interface.
                Possible values are::


                 sonet - Synchronous Optical Network (SONET), a standard for
                      sending data over fiberoptic cables. This is the default.

                 sdh - Synchronous Digital Hierarchy (SDH), SONET's international
                      equivalent.

                This argument is available when you specify speed ether10000,
                intf_mode atm, intf_mode pos_hdlc, or intf_mode pos_ppp.

gateway
                The default gateway for routing the IPv4 address you specified in
                the intf_ip_addr argument. The default gateway is the router
                that Spirent HLTAPI will use to reach hosts not on its local
                network. The mode argument must be set to either config or
                modify.

gateway_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the increment used to generate gateway IPv4 addresses for
                the router's subinterface. The default value is 0.0.0.1. The -mode
                argument must be set to either "config" or "modify".

internal_ppm_adjust
                Specifies the parts per million (PPM) value to adjust the IEEE clock
                frequency tolerance. This value affects the transmit clock frequency
                when transmit_clock_source is set to internal_ppm_adj. Possible
                values range from -100 to 100. The default value is 0. When you
                need to specify a negative value, you must encompass the value by
                double quotation marks and braces, such as {"-4"} or "{-4}".
                Other formats like "-4", {-4} or -4 are not acceptable. You can
                use this argument when device_type is set to ptpMaster and
                announce_message_enable is set to 1.

intf_ip_addr
                Specifies the IPv4 address assigned to the port. You must set
                this argument to use IPv4 routing. Also, the mode argument
                must be set to either config or modify.

intf_ip_addr_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the increment used to generate IPv4 subinterface
                addresses. The default value is 0.0.0.1. The mode argument must
                be set to either config or modify.

intf_mode
                Sets the interface type. This argument is `Mandatory`. Specify the
                interface mode only when you first configure the port using mode
                config. Possible values are described below::


                 ethernet - Ethernet is a Layer 2 transmission protocol for
                            transporting data over coaxial cables and twisted
                            pair wires.

                 pos_hdlc - Packet over SONET (POS) interface for HDLC
                           (Highlevel Data Link Control). POS is an interface for
                           transporting data over SONET (Synchronous Optical Network).
                           HDLC is a Layer 2 transmission protocol that embeds
                           information in a data frame.

                 pos_ppp - Packet over SONET (POS) interface for PPP (Pointto-
                         Point protocol)

                 atm -   Asynchronous Transfer Mode (ATM)

                 fc - Fibre Channel (FC)

ipv6_intf_addr
                Specifies the IPv6 address assigned to the port. You must set
                this argument to use IPv6 routing. To specify the IPv6 address,
                the mode argument must be set to either config or modify.

ipv6_intf_addr_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the increment used to generate IPv6 subinterface
                addresses. The default value is 0000::1. The mode argument must
                be set to either config or modify.

ipv6_gateway
                Specifies the IPv6 gateway address assigned to the port. The
                mode argument must be set to either config or modify.

ipv6_gateway_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the increment used to generate gateway IPv6 addresses for
                the router's subinterfaces.
                The default value is 0000::1. The mode argument must be set to
                either config or modify.

ipv6_resolve_gateway_mac
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables/disables MAC resolving for the IPv6 gateway. Possible
                values are true (enable) and false (disable). The default value is
                true. If this argument is set to false, ARP will not resolve.
                You must set the mode argument to either config or modify.

ipv6_prefix_length
                The prefix length for the IPv6 address specified with the
                ipv6_intf_addr argument. The -mode argument must be set to
                either config or modify. You must also specify the
                ipv6_intf_addr argument.

lais_lrdi_threshold
                Specifies the number of consecutive frames for which the line
                Alarm Indicating Signal (AIS) and line Remote Defect Indication
                (RDI) must be present before being reported. Possible values
                range from 5-65535. The default is 5.

mode
                Specifies what action to take. Possible values are config,
                modify, or destroy. The default is config. The value of config is
                the handle of the port to configure. The value of modify is the
                handle of the port to modify. The value of destroy is the handle
                of the port to delete. This argument is `Mandatory`. The modes are
                described below::


                 config - Sets the initial interface values for the specified
                        port. After you have connected to a chassis, you must call
                        the interface_config function for each port, specifying this
                        mode and any additional arguments to configure the port.

                 modify - Modifies the specified port with the values you
                         provided.

                 destroy - Releases the system resources used by the specified
                         port.

performance_mode
                Specifies port performance mode available on the supported hardware.
                Possible values are STC_DEFAULT and STC_L1.
                The default is STC_DEFAULT. The modes are described below::


                 STC_DEFAULT - All the ports enabled.

                 STC_L1 - L1 services testing enabled.
                          Applicable for 50/100/200/400/800Gig ports.

                 STC_MGIG - Converts ports to STCBASE-T(ACC-7103A) and to configure
                            alternate_speeds argument with 2.5G/5G/0.1G/1G/10G speeds.
                            Applicable for MX2-10GS12 module.

                 STC_PERF - Performance mode is enabled.
                            Applicable for 100Gig ports.

                 STC_ROUTING - Routing mode is enabled.
                               Applicable for 100Gig ports.

max_recv_size
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the maximum frame size. Possible values range from 64
                to 2120. The default is 2112.

netmask
                Defines the netmask to use for the IP address of this port. The
                mode argument must be set to either config or modify.

path_signal_label
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the contents of the C2 byte as the path signal label.
                Possible values are described below.

                 HDLC - HDLC Path Signal Label
                 PPP  - Pointto-Point Protocol (PPP) Path Signal Label
                 ATM  - Asynchronous Transfer Mode Path Signal Label
                 ETHERNET_10G_WAN -  Ethernet 10G Wan Path Signal Label

                The default is HDLC. This argument is available when
                you specify speed ether10000.

phy_mode
                Specifies the physical type of connection to the port. Possible
                values are copper or fiber. The mode argument must be set to
                config or modify. The default value is copper.
                Note: When using a dualmode card chassis, you must specify
                phy_mode as copper or fiber, otherwise zero streamblock might be
                resulted.

rx_equalization
                Specifies the tolerance for the signal on the Rx port. Modifying
                the value may result in signal loss on the Rx port. That
                depends on the optics being used and the strength
                of the signal being transmitted by the peer. Possible values
                range from 0 to 15. The default value is 8. This argument
                is available when speed is set to ether25Gig, ether40Gig,
                ether50Gig, ether100Gig, ether400Gig or ether800Gig.
port_handle
                Specifies a list ports to configure. A port handle
                is a value that uniquely identifies a port on a chassis. The
                port_handle value is obtained from the connect function. To
                configure a port, you must specify at least one port handle in
                this function. This argument is `Mandatory`.

port_mode
                Specifies whether the port is connected to a local area network
                (LAN) or to a widearea network (WAN). Possible values are LAN or
                WAN. The mode argument must be set to config or modify. The
                default value is WAN.

port_name
                Specifies the name of the port.
                By default, the port name includes status (Offline or Online) and
                location information (physical port and slot numbers).

port_loadunit
                `Spirent Extension (for Spirent HLTAPI only).`

                Load unit for the overall port load when scheduling_mode is set to
                portbased. Possible values are described below::


                 PERCENT_LINE_RATE     Load as a percentage of the bandwidth
                                       available on the specified port

                 FRAMES_PER_SECOND     Load as the number of frames per second
                                       on the specified port

                 INTER_BURST_GAP       Load as the gap in bytes between adjacent
                                       bursts on the specified port

                 BITS_PER_SECOND       Load as the number of bits per second
                                       on the specified port

                 KILOBITS_PER_SECOND   Load as the number of kilobits per second
                                       on the specified port

                 MEGABITS_PER_SECOND   Load as the number of megabits per second
                                       on the specified port

                The default value is PERCENT_LINE_RATE.

port_load
                `Spirent Extension (for Spirent HLTAPI only).`

                Load value, in the unit specified by port_loadunit. The default
                is 10 when the port_loadunit is set to PERCENT_LINE_RATE.

receiver_ready_delay_mode
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the receiver ready delay mode. Possible values are::


                 fixed    Delay a Receiver Ready (R_RDY) message for a specified
                          fixed time

                 random   Delay an R_RDY message for a specified random time period
                          between the maximum and the minimum time


                The default value is fixed.

receiver_ready_delay_max
                `Spirent Extension (for Spirent HLTAPI only).`

                Maximum delay time. This argument is only available when
                receiver_ready_delay_mode is set to random. Possible values
                range from 0 to 500000. The default is 100.

receiver_ready_delay_min
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a fixed delay time when receiver_ready_delay_mode is
                set to fixed, or the minimum delay time when
                receiver_ready_delay_mode is set to random. Possible values
                range from 0 to 500000. The default is 0.

receiver_ready_delay_units
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the unit of time measurement that you want to apply to
                your delay. Possible values are ms (milliseconds) and us
                (microseconds). The default is ms.

receiver_timeout
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the receive timeout counter. Possible values range from
                1 to 65535. The default is 12.

rx_credits
                `Spirent Extension (for Spirent HLTAPI only).`

                Number of frames the port can receive. Possible values range from
                1 to 65535. The default is 16.

resolve_gateway_mac
                `Spirent Extension (for Spirent HLTAPI only).`

                Enables/disables MAC resolving for the IPv4 gateway. Possible
                values are true (enable) and false (disable). The default value is
                true. If this argument is set to false, ARP will not resolve. You must
                set the mode argument to either config or modify.

scramble
                Enables or disables scrambling of the transmit SONET/SDH payload
                using a selfsynchronizing x^43 + 1 scrambler. This argument is
                available in 10G WAN mode only. Valid values are true and false.
                The default is true (enable). You can use this argument when
                mode is set to config or modify and -speed is set to ether10000.

scheduling_mode
                Specifies the traffic load scheduling mode. Possible values are
                described below::


                 port_based - The load is controlled at port level; guarantees a
                       fixed interframe gap (IFG) for Layer 2 testing. The order of
                       frames sent is determined by the order of the configured
                       stream blocks.

                 rate_based - Use this mode to allow multiple load values for
                       streams within the same stream block.

                 priority_based - Highpriority stream blocks are scheduled first,
                       lower priority stream blocks are fit into gaps left available
                       by higher priority stream blocks.

                 manual_based - Use this scheduling mode to configure tightly
                        controlled traffic for functional testing.

                The default value is rate_based.

manual_schedule_stream_handle
                Specifies the handle(s) of the streamblock(s) for which to configure
                manual schedule entries. This argument is `Mandatory` to configure
                manual scheduling.

manual_schedule_entry_handle
                Specifies the handle(s) of the created manual schedule entries.
                Use this argument to modify existing manual schedule entries.

manual_schedule_inter_frame_gap
                Specifies the gap between frames within a burst. This value is
                combined with the unit of measure selected in InterFrame Gap Unit.
                The default value is 12.

manual_schedule_inter_burst_gap
                Specifies the gap between bursts of transmitted packets.
                This value is combined with the unit of measure selected in
                InterBurst Gap Unit. The default value is 1344.

manual_schedule_inter_entry_gap
                Specifies the gap between stream entries. This value is combined
                with the unit of measure selected in InterEntry Gap Unit.
                The default value is 2000.

manual_schedule_burst_size
                Specifies the number of packets in each burst.
                The default value is 1.

manual_schedule_burst_count
                Specifies the number of bursts to be transmitted by the entry.
                The default value is 1.

manual_schedule_loop_count
                Specifies the number of times that the stream block sequence
                is transmitted. The default value is 1.

manual_schedule_cont_transmission
                Specifies whether the associated stream block to run in continuous
                transmission mode after the step sequence of the preceding stream
                blocks are completed or not. Possible values are true and false.
                When Continuous Transmission mode is disabled, transmission of
                scheduled traffic always begins with the first entry in the
                Manual Schedule grid. The default value is false.

manual_schedule_inter_frame_gap_unit
                Specifies the unit for InterFrame Gap. The default value is
                BYTES. Possible Values are described below::


                  Value                   Description
                  PERCENT_LINE_RATE       Gap in percentage of line rate
                  FRAMES_PER_SECOND       Gap as the number of frames per second
                  BYTES                   Gap in bytes
                  MILLISECONDS            Gap in milliseconds
                  NANOSECONDS             Gap in nanoseconds
                  BITS_PER_SECOND         Gap as the number of bits per second
                  KILOBITS_PER_SECOND     Gap in number of kilobits per second
                  MEGABITS_PER_SECOND     Gap in number of megabits per second

manual_schedule_inter_burst_gap_unit
                Specifies the unit for InterBurst Gap. The default value is
                BYTES. Possible Values are described below::


                  Value                   Description
                  PERCENT_LINE_RATE       Gap in percentage of line rate
                  FRAMES_PER_SECOND       Gap as the number of frames per second
                  BYTES                   Gap in bytes
                  MILLISECONDS            Gap in milliseconds
                  NANOSECONDS             Gap in nanoseconds
                  BITS_PER_SECOND         Gap as the number of bits per second
                  KILOBITS_PER_SECOND     Gap in number of kilobits per second
                  MEGABITS_PER_SECOND     Gap in number of megabits per second

manual_schedule_inter_entry_gap_unit
                Specifies the unit for InterEntry Gap. The default value is
                BYTES. Possible Values are described below::


                  Value                   Description
                  PERCENT_LINE_RATE       Gap in percentage of line rate
                  FRAMES_PER_SECOND       Gap as the number of frames per second
                  BYTES                   Gap in bytes
                  MILLISECONDS            Gap in milliseconds
                  NANOSECONDS             Gap in nanoseconds
                  BITS_PER_SECOND         Gap as the number of bits per second
                  KILOBITS_PER_SECOND     Gap in number of kilobits per second
                  MEGABITS_PER_SECOND     Gap in number of megabits per second

speed
                Sets the line speed for the port. This value is only `Mandatory`
                the first time an interface is configured.

                For Ethernet (intf_mode ethernet), possible values are ether10,
                ether100, ether1000, ehter2500, ether10000, ether5Gig,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig
                and ether800Gig.
                When phy_mode is set to copper, the default speed is ether10.
                When phy_mode is set to fiber, the speed automatically defaults
                to the correct speed.
                Only ether10000 (SPEED_10G) is supported on Ethernet 10 Gig ports.
                ether25Gig (SPEED_25G) is supported on Ethernet 25 Gig ports.
                ether40Gig (SPEED_40G) is supported on Ethernet 40 Gig ports.
                ether50Gig (SPEED_50G) is supported on Ethernet 50 Gig ports.
                ether100Gig (SPEED_100G) is supported on Ethernet 100 Gig ports.
                ether400Gig (SPEED_400G) is supported on Ethernet 400 Gig ports.
                ether200Gig (SPEED_200G) is supported on Ethernet 200 Gig ports.
                ether800Gig (SPEED_800G) is supported on Ethernet 800 Gig ports.

                For POS (intf_mode pos), possible values are ether10, ether100,
                ether1000, ether10000, ether9_286, oc3, oc12, oc48, and oc192. The
                default is oc192.

                For FC (intf_mode fc), possible values are ether2000, ether4000,
                ether8000, and ether10000. The default speed is ether2000.

                Note: SONET transmission speeds are referred to as OC1.

src_mac_addr
                Defines the source MAC address for a Gigabit Ethernet or Gigabit
                Ethernet GBIC interface. You can enter this address in one of the
                following formats::


                  aaaa.bbbb.cccc
                  aaaa:bbbb:cccc
                  aa.bb.cc.dd.ee.ff
                  aa:bb:cc:dd:ee:ff
                  aabb-cc-dd-ee-ff

                The default is 0000.0000.0000. The mode argument must be set to
                either config or modify.

src_mac_addr_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Defines the modifier for the interface MAC address.
                The default is 00:00:00:00:00:01.


topology
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the type of the pointto-point link. Possible values
                are::


                 PTP_PRIVATE     Pointto-point private link
                 PTP_PUBLIC      Pointto-point public link

                The default value is PTP_PUBLIC.


transmit_clock_source
                Specifies the clock source for synchronous transmissions. You
                can set the transmit clock source for Ethernet
                10/25/40/50/100/400/800 and FcPhy interfaces.
                Possible values are::


                 internal - Specifies that a crystal on the interface provides the
                          transmit clock

                 bits - Specifies that a Building Integrated Timing Supply is used
                        as the transmit clock.

                 loop - Specifies that a clock recovered from the received data is
                        used as the transmit clock

                 external - Specifies that the transmit clock signals are provided
                         by external reference sources such as GPS and CDMA.

                 internal_ppm_adj - Adjusts the clock PPM within the
                         IEEE clock frequency.

                The default is internal. This argument is available when speed
                is set to ether100Gig or ether40Gig.


traffic_class
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the traffic class. Possible values are:

                 TRAFFIC_CLASS_2   Guaranteed delivery for connectionless traffic

                 TRAFFIC_CLASS_3   Besteffort connectionless service

                The default value is TRAFFIC_CLASS_3.


transmit_clock_source
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the transmit clock source. Possible values are::


                 INTERNAL             Crystal on the interface provides the clock
                 INTERNAL_PPM_ADJ    Offset in parts per million

                The default value is INTERNAL.

tx_credits
                `Spirent Extension (for Spirent HLTAPI only).`

                Number of frames the port can send. This argument is only
                available when topology is set to ptp_private. Possible values
                range from 1 to 65535. The default value is 16.

tx_preemphasis_main_tap
                Sets the preemphasis main tap on the Tx port. The sum of
                the values of tx_preemphasis_main_tap and
                tx_preemphasis_post_tap must be less than 32. Possible values
                range from 0 to 31. The default value is 21. This argument is
                available when speed is set to ether25Gig, ether40Gig, ether50Gig,
                ether100Gig or ether400Gig.

tx_preemphasis_post_tap
                Sets the preemphasis post tap on the Tx port. The sum of
                tx_preemphasis_main_tap and tx_preemphasis_post_tap values must
                be less than 32. The parameter is used only for Ethernet 40Gig
                and 100Gig interfaces. Possible values range from 0 to 15. The
                default value is 8. This argument is only available when speed
                is set to ether25Gig, ether40Gig, ether50Gig, ether100Gig,
                ether400Gig or ether800Gig.

tx_s1
                Specifies the synchronization status S1 byte value to be
                transmitted. Possible values range from 0 to 65535. The default
                is 0.

tx_fcs
                Specifies the value for the Frame Check Sequence size for the
                transmitting side of each interface. Possible values are 16 and
                32. The default is 32.

vlan
                Enables or disables VLAN on the traffic generation tool
                interfaces. Valid values are 0 and 1. The default is 1 (enable).
                The mode argument must be set to config or modify.
                If the vlan argument is set to 0, no VLAN Ethernet Interface or
                Qin-Q Ethernet Interface will be created even though -vlan_id
                and vlan_outer_id have been provided.

vlan_id
                `Spirent Extension (for Spirent HLTAPI only).`

                The VLAN ID of the first VLAN subinterface. Possible values range
                from 0 to 4095. The is no default value for this option. If the
                vlan argument is set to 1 and the vlan_id argument is provided,
                VLAN Ethernet Interface will be set.

vlan_id_count
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of VLAN IDs to use when generating
                multiple VLANs. Possible values range from 1 to 4096. The
                default is 1.

vlan_id_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the value to increment the VLAN IDs. You must specify
                this step when vlan_id_count is greater than 1. The default
                value is 1. Possible step values range from 0 to 4095.

vlan_user_priority
                `Spirent Extension (for Spirent HLTAPI only).`

                VLAN user priority assigned to emulated subinterfaces. Possible
                values range from 0 to 7. The default is 0.

vlan_cfi
                `Spirent Extension (for Spirent HLTAPI only).`

                VLAN CFI assigned to emulated subinterfaces. Possible values are
                1 and 0. The default is 0.

vlan_outer_id
                `Spirent Extension (for Spirent HLTAPI only).`

                The outer VLAN ID of the first outer VLAN subinterface. Possible
                values range from 0 to 4095. The is no default value for this
                option. If the vlan argument is set to 1 and both vlan_id
                argument and the vlan_outer_id argument is provided, then the
                Qin-Q Ethernet Interface will be set.

vlan_outer_id_count
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the number of outer VLAN IDs to use when generating
                multiple outer VLANs. Possible values range from 1 to 4096.
                The default is 1.

vlan_outer_id_step
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the value to increment the outer VLAN ID.
                You must specify this step when vlan_outer_id_count is
                greater than 1. The default value is 1. Possible step
                values range from 0 to 4095.

vlan_outer_user_priority
                `Spirent Extension (for Spirent HLTAPI only).`

                Outer VLAN user priority assigned to emulated interface.
                Possible values range from 0 to 7. The default is 0.

vlan_outer_cfi
                `Spirent Extension (for Spirent HLTAPI only).`

                Outer VLAN CFI assigned to emulated interface.
                Possible values are 1 and 0. The default is 0.

qinq_incr_mode
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the increment mode for Qin-Q Ethernet interfaces.
                This parameter only applies to Qin-Q Ethernet interfaces.
                Possible values are inner, outer and both. The
                default is both. The modes are described below::


                 inner - The inner VLAN ID is incremented first until
                      the specified number of inner VLANs is
                      exhausted, then the outer VLAN ID is
                      incremented. This continues in a roundrobin
                      fashion until the number of outer VLANs is
                      exhausted.

                 outer - The outer VLANs ID is incremented first
                      until the specified number of outer VLANs is
                      exhausted, then the inner VLAN ID is
                      incremented. This continues in a roundrobin
                      fashion until the number of inner VLANs is
                      exhausted.

                 both - The inner VLAN ID and outer VLAN ID increment
                      at the same time. When inner VLAN count is
                      larger than the outer VLAN count, then the
                      inner VLAN ID will continues in a roundrobin
                      fashion until the number of the outer VLAN ID
                      is exhausted. A similar process takes place when
                      the outer VLAN count is larger than the inner
                      VLAN count.

                For example, if vlan_id is set to 100, vlan_outer_id 200
                vlan_id_count 4, vlan_outer_id_count 2, the vlan_id_step
                argument 1 and vlan_outer_id_step 1,

                For inner mode, generated values will be::


                    (100,200) (101 200) (102,200) (103 200)
                    (100,201) (101 201) (102,201) (103 201)

                For outer mode, generated values will be::


                    (100,200) (100 201) (101,200) (101 201)
                    (102,200) (102 201) (103,200) (103 201)

                For both mode, generated values will be::


                    (100,200) (101 201) (102,200) (103 201)

pfc_negotiate_by_dcbx
                Enables or disables Data Center Bridging Capability
                Exchange Protocol (DCBX) via LLDP to negotiate the
                priority flow control settings or manually select priority
                flow control settings. Possible values are 0 (disable)
                and 1 (enable). The default value is 0. You can use
                this argument when you specify speed ether10000, ether25Gig,
                ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig.

priority0
                Enables or disables the priority 0 queue for
                Priority Flow Control (PFC)frames. Possible values
                are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify
                speed ether10000, ether25Gig, ether40Gig, ether50Gig,
                ether100Gig, ether400Gig or ether800Gig and pfc_negotiate_by_dcbx 0.

priority1
                Enables or disables the priority 1 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority2
                Enables or disables the priority 2 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority3
                Enables or disables the priority 3 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority4
                Enables or disables the priority 4 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority5
                Enables or disables the priority 5 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority6
                Enables or disables the priority 6 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.

priority7
                Enables or disables the priority 7 queue for PFC frames. Possible
                values are 0 (disable) and 1 (enable). The default value is 0.
                This argument is only available when you specify speed ether10000,
                ether25Gig, ether40Gig, ether50Gig, ether100Gig, ether400Gig or
                ether800Gig and pfc_negotiate_by_dcbx 0.


pfc_priority_enable
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a list of Boolean values to enable or
                disable the queue for PFC frames, starting from
                priority0 to priority7. Possible values are true and
                false. The default value is
                "false false false false false false false false".


pfc_priority_pause_quanta
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies a list of pause quanta for queues from priority0 to
                priority7. Possible values range from 0 to 65535. Values less
                than 0 will be set as 0; values greater than 65535 will be set as
                65535. The default value is "0 0 0 0 0 0 0 0".


pfc_send_xon
                `Spirent Extension (for Spirent HLTAPI only).`

                When enabled, XON frames will be sent. Possible
                values are 0 (disable) and 1 (enable). The default
                value is 0.

pfc_xon_delay
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the delay in quanta before sending the XON
                frame. Possible values range from 1 to 3273000. The
                default value is 1.

pfc_xon_delay_unit
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies the unit for XON delay. Possible values
                are::


                 pause_quanta       XON delay is specified in quanta
                 microseconds       XON delay is specified in microseconds

                The default value is pause_quanta.

rx_hec
                Enables ATM HEC correction, Valid values are 0 and 1. The default
                is 0 (disable). The mode argument must be set to config or
                modify.

detection_mode
               Specifies the detection mode to set emphasis values based on the module type.
               Possible values are auto_detect, manual and advanced.
               The default value is auto_detect.

cable_length_type
               Specifies the cable type and length.
               The default value is optical.
               This argument is only available when you set detection_mode to
               manual.

tx_deemphasis_post_tap
               Specifies the transmit deemphasis post tap value.
               Possible values are from 0 to 71. This argument is only available
               when you set detection_mode to advanced.
               The default value is 13.

tx_deemphasis_pre_tap
               Specifies the transmit deemphasis pre tap value.
               Possible values are from 0 to 71. This argument is only available
               when you set detection_mode to advanced.
               The default value is 0.

tx_main_tap_swing
               Specifies the transmit main tap swing value.
               Possible values are from 0 to 31. This argument is only available
               when you set detection_mode to advanced.
               The default value is 15.

enable_auto_negotiation_master_slave
               Specifies whether to enable the Ethernet 200G fiber port to
               be master or slave for auto negotiation. Possible values are
               true and false. The default value is true.

priority_flow_control_array
               Specifies whether to set array of boolean priority bit values
               (8 bits). Possible values are true and false. The default value
               is false.

auto_negotiation_master_slave
               Specifies the Ethernet 200G fiber port to be master or
               slave for auto negotiation. The default value is master.
               Possible Values are described below::


                  Value                      Description
                  slave                      Slave
                  master                     Master
                  fault                      Fault

optimized_xon
               Specifies whether to enable or disable optimized XON value
               on the Ethernet 200G fiber port. Possible values are enable
               and disable. The default value is disable.

test_mode
               Specifies the test mode value of Ethernet 200G fiber port.
               The default value is normal_operation. Possible Values are
               described below::


                  Value                             Description
                  normal_operation                  Normal operation
                  normal_operation_full_power       Normal operation full power
                  transmit_droop                    Transmit droop
                  master_transmit_jitter            Master transmit jitter
                  slave_transmit_jitter             Slave transmit jitter
                  transmitter_distortion            Transmitter distortion

pfc_cable_delay
               Specifies the length of PFC cable delay on the Ethernet 200G
               fiber port.

pfc_cable_delay_type
               Specifies the type of cable to simulate PFC delay on the
               Ethernet 200G fiber port. Possible values are fiber and
               copper. The default value is fiber.

port_setup_mode
               Specifies whether to configure port setup or hardware register
               parameters. The default value is portconfig_only.
               Possible Values are described below::


                  Value                   Description
                  portconfig_only         Port setup configuration only
                  registers_only          Hardware register configuration only

ignore_link_status
               Specifies whether to allow the Ethernet 200G fiber port to continue
               transmitting traffic if the link(s) with its peer port(s) goes down.
               Possible values are true and false. The default value is false.

advertise_ieee
               Specifies whether to advertise IEEE on the Ethernet 200G fiber
               port. Possible values are true and false. The default value is
               false.

advertise_nbaset
               Specifies whether to advertise NBASE-T on the Ethernet 200G fiber
               port. Possible values are true and false. The default value is
               false.

down_shift_enable
               Specifies whether to enable or disable Downshift on the Ethernet
               200G fiber port. Possible values are true and false. The default
               value is false.

enable_8023_br_per_port
               Specifies whether to enable 8023 per port. Possible values are
               true and false. The default value is false.

cfp_interface
               Specifies the CFP interface value on the Ethernet 200G fiber
               port. The default value is ACC_6068A.

custom_fec_mode
               Specifies the custom FEC mode on the Ethernet 200G fiber port.
               The default value is kr_fec. Possible Values are described below::


                  Value                   Description
                  none                    No custom FEC mode
                  kr_fec                  KR FEC mode
                  rs_fec                  RS FEC mode
                  kp4_fec                 KP4 FEC mode

Arguments Unsupported by Save as HLTAPI:

The following Spirent HLTAPI arguments are currently not supported by the
Save as HLTAPI function::


  arp_cache_retrieve
  arpnd_report_retrieve
  arp_target
  arp_send_re
  arp_req_timer
  port_load
  port_loadunit
  qinq_incr_mode
  vlan_id_count
  vlan_outer_id_count
Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:
None

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:

arp
action
arp_on_linkup
connected_count
check_gateway_exists
data_integrity
integrity_signature
integrity_signature_offset
no_sut
gateway_incr_mode
gre_ip_prefix_length
ignore_link
port_rx_mode
pgid_offset
port_rx_mode
sequence_checking
qos_byte_offset
qos_packet_type
qos_pattern_offset
qos_stats
qos_pattern_match
qos_pattern_mask
sequence_num_offset
signature
signature_start_offset
signature_offset
transmit_mode
vlan_id_mode
Ciscospecific Arguments:

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

aps
aps_arch
aps_channel
aps_request_1_1
aps_request_1_n
aps_switch_mode
auto_line_rdi
auto_line_rei
auto_path_rdi
auto_path_rei
crlf_path_trace
ignore_pause_frames
interpacket_gap
line_ais
line_bip24
line_bip384
line_bip96
line_rdi
line_rei
line_type
long_lof_wait
op_mode
output_enable
path_ais
path_bip8
path_rdi
path_rei
path_type
pause_length
prdi_threshold
rx_c2
rx_enhanced_prdi
rx_fcs
rx_scrambling
section_bip8
section_unequip
signal_fail_ber
ss_bits_pointer_interp
tx_c2
tx_enhanced_prdi
tx_k2
tx_scrambling
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 (1) or failure (0) of the operation.
log                   An error message (if the operation failed).
arpnd_status          Success (1) or failure (0) of the ARP operation.
arpnd_cache           Displays the ARP cache table on the specified port
                      when arp_cache_retrieve is set to 1.
line_speed            Displays the line speed on the specified port.
Description:

The interface_config function sets, modifies, or deletes a port configuration. Use the port_handle argument to identify the port. (The port handle value is contained in the keyed list returned by the connect function.) Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

You can set the interface type (see intf_mode) to ethernet, pos_hdlc, pos_ppp, atm or fc.

Here is an example of a configuration for POS (Packet over SONET) HDLC:

::interface config mode=config
                          port_handle $p0
                          speed oc192
                          intf_mode pos_hdlc
                          control_plane_mtu 1500
                          framing SONET

To enable ARP, you must:

  1. Set enable ARP at the port level, using this command:

    interface config arp_send_req=1
    

    This request enables ARP for all stream blocks under the specified port.

  2. Specify the MAC discovery gateway for the stream block, as shown below:

    traffic config mac_discover_gw=<a.b.c.d>
    
  3. Call the traffic control action=run port_handle $porthandle function, as shown below:

    interface config arp_send_req=1
    traffic config mac_discover_gw=90.37.0.1
    traffic control action=run port_handle $porthandle
    

To disable ARP:

interface config arp_send_req=0

To use Ethernet 10G fiber for a WAN card, you must specify the following:

interface config
        mode config
        port_handle $p0
        port_mode WAN
        speed ether10000
Examples:

Sample Input:

interface config port_handle= $qinq_port
      mode=                   config
      intf_ip_addr=       10.0.0.2
      intf_ip_addr_step=  0.1.0.0
      gateway=            10.0.0.1
      gateway_step=       0.1.0.0
      autonegotiation=    1
      arp_send_req=       1
     arp_req_retries=     10
      phy_mode=           copper
      vlan_id=            100
      vlan_id_count=      5
      vlan_outer_id=      200
      vlan_outer_id_count=   2
      vlan=               1
      vlan_outer_id_step=  1
      vlan_outer_user_priority=  6
      vlan_outer_cfi=      1
      qinq_incr_mode=    "both"

The following example applies the ARP to the port. It also checks the ARP results and retrieves the ARP/Nd Statistics:

::interface config port_handle= $portHnd
       mode=                modify
       arp_send_req=        1
       arp_target=         port
       arpnd_report_retrieve= 1]

Sample Output:

<ARP SUCCESS> {arpnd_status 1} {arpnd_cache } {arpnd_report {{arpnd_status SUCCESSFUL} {failed_arpnd_count 0} {successful_arpnd_count 1} {attempted_arpnd_count 1}}} {port1 {{line_speed SPEED_10G}}} {status 1}

<ARP FAILURE> {arpnd_status 1} {arpnd_cache } {arpnd_report {{arpnd_status FAILURE} {failed_arpnd_count 1} {successful_arpnd_count 0} {attempted_arpnd_count 1}}} {port1 {{line_speed SPEED_10G}}} {status 1}

To configure an FC interface on the specified port:

set rtn [interface config
       mode=                      config
       port_handle=               port1
       speed=                     ether4000
       intf_mode=                 fc
       data_path_mode=            normal
       internal_ppm_adjust=       50
       control_plane_mtu=         100
       transmit_clock_source=     internal_ppm_adj
       receiver_ready_delay_min=  10
       receiver_ready_delay_mode= fixed
       receiver_ready_delay_units= us
       max_recv_size=             100
       receiver_timeout=          200
       rx_credits=                300
       topology=                  ptp_public
       traffic_class=             traffic_class_2
       tx_credits=                400]

Sample Output:

{status 1}

To configure TBase= speeds 2.5G/5G/0.1G/1G/10G for module MX2-10GS12:

set rtn [interface config
       mode=                      config
       port_handle=               port1
       speed=                     ether10000
       phy_mode=                  fiber
       autonegotiation=           1
       performance_mode=          STC_MGIG
       alternate_speeds=          "SPEED_10G SPEED_5G SPEED_2500M SPEED_1G SPEED_100M"
       create_host=               false
       arp_send_req=              0 ]

The following example is to configure 400Gig ports:

set int_ret0 [interface config
  mode=                                             config
  port_handle=                                      $port1
  create_host=                                      false
  intf_mode=                                        ethernet
  phy_mode=                                         fiber
  scheduling_mode=                                  PORT_BASED
  port_loadunit=                                    PERCENT_LINE_RATE
  port_load=                                        10
  enable_ping_response=                             0
  tx_preemphasis_main_tap=                          21
  control_plane_mtu=                                1500
  transmit_clock_source=                            internal
  forward_error_correct=                            true
  flow_control=                                     false
  collision_exponent=                               10
  deficit_idle_count=                               true
  pfc_negotiate_by_dcbx=                            0
  speed=                                            ether400Gig
  data_path_mode=                                   normal
  internal_ppm_adjust=                              0
  rx_equalization=                                  8
  duplex=                                           full
  autonegotiation=                                  0
  tx_preemphasis_post_tap=                          8]

The following example returns the parameters handle, which is then passed to the emulation isis config function:

# With expand= set to false, param_handle will be returned, which can be
# passed to protocol configuration APIs, for example,mode= activate in
# emulation isis config.
set int_ret0 [interface config
  mode=                                             config
  port_handle=                                      $port1
  intf_mode=                                        ethernet
  phy_mode=                                         copper
  scheduling_mode=                                  RATE_BASED
  port_loadunit=                                    PERCENT_LINE_RATE
  port_load=                                        10
  enable_ping_response=                             0
  control_plane_mtu=                                1500
  pfc_negotiate_by_dcbx=                            0
  speed=                                            ether10000
  duplex=                                           full
  autonegotiation=                                  1
  create_host=                                      false
  count=                                            1
  intf_ip_addr=                                     10.0.0.2
  intf_ip_addr_step=                                0.1.0.0
  gateway=                                          10.0.0.1
  gateway_step=                                     0.1.0.0
  vlan_id=                                          100
  vlan_id_count=                                    5
  vlan_id_step=                                     1
  vlan_outer_id=                                    200
  vlan_outer_id_count=                              5
  expand=                                           false
]

set hnd [keylget int_ret0 param_handle]
set rtn [emulation isis config
 mode=                activate
 handle=             "$hnd"
 area_id=             000001
 hello_padding=       true
 ip_version=          4
 routing_level=       L2
 system_id_step=      00:00:00:00:00:01
 graceful_restart=    1
 wide_metrics=        2
 bfd_registration=    0
 intf_type=           broadcast
 expand=              true
]

Sample Output for interface config:

{arpnd_status 1} {arpnd_cache none} {arpnd_report none} {handle_list {}}
{param_handle emulateddevicegenparams1} {port1 {{line_speed SPEED_10G}}}
{status 1} {handles 0}

Sample Output for emulation isis config:

{handle_list {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4
emulateddevice5 emulateddevice6 emulateddevice7 emulateddevice8 emulateddevice9
emulateddevice10 emulateddevice11 emulateddevice12 emulateddevice13 emulateddevice14
emulateddevice15 emulateddevice16 emulateddevice17 emulateddevice18 emulateddevice19
emulateddevice20 emulateddevice21 emulateddevice22 emulateddevice23 emulateddevice24
emulateddevice25}} {handle {}} {status 1}

The following example creates and returns a list of raw emulated device handles:

# With expand= set to true, a list of emulated devices will be created and their
# handles returned.
set int_ret0 [interface config
   mode=                                             config
   port_handle=                                      $port1
   intf_mode=                                        ethernet
   phy_mode=                                         copper
   scheduling_mode=                                  RATE_BASED
   port_loadunit=                                    PERCENT_LINE_RATE
   port_load=                                        10
   enable_ping_response=                             0
   control_plane_mtu=                                1500
   pfc_negotiate_by_dcbx=                            0
   speed=                                            ether10000
   duplex=                                           full
   autonegotiation=                                  1
   create_host=                                      false
   count=                                            1
   intf_ip_addr=                                     10.0.0.2
   intf_ip_addr_step=                                0.1.0.0
   gateway=                                          10.0.0.1
   gateway_step=                                     0.1.0.0
   vlan_id=                                          100
   vlan_id_count=                                    5
   vlan_id_step=                                     1
   vlan_outer_id=                                    200
   vlan_outer_id_count=                              5
   expand=                                           true
 ]

Sample Output:

{arpnd_status 1} {arpnd_cache none} {arpnd_report none} {handle_list {emulateddevice1
emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5 emulateddevice6
emulateddevice7 emulateddevice8 emulateddevice9 emulateddevice10 emulateddevice11
emulateddevice12 emulateddevice13 emulateddevice14 emulateddevice15 emulateddevice16
emulateddevice17 emulateddevice18 emulateddevice19 emulateddevice20 emulateddevice21
emulateddevice22 emulateddevice23 emulateddevice24 emulateddevice25}}
{param_handle {}} {port1 {{line_speed SPEED_10G}}} {status 1} {handles 0}

If there is an error, you will see: {status 0} {log {Error message }}

Note:

Spirent HLTAPI supports the new dot format for setting the port
parameters (for example, 00.00.00.00.00.01) as well as the previous format
which uses hyphens (for example, 00-00-00-00-00-01).

End of Procedure Header

interface control

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Controls the specified port on a Spirent HLTAPI chassis

Synopsis:

Note: M indicates the argument is `Mandatory`.

     interface control
        mode= {restart_autonegotiation|break_link|restore_link|pfc_response_time|
                enable_monitor|disable_monitor} M]
        port_handle= <handle> M

Arguments:

mode
                Specifies the action to perform for the port(s) specified by the
                port_handle argument. This argument is `Mandatory`. The modes are
                described below::


                 restart_autonegotiation - Restarts autonegotiation

                 break_link - Breaks all the current links on the specified port

                 restore_link - Restores the links broken by break_link

                 pfc_response_time - Measures pause response time

                 enable_monitor - Enables system monitor

                 disable_monitor - Disables system monitor

port_handle
                Specifies the handle for the port to be controlled. This
                argument is `Mandatory`.
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|$FAILURE
log             An error message (if the operation failed)
Description:

The interface control function controls the specified port on a Spirent HLTAPI chassis. Use port_handle to specify the port to be controlled, and use the mode argument to specify the type of control.

Depending on your test configuration, you may break more than one link by using break_link. To restore all of the affected links, use restore_link for the port on which the link was broken.

Examples:

The following example breaks the link on a specified port:

set cmdReturn [interface control mode=break_link
                             port_handle= port1]

The following example restores the broken link:

 set cmdReturn [interface control mode=restore_link
                                port_handle= port1]

The following example measures the pause response time:

  set int_ret0 [interface control
          mode=         pfc_response_time
          port_handle=                                      "$port1"
  ]

Sample Output:

{status 1}

End of Procedure Header

interface stats

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Returns interface statistics for the specified Ethernet port. Statistics include interface configuration parameters such as port handle, interface type, card name, port name, and interface speed as well as statistics about the Ethernet attributes associated with the port. These attributes include the port’s MAC address, number of frames or bytes successfully transmitted, number of frames or bytes successfully received, number and type of collisions that occurred, the port speed and duplex setting, and the link state of the port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     interface stats
        port_handle= <handle>
        port_handle_list= <handle_list>
        properties= <property_list>

Arguments:

 port_handle
                 The name of the port for which you want information, for example,
                 port1. You must specify port_handle or port_handle_list list,
                 but not both.

 port_handle_list
                 A list of handles of the ports for which you want information,
                 for example, port_handle_list $portList. You must specify
                 port_handle or port_handle_list list, but not both.

 properties
                 Specifies a set of analyzer/generator attributes for which you
                 want the results. You can use the db_file argument alone with
                 the corresponding action in the traffic control funtion to
                 determine whether to return EOT or runtime results. If no
                 property is specified, all properties will be returned.

The following are common properties for both EOT and runtime results::


    Analyzer                                Generator

    ana.rx_frames                         gen.tx_frames
    ana.rx_bytes                          gen.tx_bytes
    ana.rx_fcs_error                      gen.tx_total_mpls_frame_count
    ana.rx_runt_frames                    gen.tx_generator_frame_count
    ana.rx_sig_count                      gen.tx_generator_sig_frame_count
    ana.rx_max_frame_length               gen.tx_generator_octet_count
    ana.rx_prbs_fill_byte_count           gen.tx_generator_ipv4_frame_count
    ana.rx_jumbo_frame_count              gen.tx_generator_ipv6_frame_count
    ana.rx_ipv6_over_ipv4_frame_count     gen.tx_generator_vlan_frame_count
    ana.rx_mpls_frame_count               gen.tx_generator_mpls_frame_count
    ana.rx_ipv4_CheckSum_error_count      gen.tx_generator_crc_error_frame_count
    ana.rx_tcp_CheckSum_error_count       gen.tx_generator_l3_checksum_error_count
    ana.rx_oversize_frame_count           gen.tx_generator_l4_checksum_error_count
    ana.rx_prbsbit_error_count            gen.tx_generator_l3_checksum_error_rate
    ana.rx_trigger1_count                 gen.tx_generator_l4_checksum_error_rate
    ana.rx_trigger2_count                 gen.tx_generator_crc_error_frame_rate
    ana.rx_trigger4_count                 gen.tx_generator_abort_frame_rate
    ana.rx_trigger5_count                 gen.tx_generator_undersize_frame_count
    ana.rx_trigger6_count                 gen.tx_generator_oversize_frame_count
    ana.rx_combo_trigger_count            gen.tx_generator_jumbo_frame_count
    ana.rx_pfc_frame_rate                 gen.tx_generator_abort_frame_count
    ana.rx_fcoe_frame_rate                gen.tx_hw_frame_count
    ana.rx_pfc_frame_count                gen.tx_pfc_frame_count
    ana.rx_fcoe_frame_count               gen.tx_pfc_pri[0-7]_frame_count
    ana.rx_pfc_pri[0-7]_frame_count
    ana.rx_icmp_frame_count
    ana.rx_ipv6_frame_count
    ana.rx_pause_frame_count
    ana.rx_vlan_frame_count

   FC

   fc.b2b_tx_credit_count
   fc.b2b_tx_credit_na_count
   fc.class2_tx_frame_count
   fc.class2_rx_frame_count
   fc.class3_tx_frame_count
   fc.class3_rx_frame_count
   fc.othercls_tx_frame_count
   fc.othercls_rx_frame_count
   fc.class2_tx_frame_rate
   fc.class2_rx_frame_rate
   fc.class3_tx_frame_rate
   fc.class3_rx_frame_rate
   fc.othercls_tx_frame_rate
   fc.othercls_rx_frame_rate
   fc.total_cls2_tx_byte_count
   fc.total_cls2_rx_byte_count
   fc.total_cls3_tx_byte_count
   fc.total_cls3_rx_byte_count
   fc.total_othercls_tx_byte_count
   fc.total_othercls_rx_byte_count
   fc.total_cls2_tx_byte_rate
   fc.total_cls2_rx_byte_rate
   fc.total_cls3_tx_byte_rate
   fc.total_cls3_rx_byte_rate
   fc.total_othercls_tx_byte_rate
   fc.total_othercls_rx_byte_rate


The following properties are specific to runtime results::


   ana.rx_byte_rate                      gen.tx_generator_frame_rate
   ana.rx_hw_frame_count                 gen.tx_generator_ipv4_frame_rate
   ana.rx_frame_rate                     gen.tx_generator_ipv6_frame_rate
   ana.rx_ipv4_frame_rate                gen.tx_generator_jumbo_frame_rate
   ana.rx_ipv6_frame_rate                gen.tx_generator_mpls_frame_rate
   ana.rx_ipv6_over_ipv4_frame_rate      gen.tx_generator_octet_rate
   ana.rx_jumbo_frame_rate               gen.tx_generator_oversize_frame_rate
   ana.rx_pause_frame_rate               gen.tx_generator_sig_frame_rate
   ana.rx_sig_rate                       gen.tx_generator_undersize_frame_rate
   ana.rx_counter_timestamp              gen.tx_generator_vlan_frame_rate
   ana.rx_icmp_frame_rate                gen.tx_total_frame_rate
   ana.rx_udp_CheckSum_err_rate          gen.tx_total_mpls_frame_rate
   ana.rx_vlan_frame_rate                gen.tx_total_octet_rate
                                         gen.tx_counter_timestamp

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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):

intf_type      The port type.

card_name      The name of the interface card.

port_name      The name of the port on the interface card.

intf_speed     The speed of the port in megahertz (MHz). Valid values
               are 10, 100, 1000, 10000, 25000, 100000, 400000, 40000, 50000,
               9_286000, fc, oc3, oc12, oc48 or oc192.

For Ethernet 10/100 interfaces, the following statistics are also returned:

link           The link state of the port: 1 if the port is up or 0 if it
                  is down.

duplex         The port's duplex mode: full or half.

For Gigabit Ethernet/GBIC interfaces, the following statistics are also returned:

link           The link state of the port: 1 if the port is up or 0 if it
                  is down.

macaddress     Returns the MAC address.

Additionally, the following counters are available for the transmitting and receiving ports for 10/100, GBIC, and 10GBIC speed cards:

rx_byte_rate   The rate at which bytes are received.

rx_bytes       Number of bytes that were received.

rx_combo_trigger_count
                  Number of frames captured by all the triggers

rx_combo_trigger_rate
                  Number of frames received by the all the triggers over the
                  last onesecond interval

rx_fcs_error
                  Received CRCerror frame count. The number of packets
                  received that had a length between 64 and 1518 octets
                  (excluding framing bits, but including FCS octets) containing
                  a bad FCS and an integral number of octets.

rx_fcs_error_rate
                  Number of FCS error frames received over the last
                  onesecond interval

rx_frame_rate
                  Rate at which frames are received

rx_frames
                  Number of frames that were successfully received

rx_fcoe_frame_rate
                  Number of FCoE frames received over the last onesecond interval

rx_fcoe_frame_count
                  Number of FCoE frames received

rx_hw_frame_count
                  Number of hardware frames received

rx_pause_frame_count
                   Number of pause frames received.

rx_icmp_frame_rate
                  Number of ICMP frames received over the last onesecond
                  interval

rx_icmp_frame_count
                  Number of ICMP frames received.

rx_vlan_frame_count
                  Number of VLAN frames received.

rx_vlan_frame_rate
                  Number of VLAN frames received over the last onesecond interval.

rx_ipv4_CheckSum_error_count
                  Number of IPv4 checksum errors received.

rx_ipv4_frame_rate
                  Number of IPv4 frames received over the last onesecond interval

rx_ipv6_frame_rate
                  Number of IPv6 frames received over the last onesecond interval

rx_ipv6_frame_count
                      Number of IPv6 frames received.

rx_ipv6_over_ipv4_frame_count
                  Number of IPv6 over IPv4 frames received

rx_ipv6_over_ipv4_frame_rate
                  Number of IPv6 over IPv4 frames received over the last
                  onesecond interval

rx_jumbo_frame_count
                  Number of Jumbo frames received

rx_jumbo_frame_rate
                  Number of Jumbo frames received over the last onesecond interval

rx_max_frame_length
                  Maximum frame length received (in bytes)

rx_min_frame_length
                  Minimum frame length received (in bytes).

rx_mpls_frame_count
                  Number of MPLS frames received

rx_mpls_frame_rate
                  Number of MPLS frames received over the last onesecond interval

rx_oversize_frame_count
                  Number of oversize frames received

rx_oversize_frame_rate
                  Number of oversize frames received over the last onesecond
                  interval

rx_pause_frame_rate
                  Number of pause frames received over the last onesecond interval

rx_pfc_frame_rate
                  Number of PFC frames received over the last onesecond interval

rx_pfc_frame_count
                  Number of PFC frames received

    rx_pfc_pri0_frame_count
                  Number of priority0 pause frames received.

    rx_pfc_pri1_frame_count
                  Number of priority1 pause frames received.

    rx_pfc_pri2_frame_count
                  Number of priority2 pause frames received.

    rx_pfc_pri3_frame_count
                  Number of priority3 pause frames received.

    rx_pfc_pri4_frame_count
                  Number of priority4 pause frames received.

    rx_pfc_pri5_frame_count
                  Number of priority5 pause frames received.

    rx_pfc_pri6_frame_count
                  Number of priority6 pause frames received.

    rx_pfc_pri7_frame_count
                  Number of priority7 pause frames received.

rx_prbs_bit_rate
                  Number of PRBS bit error frames received over the last
                  onesecond interval

rx_prbs_fill_byte_count
                  Number of PRBS bits received

rx_prbsbit_error_count
                  Number of PRBS bit errors received

rx_runt_frames  Number of undersize frames received (Count for each carrier
                  event in which the byte count was less than 64)

rx_counter_timestamp
                  Time when the counter was stored.

rx_sig_count
                  Number of Spirent Signature frames received

rx_sig_rate
                  The rate at which Spirent Signature frames are received

rx_tcp_CheckSum_error_count
                  Number of frames with TCP checksum error received

rx_tcp_frame_rate
                  Number of TCP frames received over the last onesecond
                  interval.

rx_trigger1_count
                  Number of frames captured by trigger 1

rx_trigger1_rate
                  Number of frames received by trigger 1 over the last
                  onesecond interval

rx_trigger2_count
                  Number of frames captured by trigger 2

rx_trigger2_rate
                  Number of frames received by trigger 2 over the last
                  onesecond interval

rx_trigger3_count
                  Number of frames captured by trigger 3

rx_trigger3_rate
                  Number of frames received by trigger 3 over the last
                  onesecond interval

rx_trigger4_count
                  Number of frames captured by trigger 4

rx_trigger4_rate
                  Number of frames received by trigger 4 over the last
                  onesecond interval

rx_trigger5_count
                  Number of frames captured by trigger 5

rx_trigger5_rate
                  Number of frames received by trigger 5 over the last
                  onesecond interval

rx_trigger6_count
                  Number of frames captured by trigger 6

rx_trigger6_rate
                  Number of frames received by trigger 6 over the last onesecond
                  interval

rx_trigger7_count
                  Number of frames captured by trigger 7

rx_trigger7_rate
                  Number of frames received by trigger 7 over the last
                  onesecond interval

rx_udp_CheckSum_err_rate
                  Number of UDP checksum error frames received over the last
                  onesecond interval

rx_udp_frame_rate
                  Number of UDP frames received over the last onesecond
                  interval

rx_undersize_frame_rate
                  Number of undersize frames received over the last onesecond
                  interval

tx_bytes
                  Number of bytes that were successfully transmitted

tx_frames
                  Number of frames that were successfully transmitted

tx_counter_timestamp
                   Time when the counter was stored. This value is derived
                   from the TestCenter chassis time sync source.
                   The unit is 10 nanoseconds.

tx_generator_abort_frame_count
                  Number of Abort frames generated

tx_generator_abort_frame_rate
                  Number of Abort frames generated over the last onesecond interval

tx_generator_crc_error_frame_count
                  Number of CRC error frames generated

tx_generator_crc_error_frame_rate
                  Number of CRC error frames generated over the last
                  onesecond interval

tx_generator_frame_count
                  Number of frames generated

tx_generator_frame_rate
                  Total number of frames generated over the last onesecond
                  interval

tx_generator_ipv4_frame_count
                  Number of IPv4 frames generated

tx_generator_ipv4_frame_rate
                  Total number of IPv4 frames generated over the last
                  onesecond interval

tx_generator_ipv6_frame_count
                  Number of IPv6 frames generated

tx_generator_ipv6_frame_rate
                  Total number of IPv6 frames generated over the last
                  onesecond interval

tx_generator_jumbo_frame_count
                  Number of Jumbo frames generated

tx_generator_jumbo_frame_rate
                  Number of jumbo frames generated over the last onesecond
                  interval

tx_generator_l3_checksum_error_count
                  Number of Layer 3 checksum errors generated

tx_generator_l3_checksum_error_rate
                  Number of Layer 3 header checksum errors generated over
                  the last onesecond interval

tx_generator_l4_checksum_error_count
                  Number of Layer 4 checksum errors generated

tx_generator_l4_checksum_error_rate
                  Number of Layer 4 header checksum errors generated over the
                  last onesecond interval

tx_generator_mpls_frame_count
                  Number of Layer 3 header checksum errors generated over
                  the last onesecond interval

tx_generator_mpls_frame_rate
                  Number of MPLS frames generated

tx_generator_octet_count
                  Number of bytes generated.

tx_generator_octet_rate
                  Total number of bytes generated over the last onesecond
                  interval

tx_generator_oversize_frame_count
                  Number of oversize frames generated

tx_generator_oversize_frame_rate
                  Number of oversize frames generated over the last onesecond
                  interval

tx_generator_sig_frame_count
                  Number of Spirent signature frames generated

tx_generator_sig_frame_rate
                  Total number of Spirent signature frames generated over the
                  last onesecond interval

tx_generator_undersize_frame_count
                  Number of undersize frames generated

tx_generator_undersize_frame_rate
                  Number of undersize frames generated over the last
                  onesecond interval

tx_generator_vlan_frame_count
                  Number of VLAN frames generated

tx_generator_vlan_frame_rate
                  Total number of VLAN frames generated over the last
                  onesecond interval

tx_hw_frame_count
                  Number of hardware frames transmitted

tx_pfc_frame_count
                  Number of PFC frames generated

     tx_pfc_pri0_frame_count
                  Number of priority0 pause frames received.

     tx_pfc_pri1_frame_count
                  Number of priority1 pause frames received.

     tx_pfc_pri2_frame_count
                  Number of priority2 pause frames received.

     tx_pfc_pri3_frame_count
                  Number of priority3 pause frames received.

     tx_pfc_pri4_frame_count
                  Number of priority4 pause frames received.

     tx_pfc_pri5_frame_count
                  Number of priority5 pause frames received.

     tx_pfc_pri6_frame_count
                  Number of priority6 pause frames received.

     tx_pfc_pri7_frame_count
                  Number of priority7 pause frames received.

tx_total_frame_rate
                  Total number of frames transmitted over the last onesecond
                  interval.

tx_total_ipv4_frame_count
                  Total number of IPv4 frames transmitted

tx_total_ipv4_frame_rate
                  Total number of IPv4 frames transmitted over the last
                  onesecond interval

tx_total_ipv6_frame_count
                  Total number of IPv6 frames transmitted

tx_total_ipv6_frame_rate
                  Total number of IPv6 frames transmitted over the last
                  onesecond interval

tx_total_mpls_frame_count
                  Total number of MPLS frames transmitted

tx_total_mpls_frame_rate
                  Total number of MPLS frames transmitted over the last
                  onesecond interval

tx_total_octet_rate
                  Total number of bytes transmitted over the last onesecond
                  interval
Note: With EOT results, after you stop the traffic, all rates are set to
0; therefore, they are not returned in the keyed list.
Description:

The interface stats function returns EOT results (by accessing the database file) or runtime results (by subscription of result objects). Use the -db_file argument with the corresponding action in the traffic control function to determine whether to return EOT or runtime results.

The list of session statistics that you can retrieve from an Ethernet port depends on the port speed. For example, an Ethernet port with a speed of 10/100MBPS returns the following list: {card_name port_name intf_speed tx_frames rx_frames link duplex}. However, a Gigabit Ethernet port (1/10GBPS) returns the following list:

{card_name port_name intf_speed tx_frames rx_frames tx_bytes rx_bytes
link duplex mac_address rx_fcs_error rx_runt_frames}.

Use properties to specify a set of attributes for which you want results.

The return from the interface_stats function call is a keyed list, containing the retrieved session stats and the command execution status, from which we call: keylget kList keyName to get the corresponding key value.

Examples:

To return all the attributes from the specified list of ports:

set rtn [interface stats
     port_handle_list= $portList]

Sample Output:

{port1 {{intf_speed 10000} {port_name port1} {mac_address _none_} {duplex full}
{link 1} {card_name VM-10GV1-1P} {intf_type ethernet} {rx_fcoe_frame_count 0}
{rx_ipv6_over_ipv4_frame_rate 0} {rx_byte_rate 67} {rx_prbs_fill_byte_count 0}
{rx_max_frame_length 94} {rx_fcoe_frame_rate 0} {rx_tcp_CheckSum_error_count 0}
{rx_sig_count 0} {rx_ipv6_over_ipv4_frame_count 0} {rx_trigger1_count 0}
{rx_sig_rate 0} {rx_trigger2_count 0} {rx_frames 117}
{rx_ipv4_CheckSum_error_count 0} {rx_prbsbit_error_count 0} {rx_bytes 8140}
{rx_jumbo_frame_count 0} {rx_ipv4_frame_rate 0} {rx_trigger4_count 0}
{rx_hw_frame_count 0} {rx_trigger5_count 0} {rx_oversize_frame_count 0}
{rx_ipv6_frame_rate 0} {rx_jumbo_frame_rate 0} {rx_trigger6_count 0}
{rx_pfc_frame_count 0} {rx_pause_frame_rate 0} {rx_combo_trigger_count 0}
{rx_fcs_error 0} {rx_pfc_frame_rate 0} {rx_frame_rate 1} {rx_runt_frames 0}
{rx_mpls_frame_count 0} {tx_total_octet_rate 125270}
{tx_generator_sig_frame_rate 994} {tx_total_frame_rate 994}
{tx_generator_l4_checksum_error_count 0} {tx_total_mpls_frame_count 0}
{tx_generator_vlan_frame_count 0} {tx_generator_crc_error_frame_count 0}
{tx_generator_abort_frame_rate 0} {tx_generator_l3_checksum_error_rate 0}
{tx_generator_ipv4_frame_count 14945} {tx_generator_l4_checksum_error_rate 0}
{tx_generator_crc_error_frame_rate 0} {tx_generator_vlan_frame_rate 0}
{tx_total_mpls_frame_rate 0} {tx_generator_jumbo_frame_count 0}
{tx_generator_octet_count 1883070} {tx_generator_ipv6_frame_count 0}
{tx_generator_ipv4_frame_rate 994} {tx_frames 14949}
{tx_generator_mpls_frame_rate 0} {tx_generator_oversize_frame_count 0} {tx_bytes
1883326} {tx_generator_jumbo_frame_rate 0} {tx_generator_ipv6_frame_rate 0}
{tx_generator_octet_rate 125270} {tx_generator_abort_frame_count 0}
{tx_generator_l3_checksum_error_count 0} {tx_hw_frame_count 0}
{tx_generator_undersize_frame_count 0} {tx_generator_frame_count 14945}
{tx_generator_oversize_frame_rate 0} {tx_pfc_frame_count null}
{tx_generator_sig_frame_count 14945} {tx_generator_undersize_frame_rate 0}
{tx_generator_frame_rate 994} {tx_generator_mpls_frame_count 0}{free
{{daemon_name free} {cpu_percent 95.9} {port_group_name {10.61.47.12711=
//1/1}} {memory_percent 69} {memory 699480}}} {used {{daemon_name used}
{cpu_percent 4.1} {port_group_name {10.61.47.12711= //1/1}} {memory_percent 31}
{memory 314788}}} {bsdnetd {{daemon_name bsdnetd} {cpu_percent 0.6}
{port_group_name {10.61.47.12711= //1/1}} {memory_percent 1.9} {memory 19504}}}
{sfpgad0 {{daemon_name sfpgad0} {cpu_percent 18.7} {port_group_name
{10.61.47.12711= //1/1}} {memory_percent 7.6} {memory 77820}}} {generator_0
{{daemon_name generator_0} {cpu_percent 0.4} {port_group_name {10.61.47.12711=
//1/1}} {memory_percent 8.4} {memory 85428}}} {analyzer_0 {{daemon_name
analyzer_0} {cpu_percent 0.1} {port_group_name {10.61.47.12711= //1/1}}
{memory_percent 5.2} {memory 53480}}} {capture_0 {{daemon_name capture_0}
{cpu_percent 0} {port_group_name {10.61.47.12711= //1/1}} {memory_percent 0.9}
{memory 10060}}}}}{port2 {{intf_speed 10000} {port_name port2} {mac_address
_none_} {duplex full} {link 1} {card_name VM-10GV1-1P} {intf_type ethernet}
{rx_fcoe_frame_count 0} {rx_ipv6_over_ipv4_frame_rate 0} {rx_byte_rate 82}
{rx_prbs_fill_byte_count 0} {rx_max_frame_length 126} {rx_fcoe_frame_rate 0}
{rx_tcp_CheckSum_error_count 0} {rx_sig_count 14945}
{rx_ipv6_over_ipv4_frame_count 0} {rx_trigger1_count 0} {rx_sig_rate 0}
{rx_trigger2_count 0} {rx_frames 15076} {rx_ipv4_CheckSum_error_count 0}
{rx_prbsbit_error_count 0} {rx_bytes 1892106} {rx_jumbo_frame_count 0}
{rx_ipv4_frame_rate 0} {rx_trigger4_count 0} {rx_hw_frame_count 0}
{rx_trigger5_count 0} {rx_oversize_frame_count 0} {rx_ipv6_frame_rate 0}
{rx_jumbo_frame_rate 0} {rx_trigger6_count 0} {rx_pfc_frame_count 0}
{rx_pause_frame_rate 0} {rx_combo_trigger_count 0} {rx_fcs_error 0}
{rx_pfc_frame_rate 0} {rx_frame_rate 1} {rx_runt_frames 0} {rx_mpls_frame_count
0} {tx_total_octet_rate 0} {tx_generator_sig_frame_rate 0} {tx_total_frame_rate
0} {tx_generator_l4_checksum_error_count 0} {tx_total_mpls_frame_count 0}
{tx_generator_vlan_frame_count 0} {tx_generator_crc_error_frame_count 0}
{tx_generator_abort_frame_rate 0} {tx_generator_l3_checksum_error_rate 0}
{tx_generator_ipv4_frame_count 0} {tx_generator_l4_checksum_error_rate 0}
{tx_generator_crc_error_frame_rate 0} {tx_generator_vlan_frame_rate 0}
{tx_total_mpls_frame_rate 0} {tx_generator_jumbo_frame_count 0}
{tx_generator_octet_count 0} {tx_generator_ipv6_frame_count 0}
{tx_generator_ipv4_frame_rate 0} {tx_frames 0} {tx_generator_mpls_frame_rate 0}
{tx_generator_oversize_frame_count 0} {tx_bytes 0}
{tx_generator_jumbo_frame_rate 0} {tx_generator_ipv6_frame_rate 0}
{tx_generator_octet_rate 0} {tx_generator_abort_frame_count 0}
{tx_generator_l3_checksum_error_count 0} {tx_hw_frame_count 0}
{tx_generator_undersize_frame_count 0} {tx_generator_frame_count 0}
{tx_generator_oversize_frame_rate 0} {tx_pfc_frame_count null}
{tx_generator_sig_frame_count 0} {tx_generator_undersize_frame_rate 0}
{tx_generator_frame_rate 0} {tx_generator_mpls_frame_count 0} {free
{{daemon_name free} {cpu_percent 95.9} {port_group_name {10.61.47.12711=
//1/1}} {memory_percent 69} {memory 699480}}} {used {{daemon_name used}
{cpu_percent 4.1} {port_group_name {10.61.47.12711= //1/1}} {memory_percent 31}
{memory 314788}}} {bsdnetd {{daemon_name bsdnetd} {cpu_percent 0.6}
{port_group_name {10.61.47.12711= //1/1}} {memory_percent 1.9} {memory 19504}}}
{sfpgad0 {{daemon_name sfpgad0} {cpu_percent 19.2} {port_group_name
{10.61.47.12711= //1/1}} {memory_percent 7.6} {memory 77820}}} {generator_0
{{daemon_name generator_0} {cpu_percent 0.4} {port_group_name {10.61.47.12711=
//1/1}} {memory_percent 8.4} {memory 85428}}} {analyzer_0 {{daemon_name
analyzer_0} {cpu_percent 0.1} {port_group_name {10.61.47.12711= //1/1}}
{memory_percent 5.2} {memory 53488}}} {capture_0 {{daemon_name capture_0}
{cpu_percent 0} {port_group_name {10.61.47.12711= //1/1}} {memory_percent 0.9}
{memory 10060}}}}} {status 1}

To get results from specified properties for a single port:

set rtn [interface stats
    port_handle=    port1
    properties=     "gen.tx_frames ana.rx_frames"]

Sample Output:

{intf_speed 10000} {port_name port2} {mac_address _none_} {duplex full}
{link 1} {card_name VM-10GV1-1P} {intf_type ethernet} {rx_frames 6521}
{tx_frames 0} {status 1}

To get results from specified properties for a list of port handles:

set rtn [interface stats
       port_handle_list=       $portList
       properties=             "gen.tx_frames ana.rx_frames"]

Sample Output:

{port1 {{intf_speed 10000} {port_name port1} {mac_address _none_}
{duplex full} {link 1} {card_name VM-10GV1-1P} {intf_type ethernet}
{rx_frames 31} {tx_frames 13605}}} {port2 {{intf_speed 10000}
{port_name port2} {mac_address _none_} {duplex full} {link 1
{card_name VM-10GV1-1P} {intf_type ethernet} {rx_frames 14937}
{tx_frames 0}}} {status 1}

To get results for FC related properties:

set int_ret [interface stats
port_handle_list= "$srcPort $dstPort"
properties=       "fc.class2_tx_frame_count fc.class2_rx_frame_count
            fc.class3_tx_frame_count fc.class3_rx_frame_count
            fc.othercls_tx_frame_count fc.othercls_rx_frame_count
            fc.class2_tx_frame_rate fc.class2_rx_frame_rate
            fc.class3_tx_frame_rate fc.class3_rx_frame_rate
            fc.othercls_tx_frame_rate fc.othercls_rx_frame_rate
            fc.total_cls2_tx_byte_count fc.total_cls2_rx_byte_count
            fc.total_cls3_tx_byte_count fc.total_cls3_rx_byte_count
            fc.total_othercls_tx_byte_count fc.total_othercls_rx_byte_count
            fc.total_cls2_tx_byte_rate fc.total_cls2_rx_byte_rate
            fc.total_cls3_tx_byte_rate fc.total_cls3_rx_byte_rate
            fc.total_othercls_tx_byte_rate fc.total_othercls_rx_byte_rate
            fc.b2b_tx_credit_count fc.b2b_tx_credit_na_count"

]

Sample Output:

{port1 {{intf_speed fc} {port_name port1} {mac_address _none_} {duplex
not_supported} {link 1} {card_name FX3-100GQF32T2} {intf_type fc}
{b2b_tx_credit_count 64} {b2b_tx_credit_unavailablecount 0}
{class2_tx_frame_count 0} {class2_rx_frame_count 0} {class3_tx_frame_count 0}
{class3_rx_frame_count 0} {othercls_tx_frame_count 0} {othercls_rx_frame_count
0} {class2_tx_frame_rate 0} {class2_rx_frame_rate 0} {class3_tx_frame_rate 0}
{class3_rx_frame_rate 0} {othercls_tx_frame_rate 0} {othercls_rx_frame_rate 0}
{total_cls2_tx_byte_count 0} {total_cls2_rx_byte_count 0}
{total_cls3_tx_byte_count 0} {total_cls3_rx_byte_count 0}
{total_othercls_tx_byte_count 0} {total_othercls_rx_byte_count 0}
{total_cls2_tx_byte_rate 0} {total_cls2_rx_byte_rate 0}
{total_cls3_tx_byte_rate 0} {total_cls3_rx_byte_rate 0}
{total_othercls_tx_byte_rate 0} {total_othercls_rx_byte_rate 0}}} {port2
{{intf_speed fc} {port_name port2} {mac_address _none_} {duplex not_supported}
{link 1} {card_name FX3-100GQF32T2} {intf_type fc} {b2b_tx_credit_count 64}
{b2b_tx_credit_unavailablecount 0} {class2_tx_frame_count 0}
{class2_rx_frame_count 0} {class3_tx_frame_count 0} {class3_rx_frame_count 0}
{othercls_tx_frame_count 0} {othercls_rx_frame_count 0} {class2_tx_frame_rate
0} {class2_rx_frame_rate 0} {class3_tx_frame_rate 0} {class3_rx_frame_rate 0}
{othercls_tx_frame_rate 0} {othercls_rx_frame_rate 0} {total_cls2_tx_byte_count
0} {total_cls2_rx_byte_count 0} {total_cls3_tx_byte_count 0}
{total_cls3_rx_byte_count 0} {total_othercls_tx_byte_count 0}
{total_othercls_rx_byte_count 0} {total_cls2_tx_byte_rate 0}
{total_cls2_rx_byte_rate 0} {total_cls3_tx_byte_rate 0}
{total_cls3_rx_byte_rate 0} {total_othercls_tx_byte_rate 0}
{total_othercls_rx_byte_rate 0}}} {status 1}

End of Procedure Header

cleanup session

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Cleans up the current test by terminating port reservations, disconnecting the ports from the chassis, releasing system resources, and removing the specified port configurations.

Synopsis:

Note: M indicates the argument is `Mandatory`.
     cleanup session
        port_list= {list of port handles}
        port_handle= {list of port handles}
        maintain_lock= {1|0}
        clean_logs= {1|0}
        clean_dbfile= {1|0}
        clean_labserver_session= {1|0}
        logout_aion_server= {true|false}
        reset= {1|0}

Arguments:

port_handle
                Specifies the handle(s) of the port(s) to be released. A port
                handle is a value that uniquely identifies a port on a chassis.
                Use the port_handle argument to identify the port. The value can
                be all. When you set it to all, it means to clean up all
                of the ports that are currently used.

clean_logs
                `Spirent Extension (for Spirent HLTAPI only).`

                Determines whether the saved logs will be deleted during cleanup.
                Possible values are 0 and 1. If it is set to 1, then the logs will
                be deleted during the cleanup session. The default value is 0.

                Note: This argument is not supported when LabServer is used in Windows.

maintain_lock
                Determines whether the ports will be released during cleanup.
                Possible values are 0 and 1. If it is set to 1,
                then the ports will be deleted but not released during
                the cleanup session; if it is set to 0, the ports will be
                deleted and released. The default value is 0.

port_list
                Specifies the handle(s) of the port(s) to be released. A port
                handle is a value that uniquely identifies a port on a chassis.
                Use either the port_list or port_handle argument to identify
                the port. Same as port_handle. The value can be all.
                When you set it to all, it means to clean up all of
                the ports that are currently used.

clean_dbfile
                Determines whether the saved database file will be deleted during
                cleanup. Possible values are 0 and 1. If it is set to 1, then the
                database file will be deleted during the cleanup session; if it
                is set to 0, the database file will be left untouched. The
                default value is 1.

clean_labserver_session
                Determines whether to clean the lab server session when using
                function cleanup_session. Possible values are 0 and 1. If it is
                set to 1, then the lab server session will be deleted during the
                cleanup session. The default value is 1. This argument only works
                when using labserver.

logout_aion_server
                Determines whether to log out of the AION Server when using the
                function cleanup_session. Possible values are true and false. If it is
                set to true, then the AION Server will be logged out during the
                cleanup session. The default value is false. This argument only works
                when using aion license server connect.

reset
                Specifies the session resetting mode. Possible values are 0 and
                1. When it is set to 1, everything (streamblock/device
                configurations and port handles) will be cleared and chassis
                disconnected. When it is set to 0, streamblock/device
                configurations will be cleared, but port handles will be
                reserved.

Arguments Unsupported by Save as HLTAPI:

None.
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 (1) or failure (0) of the operation.
log       An error message (if the operation failed).
Description:
The cleanup_session function terminates port reservations, disconnects the ports from the chassis, releases system resources, removes the specified port configurations, and terminates the routing protocols used by this port. Every script that uses the HLTAPI should call cleanup_session when the API is no longer in use.
Examples:

The cleanup_session function shown below disconnects the port with the specified handle, releasing system resources for this port and removing its specified port configuration:

cleanup session port_handle=$p0

Sample Output:

{status 1}

If there is an error, you will see: {status 0} {log {Error message }}

End of Procedure Header

labserver connect

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Creates a new test session on the Spirent TestCenter LabServer and connects to it, or connects to an existing test session on the LS. The automation client will connect as a controller, not as a viewer.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     labserver connect
        server_ip= <IP addresses or names> M
        user_name= <character string>  M
        session_name= <character string> M
        create_new_session= {1|0}
        keep_session= {1|0}

Arguments:

server_ip
                Defines the IPv4 address or Domain Name System (DNS) name of the
                Spirent TestCenter LabServer. This argument is `Mandatory`.

create_new_session
                Determines whether to create a new test session on the LabServer or
                not. The possible values are 1 and 0. When it is set to 1, Spirent
                HLTAPI will create a new test session on the LabServer. The default
                value is 1.

user_name
                Specifies the name of the user. This argument is `Mandatory`.

session_name
                session_name and -user_name are used together to identify a test
                session. If create_new_session is set to 0, Spirent HLTAPI will
                connect the user to a test session defined by session_name and
                user_name on the LabServer. If -create_new_session is set to 1,
                Spirent HLTAPI will create a new test session with this session
                name. If a test session with the same session name and user name
                already exists, the ``labserver connect`` function will
                terminate the existent test session, and then create a new one.
                This argument is `Mandatory`.

keep_session
                `Spirent Extension (for Spirent HLTAPI only).`

                Specifies whether to keep the test session on the LabServer. You
                must set create_new_session to 1. Possible values are 1 and 0.
                If it is set to 1, Spirent HLTAPI will create a new test session
                by appending _1 to the name of the existing session, irrespective
                of the session state. If it is set to 0, Spirent HLTAPI will
                delete the session or append _1 to the session name, based on
                the conditions listed below::


                 Controller        State                Action
                 Yes               Any                  Append
                 No                None/unknown error   Append
                 No                Sequencer Idle       Delete

                The default value is 0.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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 (1) or failure (0) of the
                         operation.

log                      An error message (if the operation
                         failed).

See the following description for more information about the returned keyed list.

Description:

The labserver connect function creates a new test session on the Spirent TestCenter LabServer and connects to it, or connects to an existing test session on the LabServer. The automation client will connect as a controller, not as a viewer.

When you create a new session, use the server_ip argument to specify the LabServer that the emulated session to be created on. (Please refer to the description of the server_ip argument for more details.)

Note: An automation client must always be the controller on a test session.
It cannot be a viewer. If another client is already be the controller on a test session, this command will fail.
Examples:

The following function will create a new test session and connect to the test session:

labserver connect
     server_ip=  10.61.30.137
     create_new_session= 1
     session_name= Demo1
     user_name=   Tester

The following function will connect to an existing test session when you know its user name and its session name:

labserver connect
      server_ip=  10.61.30.137
      create_new_session= 0
      session_name= Demo1
      user_name=   Tester

Sample Output:

{status 1} {procName labserver_connect}

End of Procedure Header

labserver disconnect

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Disconnects from a test session. If you want to reconnect to the test session later, leave the Terminate attribute at its default setting.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    labserver disconnect
          terminate_session= {1|0} M
          server_ip= <IP addresses or names>
          user_name= <character string>
          session_name= <character string>

Arguments:

server_ip
                Defines the IPv4 address or Domain Name System (DNS) name of the
                Spirent TestCenter LabServer.

user_name
                Specifies the name of the user.

session_name
                Specifies the name of the session. This argument is used together
                with the user name (user_name) to indicate the session ID.

                Note: All sessions connected to the labserver will be deleted if
                     user_name or -session_name is not specified.

terminate_session
                Determines whether to terminate the test session when the user
                disconnects from the lab server. The possible values are 1 and 0.
                This argument is `Mandatory`.

                If it is set to 0, Spirent HLTAPI will disconnect the user from
                the LabServer without terminating the test session. If it is set
                to 1, Spirent HLTAPI will terminate the test session when the
                user disconnects from the LabServer.

                When server_ip, -user_name and session_name are provided, the
                termination action will be applied to the specific test session
                defined by user_name and -session_name on the LabServer
                specified by server_ip.

                When only the argument server_ip is provided, the termination
                action will be apply to all test sessions on the LabServer
                specified by server_ip.

                When of the three arguments above is provided, the termination
                action will only be applied to the currently connecting test
                session; if no test session is currently connected, an error
                message will be reported.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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 (1) or failure (0) of the
                         operation.

log                      An error message (if the operation
                         failed).

See the following description for more information about the returned keyed list.

Description:
Disconnect from a test session. If you want to reconnect to the test session later, set the terminate_session argument to 0.
Examples:

The following function will terminate the specific test session in the LabServer:

labserver disconnect
         server_ip= 10.61.30.137
         terminate_session= 1
         session_name= Demo1
         user_name=   Tester

The following function will not terminate the currently connected test session when the function disconnects the user from the LabServer:

labserver connect
         terminate_session= 0

Sample Output:

{status 1} {procName labserver_connect}

End of Procedure Header

aion license server connect

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Connects to the AION License Server and checks out the allowed license when the user reserves and configures the Spirent TestCenter ports

Synopsis:

Note: M indicates the argument is `Mandatory`.

     aion license server connect
        aion_server= <server addresses or names> M
        user_name= <character string> M
        password= <character string> M
        auto_signin= {true|false}
        force_execution= {true|false}
        work_space= <character string>
        work_space_force_execution= {true|false}

Arguments:

aion_server
                Defines the IPv4 address or Domain Name System (DNS) name of the
                Spirent TestCenter Aion Server. This argument is `Mandatory`.

user_name
                Specifies the name of the user. This argument is `Mandatory`.

password
                Specifies the password of the user. This argument is `Mandatory`.

auto_signin
                Specifies whether to log in to the AION Server with auto signin.
                Possible values are true and false.The default value is true.

force_execution
                Specifies whether to log in to the AION Server forcefully.
                Possible values are true and false.The default value is false.

work_space
                Specifies name of the workspace to set.

work_space_force_execution
                Specifies whether force execution to the set workspace.
                Possible values are true and false.The default value is false.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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 (1) or failure (0) of the
                         operation.

log                      An error message (if the operation
                         failed).

See the following description for more information about the returned keyed list.

Description:
The aion license server connect function connects to the Spirent TestCenter AION Server with the provided user credentials and retrieves the license allowed to the user.
Examples:

The following function will log in to the AION Server and retrieve a license:

aion license server connect
      aion_server=  "https://spirent.spirentaion.com/"
      user_name=    "testuser"
      password=     "test123"
      work_space=    "Spirent"]

Sample Output:

{status 1} {procName aion_license_server_connect}

End of Procedure Header

save xml

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Spirent Extension (for Spirent HLTAPI only).

Saves the current HLTAPI test configurations as an XML file

Synopsis:

Note: M indicates the argument is `Mandatory`.

    save xml
        filename= <string>

Arguments:

filename
                Specifies the name of the XML file to be saved.
                If not specified, the HLTAPI script name will be used.
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 (1) or failure (0) of the operation

log                     An error message (if the operation failed)
Description:
The save xml function saves the current HLTAPI configurations as an XML file. Use the filename argument to specify the name of the XML file. By default, the saved XML file is located in the same directory as the HLTAPI script.

Examples:

Sample Input:

save xml filename=$xmlFilename

Sample Output:

{status 1}

load xml

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Loads test configurations from a previously saved XML file.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    load xml
       filename= M

Arguments:

filename
                Specifies the path of the XML file. This argument is `Mandatory`.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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 (1) or failure (0) of the
                         operation

log                      An error message (if the operation
                         failed)
Description:

The load xml function loads the test configurations from a previously saved XML file.

After calling load_xml, you must call connect() to initialize one or more Spirent HLTAPI chassis and reserve ports on the initialized chassis. The number of the ports reserved must be equal to the number of ports specified by portlist.

Examples

The following example loads test configurations from tostest.xml:

set ret [load xml filename="tostest.xml"];
set ret1 connect device=$device port_list $port_list -offline 1;
if {![keylget ret1 status ]} {
return "Reserve port FAILED"
}
puts " $ret1"
set port1 [keylget ret1 port_handle.$device.$port1]
set port2 [keylget ret1 port_handle.$device.$port2]

End of Procedure Header

start devices

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Starts all devices that are either configured manually with Spirent HLTAPI or by using load xml.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    start devices
       device_list= <list of device handles>

Arguments:

device_list
                Specifies the list of devices which need to be started.
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 (1) or failure (0) of the
                         operation
log                      An error message (if the operation
                         failed)
Description:
This function starts all devices that are either configured manually with Spirent HLTAPI or by using load xml. This function currently works as a standalone function, but specific device handles can be configured under it in the future if required.
Examples:

Sample Input:

::start devices
# Wait 3 seconds
puts "Wait for 3 seconds..."
after 300

Sample Output:

{status 1}

Sample Input:

::start devices device_list= [keylget device_ret1 handle]

Sample Output:

{status 1}

stop devices

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Stops all running devices that are either configured manually with Spirent HLTAPI or by using load xml.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     stop devices
       device_list= <list of device handles>

Arguments:

device_list
                Specifies the list of devices which need to be stopped.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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 (1) or failure (0) of the
                       operation

log                    An error message (if the operation
                       failed)
Description:
This function stops all running devices that are either configured manually with Spirent HLTAPI or by using load xml. This function currently works as a standalone function, but specific device handles can be configured under it in the future, if required.
Examples:

Sample Input:

::stop devices
# Wait 3 seconds
puts "Wait for 3 seconds..."
after 300

Sample Output:

{status 1}

Sample Input:

::stop devices device_list= [keylget device_ret1 handle]

Sample Output:

{status 1}

End of Procedure Header

get handles

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
Gets handles of a specified type or under the specified port(s).

Synopsis:

Note: M indicates the argument is `Mandatory`.

     get handles
        type= {bgpRouter|bgpRoute|ospfRouter|ospfLsa|ospfTlv|isisRouter|isisLsp|streamblock}
                OR
               <objectname> M]
        from_devices= <device_name|device_handle>
        from_ports= <port or portlist>
        name_handle_map= {true|false}

Arguments:

type
              Get handles of a specified type. This argument is mandantory.
              The supported types are listed below::


               bgpRouter
               bgpRoute
               ospfRouter
               ospfLsa
               ospfTlv
               isisRouter
               isisLsp
               streamblock

              Another way to get handles from specific ports and devices is, by
              providing type value as objectname.
              This way is supported for all the protocol object types.

              Example: The following example get DHCPv4 Server handles from the given ports::


               get handles type=dhcpv4serverconfig from_ports "$port1"

              Sample output:

               {port1 {{host1 dhcpv4serverconfig1}}} {dhcpv4serverconfig_hnd dhcpv4serverconfig1}
               {handles host1} {status 1}

              The following example get ospf routerlsa handles from the given ports::


               get handles type=routerlsa from_ports "$port1"

              Sample output:

               {port1 {{router1 {{ospfv2routerconfig1 routerlsa1}}}}} {routerlsa_hnd routerlsa1}
               {handles router1} {status 1}

              Note: For ISIS LSP type, elem_handle will also be returned along with
                       handles.

from_devices
              Get handles under specific devices. The value must be a list of
              device names or device handles.

from_ports
              Get handles under one or more ports. If this argument is not
              specified, all handles under all ports will be returned.

name_handle_map
              Get mapping of name and handle of specific object. If this argument is specified
              as true, name_handle_map will be returned.

Arguments Unsupported by Save as HLTAPI:

This function is currently not supported by Save as HLTAPI.
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):

data objects             Spirent TestCenter data objects in a tree structure

xxx_hnd                  Handles of specific objects

handles                  Handles of the specified type

name_handle_map          Mapping of name and handles of the specified type.

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

log                      An error message (if the operation fails)
Description:

This function gets handles of a specified type. Specify from_ports if you want to get handles from specific port(s). The handles returned will be used as the validation items in the test.

Apart from the status key, the returned keyed list inlcudes 3 different forms of results for your retrieval: a tree list of Spirent TestCenter data objects for the specified type, the object handle (xxx_hnd) of the specified type, and the configuration handle of the specified type, as shown in the following example:

{port3 {{emulateddevice5 bgprouterconfig3}}}
{bgprouterconfig_hnd bgprouterconfig3}
{handles emulateddevice5}
{status 1}
Examples:

The following example gets streamblock handles under the specified port:

set streamBlockHnd get handles type=streamblock from_ports $port1

Sample Output:

{port3 streamblock1} {streamblock_hnd streamblock1} {handles streamblock1} {status 1}

After you get the handles for the specified streamblock, you can start the traffic generator and get the traffic statistics for the specific streamblock:

puts "Start the generator..."
set x traffic control action=run port_handle $port1 -get dscp after 300

set returnedString traffic stats streams=$stream_id mode streams
puts $returnedString
if {![keylget returnedString status ]} {
return "FAILED"
      }
set Rx_Rate [keylget returnedString $port1.stream.$stream_id.rx.total_pkt_rate]
set Tx_Rate [keylget returnedString $port1.stream.$stream_id.tx.total_pkt_rate]
puts "Tx_Rate : -------------------------------$Tx_Rate"
puts "Rx_Rate : -------------------------------$Rx_Rate"

puts "stop the traffic"
set x traffic control action=stop port_handle $port1

puts "disable the vlan stream"
set ret traffic config mode=disable stream_id $stream_id

The following examples get BGP router and route handles from the specified port:

set bgprouterHandles get handles type=bgpRouter from_ports $port1

puts $bgprouterHandles

{port3 {{emulateddevice5 bgprouterconfig3}}}
{bgprouterconfig_hnd bgprouterconfig3}
{handles emulateddevice5}
{status 1}

set bgprouteHandles get handles type=bgpRoute from_ports $port1

puts $bgprouteHandles

{port3 {{emulateddevice3 {{bgprouterconfig1 {{bgpipv4routeconfig1
ipv4networkblock4}}}}} {emulateddevice5 {{bgprouterconfig3
{{bgpipv4routeconfig3 ipv4networkblock6} {bgpipv4routeconfig4
ipv4networkblock7}}}}}}} {ipv4networkblock_hnd {ipv4networkblock4
ipv4networkblock6 ipv4networkblock7}} {bgpipv4routeconfig_hnd
{bgpipv4routeconfig1 bgpipv4routeconfig3 bgpipv4routeconfig4}} {handles
{ipv4networkblock4 bgpipv4routeconfig1 ipv4networkblock6 ipv4networkblock7
bgpipv4routeconfig3 bgpipv4routeconfig4}} {status 1}

The following example gets ISIS LSP handles from the specified port:

get handles type=isisLsp from_ports $port1

Sample Output:

{port1 {{emulateddevice1 {{isisrouterconfig1 {{isislspconfig1
{{ipv6isisroutesconfig1 ipv6networkblock1} {ipv4isisroutesconfig1
ipv4networkblock1} {ipv4isisroutesconfig2 ipv4networkblock2}}}}}}}}}
{ipv6networkblock_hnd ipv6networkblock1} {ipv4networkblock_hnd
{ipv4networkblock1 ipv4networkblock2}} {ipv6isisroutesconfig_hnd
ipv6isisroutesconfig1} {ipv4isisroutesconfig_hnd {ipv4isisroutesconfig1
ipv4isisroutesconfig2}} {isislspconfig_hnd isislspconfig1} {handles
{ipv6networkblock1 ipv4networkblock1 ipv4networkblock2 ipv6isisroutesconfig1
ipv4isisroutesconfig1 ipv4isisroutesconfig2 isislspconfig1}} {status 1}

End of Procedure Header

reserve ports

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Spirent Extension (for Spirent HLTAPI only).

Initializes a list of Spirent HLTAPI chassises and reserves ports on them. Use this function for scaling test scenarios that involve multiple ports from multiple chassis.

Synopsis:

Note: M indicates the argument is `Mandatory`.

   reserve ports
     chassis_list= <list of IP addresses or names>
     slot_list= <chassis>/<slot>
     location_list= //<chassis>/<slot>/<port>

Arguments:

chassis_list
                Specifies a list of chassises under which the ports will be
                connected. The value can be the IP address or the name of
                the chassis.

slot_list
                Specifies a list of slots to be used, in the format of
                <chassis>/<slot>.

location_list
                Specifies a list of locations to be connected, in the format of
                //<chassis>/<slot>/<port>.
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):

port_handle.<device>.<port>   The port information for the connected chassis
status                        Success (1) or failure (0) of the operation
log                           An error message (if the operation failed)
offline                       The created ports are online (0) or offline (1)
Description:

The reserve ports function initializes a list of Spirent HLTAPI chassises and reserves ports on them. Use this function for scaling test scenarios that involve multiple ports from multiple chassis.

The function returns the requested data (device and port information) and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message.

Examples:

To reserve the specified port:

set locationlist {//10.61.39.164/1/1 //10.61.39.164/1/2}
set intStatus [connect location_list=$locationlist]

Sample Output:

{port_handle {{10 {{61 {{39 {{164 {{1/1 port1} {1/2 port2}}}}}}}}}}} {status 1}

To reserve ports under the specified slot:

set slot_list "10.61.39.164/1"
set intStatus [reserve ports slot_list=$slot_list]

Sample Output:

{port_handle {{10 {{61 {{39 {{164 {{1/1 port1} {1/2 port2}}}}}}}}}}} {status 1}

End of Procedure Header

system settings

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Spirent Extension (for Spirent HLTAPI only).

Specifies systemlevel settings of Spirent TestCenter

Synopsis:

Note: M indicates the argument is `Mandatory`.

      system settings
           realism_mode= {NORMAL|CONTROL_PLANE|CONTROL_AND_DATA_PLANE}
           delete_inactive_streams_from_memory= {true|false}
           tshark_path= <string>
           stream_id_start_index= <1-65535>
           exclude_eth_fcs= {true|false}
           smoothen_random_len= {true|false}
           unique_random_len_seed_per_port= {true|false}
           tx_queue_full_retry= {true|false}
           traffic_start_interval_unit= {unitof64us|unitof500ns}
           traffic_start_mode= {async|sync}
           traffic_start_interval= <NUMERIC>
           collect_stray_frame= {true|false}
           delete_all_analyzer_streams= {true|false}
           save_only_counters_from_result_view_mode= {true|false}
           stop_traffic_before_clearing_results= {true|false}
           stop_analyzer_before_clearing_results= {true|false}
           tx_port_expect_mcast_traffic_sent_from_self= {true|false}
           sync_clear_results= {true|false}
           timed_refresh_interval= <1-65535>
           timed_refresh_result_view_mode= {manual|continuous|periodic}
           preamble_byte_len= <NUMERIC>
           result_view_mode= {BASIC|HISTOGRAM|JITTER|INTERARRIVALTIME|
                               FORWARDING|LATENCY_JITTER|LATENCY_JITTER_RFC5481}]
           save_at_eot_properties= {true|false}
           jitter_mode= {rfc3393|rfc4689}
           optimize_config_command= {true|false}
           dhcpv4_enable_server_routing= {all_sessions|failed_sessions}
           dhcpv4_traffic_behavior= {true|false}
           dhcpv6_enable_server_routing= {true|false}
           dhcpv6_traffic_behavior= {all_sessions|failed_sessions}

Arguments:

   realism_mode
                   Specifies the Realism mode to use. Realism options control how
                   protocol layers interact, or do not interact, with each
                   other. Possible values are::


                    NORMAL                   Lower level protocols (e.g. PPP) come up on all
                                             the devices in a device block before starting
                                             the next higher protocol

                    CONTROL_PLANE            Higher layer protocols on individual devices in
                                             a block are brought up soon after the lower layer
                                             protocols on each device are ready

                    CONTROL_AND_DATA_PLANE   Rather than waiting until the device block is in
                                             a connected/bound state to initiate traffic.
                                             Traffic is initiated per session as soon as each
                                             session is established.


                   Note::

                        1. Currently only DHCPv6/PD and PPPoX support Realism mode.
                        2. Realism mode can only be changed after DHCPv6/PD and PPPoX
                          are configured.

   delete_inactive_streams_from_memory
                   Determines whether to clear inactive streamblock
                   statistics from memory. Possible values are true and
                   false. This argument is often used with traffic control
                   configurations as shown below::


                      traffic control
                          action clear_stats
                          reset_streams <streamblock_handles>

   stream_id_start_index
                   Specifies the start index of the first stream ID.
                   Possible values are 1 to 65535. The default value
                   is 1.

   tshark_path
                   Specifies the default TShark executable location.

   exclude_eth_fcs
                   Determines whether to exclude the last 4 bytes of the
                   packet from the pcap file when generating stream block.
                   The default value is true.
                   Possible values are::


                     Value               Description
                     true                Exclude the last 4 bytes of the packet
                                          from pcap file when generating stream
                                          block.

                     false               Include the last 4 bytes of the packet
                                          from pcap file when generating stream
                                          block.

   smoothen_random_len
                   Indicate if smoothen random length distribution per port
                   is generated. The default value is false.
                   Possible values are::


                     Value               Description
                     true                Smoothen random length distribution is
                                          enabled, which requires length to be
                                          uniformly distributed across the minimum
                                          and maximum length integer values.

                     false               Smoothen random length distribution is
                                          not enabled

   unique_random_len_seed_per_port
                   Indicate if unique random seeds are created on all ports.
                   The default value is false.
                   Possible values are::


                     Value               Description
                     true                All random seeds are unique. User
                                          cannot change it to a nonunique value.

                     false               Random seeds are not unique.

   tx_queue_full_retry
                   Determines the behavior when Tx queue is full.
                   The default value is true.
                   Possible values are::


                     Value               Description
                     true                The traffic generator will wait (retry sending)
                                          when the transmit queue is full.

                     false               The traffic generator will drop frames
                                          when the transmit queue is full.

   traffic_start_interval_unit
                   Specifies the traffic start interval unit. Possible values
                   are unitof64us and unitof500ns. The default value is unitof64us.

   traffic_start_mode
                   Controls how the ports start sending traffic.
                   The default value is async.
                   Possible values are::


                     Value               Description
                     async               ASYNCHRONOUS
                                         Start all traffic on all ports immediately.
                                          The ports might not start at the same time.

                     sync                SYNCHRONOUS
                                         Start traffic on all ports at the same time
                                          after a short delay. The delay is needed to
                                          synchronize the ports.

   traffic_start_interval
                   Specifies the number of intervals between synchronous
                   transmissions. The default value is 0.

   collect_stray_frame
                   Specifies whether to collect stray frames on the port when
                   RxStreamSummaryResults is subscribed. Possible values are
                   true and false. The default value is false.

   delete_all_analyzer_streams
                   Specifies whether to delete all streams from analyzer when
                   clearing results with ResultsClearAllCommand. Possible values
                   are true and false. The default value is false.

   save_only_counters_from_result_view_mode
                   Specifies whether to enable the save end of test counters
                   according to result view mode. Possible values are true
                   and false. The default value is false.

   stop_traffic_before_clearing_results
                   Specifies whether to stop traffic generators before clearing
                   results with ResultsClearAllCommand. Must set this
                   before invoking ResultsClearAllCommand.
                   The default value is false.
                   Possible values are::


                     Value             Description
                     true              Stop all generators, clear results for all
                                        views, and then start the generators again.

                     false             Clear results for all views without stopping
                                        generators.

   stop_analyzer_before_clearing_results
                   Specifies whether to stop analyzers before clearing results
                   with ResultsClearAllCommand. Must set this before
                   invoking ResultsClearAllCommand.
                   The default value is false.
                   Possible values are::


                     Value             Description
                     true              Stop all analyzers, clear results for all
                                        views, and then start the analyzers again.

                     false             Clear results for all views without stopping
                                        analyzers.

   tx_port_expect_mcast_traffic_sent_from_self
                   Specifies whether the Tx port will expect to receive
                   traffic from itself. Possible values are true and
                   false. The default value is false.

   sync_clear_results
                   Specifies whether to synchronize clearing across all ports
                   when you invoke ResultsClearAllCommand. Generators and
                   analyzers will not be stopped. This attribute is not
                   available if stop_traffic_before_clearing_results or
                   stop_analyzer_before_clearing_results is set as true. The
                   possible values are true and false. The default value is false.

   timed_refresh_interval
                   Specifies the refresh interval in seconds when periodic mode is
                   selected as timed_refresh_result_view_mode. Possible values are
                   1 to 65535. The default value 10.

   timed_refresh_result_view_mode
                   Auto refresh for result views which does not update results in
                   real time. The default value is manual.
                   Possible values are::


                     Value             Description
                     manual            MANUAL
                                       Result view does not get refreshed automatically.

                     continuous        CONTINUOUS
                                       Result view get refreshed continuously.

                     periodic          PERIODIC
                                       Result view get refreshed as per interval defined
                                       in TimedRefreshInterval.

   preamble_byte_len
                   Specifies the ethernet preamble byte length used for layer 1
                   counter calculation. The possible values are 4 to 32. The
                   default value is 8.

   result_view_mode
                   Specifies which counters will be included in the results view.
                   This applies only to streamrelated views. Choose a result view
                   mode prior to running any test. Changing this mode while a test
                   is running will invalidate the current counter results.
                   The default value is BASIC.
                   Possible values are::


                     Value             Description
                     BASIC                   Provides the basic traffic counters.

                     HISTOGRAM               Provides the histogram counters.

                     JITTER                  Provides the histogram and minimum, maximum,
                                              and average jitter counters.

                     INTERARRIVALTIME        Provides the interarrival histogram and minimum,
                                              maximum, and average jitter counters.

                     FORWARDING              Provides the advanced sequencing counters and
                                              minimum, maximum, and average jitter counters.

                     LATENCY_JITTER          Provides the minimum, maximum and average
                                              latency and jitter counters.

                     LATENCY_JITTER_RFC5481  Provides the minimum, maximum and average
                                              latency and jitter counters.

   save_at_eot_properties
                   Specifies whether configuration properties are to be saved at
                   the end of test.

   jitter_mode
                   Specifies the method to use for calculation of jitter values.
                   The default value is rfc3393.
                   Possible values are::


                     Value                 Description
                     rfc3393               RFC3393ABSOLUTEVALUE
                                            Use specification from RFC3393 to
                                            calculate jitter values
                     rfc4689               RFC4689ABSOLUTEVALUE
                                            Use specification from RFC3393 to
                                            calculate jitter values

   optimize_config_command
                   Optimize the configuration to save memory. This command changes
                   the following settings::

                    Settings > Traffic Options > Streams: Selects Delete inactive
                                                           streams from memory
                    Settings > L2L3 ResultOptions > Time Refresh Settings: Changes
                                                           refresh mode from Periodic
                                                           Refresh to Manual Refresh
                    Result view > Change Result View > Manage Views > Enable Views:
                                                           Unsubscribes the Aggregated
                                                           Port L1 Tx and Rx Rate views
                   The default value is false. Possible values are::


                     Value               Description
                     true                Optimize the configuration to save memory
                     false               Do not optimize the configuration to save memory

                    Default TShark executable location.

   dhcpv4_enable_server_routing
                   Specifies whether to enable the DHCPv4 server to route packets through the
                   gateway. Possible values are true and false. The default value is false.

   dhcpv4_traffic_behavior
                   Specifies the DHCPv4 client traffic behavior in relation to failed sessions.
                   The default value is all_sessions.
                   Possible values are::


                     Value                 Description
                     all_sessions          REQUIRE_ALL_SESSIONS_BOUND
                                            Start traffic only if all sessions are bound.

                     failed_sessions       IGNORE_FAILED_SESSIONS
                                            Start traffic while ignoring sessions that failed
                                            to bind.

   dhcpv6_enable_server_routing
                   Specifies whether to enable the DHCPv6 server to route packets through the
                   gateway. Possible values are true and false. The default value is false.

   dhcpv6_traffic_behavior
                   Specifies the DHCPv6 client traffic behavior in relation to failed sessions.
                   The default value is all_sessions.
                   Possible values are::


                     Value                 Description
                     all_sessions          REQUIRE_ALL_SESSIONS_BOUND
                                            Start traffic only if all sessions are bound.

                     failed_sessions       IGNORE_FAILED_SESSIONS
                                            Start traffic while ignoring sessions that failed
                                            to bind.

Returned 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 (1) or failure (0) of the operation

       log                     An error message (if the operation failed)
Description:

The system settings level=settings of Spirent TestCenter with realism options. Use the realism_mode argument to specify the Realism mode to configure.

Currently only DHCPv6/PD and PPPoX support realism mode. You must already have configured DHCPv6/PD and PPPoX before you use this function.

If the operation fails, Spirent HLTAPI returns an error message.

Examples:

Sample Input:

set Realism_Mode [system settings
           realism_mode= CONTROL_PLANE
        ]

Sample Output:

    {status 1}

The following example configures Traffic Options and Result Options in
system settings.

    set cfg [system settings
            jitter_mode=     rfc4689
            timed_refresh_result_view_mode=   periodic
            timed_refresh_interval=  12
            stop_analyzer_before_clearing_results=  true
            save_only_counters_from_result_view_mode=   true
            stream_id_start_index=  2
            exclude_eth_fcs=    true
            optimize_config_command=   true
        ]

Sample Output:

    {status 1}

The following example configures DHCPv4 and DHCPv6 Options in
system settings.

    set cfg [system settings
            dhcpv4_enable_server_routing=     true
            dhcpv4_traffic_behavior=   failed_sessions
            timed_refresh_interval=  false
            dhcpv6_traffic_behavior=  all_sessions ]

Sample Output:

{status 1}

End of Procedure Header

sequencer control

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:
This is a Spirent Extension created to control the Command Sequencer configurations specified in the sequencer config function

Synopsis:

Note: M indicates the argument is `Mandatory`.

        sequencer control
           action=  {start|stop|step|pause}

Arguments:

action
                Specifies the action to perform. Possible values are described
                below::


                 start       Starts the Command Sequencer

                 stop        Stops the Command Sequencer

                 pause       Pauses the Command Sequencer

                 step        Executes the current command  in the Command Sequencer,
                            starting from step 1

                The default value is start.
Return Values:

The function returns a keyed list using the following keys (with corresponding data:

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

log          An error message (if the operation failed)
Description:

The sequencer control function starts, stops, pauses the Command Sequencer, or executes the current command in a stepby-step fashion. See -action for more information on the control actions.

Before you use this function, there must be existing Command Sequencer configurations (procedure sequencer config) either written manually or generated using the Save as HLTAPI tool. See Support for Command Sequencer in Appendix A for more information on Save as HLTAPI’s support for Command Sequencer.

Examples:

The following example starts the Command Sequencer:

set ctrl_ret1 [emulation sequencer control action=start]

Sample Output in the HLTAPI console:

start sequencer .....
        command "Start OSPF"...
        command "Activate/Deactivate StreamBlocks 1"...
        command "Wait 8"...
        command "Routing: Establish Protocol 3"...
        command "Routing: Verify Routing State 1"...
        command "Activate/Deactivate StreamBlocks 3"...
        command "Iterate Burst Size 1"...
        command "Iterate Combo Command 1"...
        command "Iterate Trial Command 1"...
        command "Iterate Throughput 1"...
        command "Iterate Load Size 1"...
        command "Iterate Frame Size 4"...
        command "Set Traffic Duration 10 sec"...
        command "Wait 9"...
        command "Start StreamBlocks 3"...
        command "Wait 15"...
        command "Start Random Error Insertion 1"...
        command "Start Capture 2"...
        command "Wait 16"...
        command "Add Chart Marker 1"...
        command "Clear Chart Results 1"...
        command "Wait 17"...
        command "Stop Capture 3"...
        command "Stop StreamBlocks 3"...
        Command "Stop Random Error Insertion 1"...

save results

Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>

Purpose:

Save the results data in a DB file.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    save results
        loop_mode= {append|overwrite}
        result_file_name= <string> M
        save_detailed_results= {true|false}

Arguments:

loop_mode
                Whether to append results to an existing file or overwrite the file when
                looping.
                Values: append, overwrite
                Default: append

result_file_name
                Specifies absolute path or filename for the result DB file. If you specify
                an absolute path, the location of the result DB file is this absolute path.
                If you only specify filename, the location of the result DB file is the
                custom_path that you specified by ``test config`` function. If not
                specified, the Sprient TestCenter output file path will be used.
                This argument is `Mandatory` for the ``save results`` function.

save_detailed_results
                Whether to save detailed results.
                Values: true, false
                Default: false
Return Values:

The function returns a keyed list using the following keys:

status Success (1) or failure (0) of the operation log An error message (if the operation failed)

Description:
The save results function saves the results data in a DB file. Use the result_file_name argument to specify the location of the DB file.

Examples:

Sample Input:

save results
       result_file_name= "c:/work/saveresult/results.db"
       loop_mode= overwrite
       save_detailed_results= true

Sample Output:

{status 1}

End of Procedure Header