+ All Categories
Home > Documents > HLTAPI Command Reference...To obtain technical support for any Spirent Communications product,...

HLTAPI Command Reference...To obtain technical support for any Spirent Communications product,...

Date post: 25-May-2020
Category:
Upload: others
View: 24 times
Download: 0 times
Share this document with a friend
2077
Spirent TestCenter TM Automation HLTAPI Command Reference May 2020 PN 71-008967 Rev A
Transcript
  • Spirent TestCenterTM AutomationHLTAPI Command ReferenceMay 2020

    PN 71-008967 Rev A

  • Spirent27349 Agoura RoadCalabasas, CA 91301USA

    Copyright

    © 2020 Spirent Communications, Inc. All Rights Reserved.

    All of the company names and/or brand names and/or product names referred to in this document, in particular,the name “Spirent” and its logo device, are either registered trademarks or trademarks of Spirent plc and itssubsidiaries, pending registration in accordance with relevant national laws. All other registered trademarks ortrademarks are the property of their respective owners. The information contained in this document is subjectto change without notice and does not represent a commitment on the part of Spirent Communications. Theinformation in this document is believed to be accurate and reliable, however, Spirent Communications assumes noresponsibility or liability for any errors or inaccuracies that may appear in the document.

    Limited Warranty

    Spirent Communications, Inc. (“Spirent”) warrants that its Products will conform to the description on the faceof order, that it will convey good title thereto, and that the Product will be delivered free from any lawful securityinterest or other lien or encumbrance.

    Spirent further warrants to Customer that hardware which it supplies and the tangible media on which it suppliessoftware will be free from significant defects in materials and workmanship for a period of twelve (12) months,except as otherwise noted, from the date of delivery (the “Hardware Warranty Period”), under normal use andconditions.

    To the extent the Product is or contains software (“Software”), Spirent also warrants that, if properly used byCustomer in accordance with the Software License Agreement, the Software which it supplies will operate inmaterial conformity with the specifications supplied by Spirent for such Software for a period of ninety (90)days from the date of delivery (the “Software Warranty Period”). The “Product Warranty Period” shall meanthe Hardware Warranty Period or the Software Warranty Period, as applicable. Spirent does not warrant that thefunctions contained in the Software will meet a specific requirement or that the operation will be uninterruptedor error free. Spirent shall have no warranty obligations whatsoever with respect to any Software which has beenmodified in any manner by Customer or any third party.

    Defective Products and Software under warranty shall be, at Spirent's discretion, repaired or replaced or a creditissued to Customer's account for an amount equal to the price paid for such Product provided that: (a) such Productis returned to Spirent after first obtaining a return authorization number and shipping instructions, freight prepaid, toSpirent's location in the United States; (b) Customer provides a written explanation of the defect or Software failureclaimed by Customer; and (c) the claimed defect actually exists and was not caused by neglect, accident, misuse,improper installation, improper repair, fire, flood, lightning, power surges, earthquake, or alteration. Spirent willship repaired Products to Customer, freight prepaid, based on reasonable best efforts after the receipt of defectiveProducts. Except as otherwise stated, any claim on account of defective materials or for any other cause whatsoeverwill conclusively be deemed waived by Customer unless written notice thereof is given to Spirent within theWarranty Period. Spirent reserves the right to change the warranty and service policy set forth above at any time,after reasonable notice and without liability to Customer.

    TO THE EXTENT PERMITTED BY APPLICABLE LAW, ALL IMPLIED WARRANTIES, INCLUDINGBUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENTAND FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY EXCLUDED, AND THE LIABILITY OFSPIRENT, IF ANY, FOR DAMAGE RELATING TO ANY ALLEGEDLY DEFECTIVE PRODUCT SHALL BELIMITED TO THE ACTUAL PRICE PAID BY THE CUSTOMER FOR SUCH PRODUCT. THE PROVISIONSSET FORTH ABOVE STATE SPIRENT'S ENTIRE RESPONSIBILITY AND CUSTOMER'S SOLE ANDEXCLUSIVE REMEDY WITH RESPECT TO ANY BREACH OF ANY WARRANTY.

  • Contents

    Contents

    How to Contact Us......................................................................................................5Introduction..................................................................................................................640G/100G Functions..................................................................................................116PE/6VPE Functions................................................................................................. 21802.1X Functions.......................................................................................................51Alarm Functions........................................................................................................ 72ANCP Functions........................................................................................................ 78ARP/ND Functions.................................................................................................. 101BFD Functions.........................................................................................................104BGP Functions........................................................................................................ 124Convergence Functions......................................................................................... 258Device Configuration Functions............................................................................263DHCP Functions...................................................................................................... 276DHCP Server Functions..........................................................................................327EFM Functions.........................................................................................................371EOAM Functions..................................................................................................... 394EVPN Functions...................................................................................................... 442EVPN Wizard Functions......................................................................................... 466EVPN MPLS Wizard Functions.............................................................................. 498FC Functions........................................................................................................... 532FCoE Functions.......................................................................................................542GRE Functions........................................................................................................ 589HTTP Functions.......................................................................................................597IGMP Functions....................................................................................................... 619IGMP Querier Functions.........................................................................................649IPTV Functions........................................................................................................ 660IPv6 Autoconfiguration Functions........................................................................ 680ISIS Functions......................................................................................................... 697L2TP Functions....................................................................................................... 756L2TPv3 Functions................................................................................................... 780LACP Functions...................................................................................................... 794LDP Functions......................................................................................................... 805LLDP Functions.......................................................................................................846Micro BFD Functions..............................................................................................881MLD Functions........................................................................................................ 889MLD Querier Functions.......................................................................................... 912MPLS-TP Functions................................................................................................ 924MPLS IP VPN Functions.........................................................................................974MPLS VPN Functions............................................................................................1006Multicast Functions...............................................................................................1028MVPN Functions....................................................................................................1041OpenFlow Functions.............................................................................................1088OSPF Functions.................................................................................................... 1143Packet Capture Functions....................................................................................1240Packet Decoding Functions................................................................................. 1271PCEP Functions.................................................................................................... 1274PIM Functions........................................................................................................1310PING Functions..................................................................................................... 1333PPP Functions....................................................................................................... 1336PPPoX Functions.................................................................................................. 1349

    3

  • Contents

    PPPoX Server Functions...................................................................................... 1380PTP Functions....................................................................................................... 1408RFC 2544 Functions..............................................................................................1431RFC 3918 Functions..............................................................................................1475RFC 2889 Functions..............................................................................................1506RIP Functions........................................................................................................ 1522RSVP Functions.................................................................................................... 1539RSVP-TE Wizard Functions..................................................................................1581Session Functions................................................................................................ 1587SIP Functions........................................................................................................ 1650STP Functions....................................................................................................... 1672SyncE Functions................................................................................................... 1692Testing Utility Functions...................................................................................... 1702TWAMP Functions.................................................................................................1709Traffic Functions................................................................................................... 1719Video Functions.................................................................................................... 1916VPLS Functions.....................................................................................................1931VQA Functions...................................................................................................... 1940VXLAN Functions.................................................................................................. 1960VXLAN EVPN Overlay Functions.........................................................................1987WLAN Functions................................................................................................... 2026Save as HLTAPI CLI Mode................................................................................... 2045Appendix A. Functions that Support Multiple Protocols on One Device.........2047Appendix B. Result Properties for DRV..............................................................2049Function Index.......................................................................................................2073

    4

  • How to Contact Us

    How to Contact Us

    To obtain technical support for any Spirent Communications product, please contact our Support Servicesdepartment using any of the following methods:

    Americas

    Email: [email protected]: https://support.spirent.com/SpirentCSC/Toll Free: +1 400-SPIRENT (+1 400-774-7368) (North America)Phone: +1 818-676-2616Hours: Monday through Friday, 05:30 to 18:00 Pacific Time

    Europe, Africa, Middle East

    Email: [email protected]: https://support.spirent.com/SpirentCSC/Phone: +33 (1) 6137 2270 (France)Phone: +44 1803 546333 (UK)Hours: Monday through Thursday 09:00 to 18:00, Friday 09:00 to 17:00, Paris Time

    Asia Pacific

    Email: [email protected]: https://support.spirent.com/SpirentCSC/Phone: +86 (800) 810-9529 (toll-free mainland China only)Phone: +86 (10) 8233 0033 (China)Hours: Monday through Friday 09:00 to 18:00 Beijing Time

    The Spirent Customer Service Center (https://support.spirent.com/SpirentCSC/) includes useful toolssuch as a powerful Knowledge Base with tens of thousands of Spirent TestCenter articles to serve yourtechnical information needs. The Knowledge Base offers an easy-to-use browse mode along with anintelligent search that offers quick answers to your network analysis and measurement questions. Newcontent is added daily by Spirent’s communications and networking experts. Log in with your user IDand password to gain access to additional content that is available only to customers – user manuals,Help files, release notes, Tech Bulletins, and more. When you log in, you also gain access to downloadsoftware and firmware, and to manage your SRs.

    Information about Spirent Communications and its products and services can be found on the maincompany website at https://www.spirent.com.

    Company Address

    Spirent Communications27349 Agoura RoadCalabasas, CA 91301USA

    5

    mailto:[email protected]://support.spirent.com/SpirentCSC/mailto:[email protected]://support.spirent.com/SpirentCSC/mailto:[email protected]://support.spirent.com/SpirentCSC/https://support.spirent.com/SpirentCSC/http://www.spirent.com

  • Introduction

    Introduction

    The Spirent TestCenter Automation HLTAPI Command Reference provides basic information about SpirentHigh Level Test Application Programming Interface (HLTAPI) functions. It also provides descriptions of howto use these functions along with examples of creating and running test configurations.

    The target audience is test specialists who run automation tests using Spirent TestCenter hardware andsoftware. Users of this manual should have the following knowledge and experience:

    • Familiarity with the operating system on your PC or workstation (Microsoft® Windows® or Linux®).• Moderate familiarity with test equipment.• Working knowledge of data communications theory and practice.• Ability to program with the the Tcl, Python, or Perl scripting languages.

    For information on HLTAPI installations, enviroment configurations, and additional HLTAPI features, refer toSpirent TestCenter Automation HLTAPI Programmer's Reference.

    Sample Scripts

    You can find sample scripts in the installation directory under HLTAPI_ReleasePackage > SampleScripts.(The link opens the SampleScripts folder if you use this manual from its default installed location. If you usethis manual from another directory, you must navigate to the SampleScripts folder.)

    About Spirent HLTAPI

    Spirent HLTAPI is Spirent's implementation of Cisco HLTAPI. Spirent HLTAPI is designed to hide the lower-level APIs of Spirent TestCenter. This greatly reduces the need for any test script changes if there arechanges to Spirent's lower-level APIs in newer releases.

    Spirent HLTAPI started out Tcl-based, but beginning with release 4.40 it has added support for Perl andPython. Depending on automation preferences or requirements, test specialists can use any of theselanguages for tests.

    Spirent TestCenter HLTAPI adheres to the following Cisco requirements:

    • It is a self-contained package containing everything needed to use the library.• It is distributed for use with the Spirent TestCenter software.

    About This Manual

    This Introduction provides an overview of Spirent HLTAPI and the use of this manual.

    The Functions section is the core of the manual. It covers all the functions that make up HLTAPI. Eachfunction is introduced and its usage is described. All supported protocols are covered, as well as some testcontrol functions.

    Each function is documented with the following information:

    • Purpose - General overview of the purpose of the function and related concepts.• Synopsis - List of all function arguments.• Arguments - Argument description including function, dependencies, value range, and default value.• Arguments Unsupported by Save as HLTAPI - Arguments currently not supported by Save as HLTAPI.• Cisco Specific Arguments - Arguments specific to Cisco HLTAPI but not supported by Spirent HLTAPI.• Return Values - What the function returns when you invoke it.• Description - A general walk-through of the function.• Examples - Code snippets of specific configurations in Tcl, Python and Perl.• Notes - Additional information, where necessary.

    Appendix A is a list of Spirent HLTAPI functions that support multiple protocols on the same device.

    Appendix B is a list of the Spirent TestCenter properties available for the sth::drv_stats function.

    Notes:

    • To be consistent with previous examples in this documentation, the Synopsis, Arguments and Descriptionare provided in Tcl. However, this information is generic and applies equally to Python and Perl.

    • Orange text in function descriptions indicates Spirent-specific extensions.

    6

    ../SampleScripts

  • Introduction

    Function Conventions

    This section provides general information on function conventions. Detailed distinctions and standard syntaxfor each supported language are not discussed.

    Spirent HLTAPI is designed so that HLTAPI for Tcl, Python and Perl share the same functions, arguments,and capabilities. The only difference is the language each HLTAPI uses.

    HLTAPILanguage

    Initialization Function Call Argument Format Parameter Passing

    Tcl package require \SpirentHltApisth::function_name -arg_name -arg1 value1 \-arg2 value2 \...

    Python import sth sth.function_name arg_name arg1 = 'value1',arg2 = 'value2',...

    Perl use sth;use strict;use warnings;use Data::Dumper;sth::function_name arg_name arg1 => 'value',arg2 => 'value',...

    Notes:

    • Functions or arguments that are longer than two words are connected by an underscore (“_”). For example,emulation_l2tp_config, ip_address.

    • Arguments are either optional or mandatory. In Synopsis, an argument inside a bracket "[]" is optional;an argument not contained in a bracket is mandatory. Mandatory arguments are always listed first. In thefollowing sample synopsis, arguments -mode and -ports are mandatory. Argument -port_handleis mandatory for -mode create, and argument -handle is mandatory for -mode delete. Argumentattachment_group_id is optional. sth::emulation_mpls_tp_config -mode create -port_handle | -mode delete -handle -ports [-attachment_group_id (100:1)] ...

    The following three HLTAPI code snippets do the same actions in Tcl, Python and Perl. The snippets createan OSPFv2 router on a specified port. Eight parameters are passed to set up the device.

    # HLTAPI for Tcl set device_ret0 [sth::emulation_ospf_config \ -port_handle $port(1) \ -intf_ip_addr 134.231.242.112 \ -hello_interval 10 \ -router_priority 10 \ -session_type ospfv2 \ -gateway_ip_addr 134.231.242.2 \ -area_id 10.01.12.24 \ -mode create \ ] # HLTAPI for Python device_ret0 = sth.emulation_ospf_config ( port_handle = '$port(1)', intf_ip_addr = '134.231.242.112', hello_interval = '10', router_priority = '10', session_type = 'ospfv2', gateway_ip_addr = '134.231.242.2', area_id = '10.01.12.24', mode = 'create');

    # HLTAPI for Perl my %device_ret0 = sth::emulation_ospf_config ( port_handle => '$port(1)', intf_ip_addr => '134.231.242.112', hello_interval => '10', router_priority => '10', session_type => 'ospfv2', gateway_ip_addr => '134.231.242.2', area_id => '10.01.12.24', mode => 'create');

    7

  • Introduction

    Data Structures Returned

    Depending on the language used, a function will return a keyed list (Tcl), a dictionary (Python), or a hash(Perl). These different data structures deliver equivalent data.

    HLTAPIlanguage

    Data StructureTypes

    Examples of Returned Data Structures Value Retrieval Method

    Tcl Keyed list {status 1}{key1 value1}...

    {status 0}{log {}}

    keylget

    Python Dictionary {'status': '1', 'key1': 'value1'...}

    {'status': '0'}{'log': {}}

    dict_name['key']

    Perl Hash $VAR1 = 'status';$VAR2 = '1';$VAR3 = 'key1';$VAR4 = 'value1';...

    $VAR1 = 'status';$VAR2 = '0';$VAR3 = 'log';$VAR4 = 'error message';

    {key}[array number]

    or for a nested hash:

    hash_name{key1}{key2}...

    Return values for all HLTAPI procedures contain a key called status that indicates if the procedure wassuccessful. Status 0 indicates failure of the procedure, which also generates a key called log that is the errorlog. Status 1 indicates success. The table above gives examples of the data structure returned when thestatus is 1 and when it is 0 for each language.

    In the previous example that set up an OSPFv2 device, the keyed list/dictionary/hash was defined asdevice_ret0. The following snippets retrieve the status first, and then display the return values when itconfirms that the status is 1.

    # HLTAPI for Tcl set status [keylget device_ret0 status] if {$status == 1} { puts $device_ret0 } # Output: {{status 1}{handle ospfv2routerconfig1}} # HLTAPI for Python status = device_ret0['status'] if (status == '1') : print device_ret0 # Output: {'status': '1', 'handle': ospfv2routerconfig1} # HLTAPI for Perl $status = $device_ret0{status}[0]; if ($status == 1) { print Dumper %device_ret0; } # Output: $VAR1 = 'handles'; $VAR2 = 'router1'; $VAR3 = 'status'; $VAR4 = '1';

    Useful References

    Other documentation resources are listed below.

    • Spirent TestCenter Automation HLTAPI Programmer's Reference - Describes the environmentconfigurations and the installation process of Spirent HLTAPI. Information on additional HLTAPI features isalso included. You can find this guide in HLTAPI_ReleasePackage > UserDoc.

    • Getting Started with Spirent TestCenter - Provides details on how to install Spirent TestCenter chassis andmodules and how to obtain license keys. This manual is included on the Spirent TestCenter Application

    8

  • Introduction

    DVD and is available in the Knowledge Base on the Spirent Communications support website (https://support.spirent.com/SpirentCSC/).

    • Sample scripts - Sample scripts are provided for HLTAPI for Tcl, HLTAPI for Python and HLTAPI for Perl.You can find sample scripts in HLTAPI_ReleasePackage > SampleScripts.

    9

    https://support.spirent.com/SpirentCSC/https://support.spirent.com/SpirentCSC/

  • Functions

    Functions

    The functions are given on the following pages.

    10

  • 40G/100G Functions

    40G/100G Functions

    Functions:sth::pcs_error_configsth::pcs_error_controlsth::random_error_configsth::random_error_controlsth::forty_hundred_gig_l1_results

    sth::pcs_error_config

    Name: sth::pcs_error_config

    Purpose: Spirent Extension (for Spirent HLTAPI only). Configures the error mask for the 64/66B lane marker and data block on the specified Physical Coding Sublayer (PCS) lane. PCS is common to two families (40 Gb/s and 100 Gb/s) of Physical Layer implementations, known as 40GBASE-R and 100GBASE-R, both of which are based on a 64B/66B code. The 64B/66B code supports transmission of data and control characters, while maintaining robust error detection. Data distribution is introduced to support multiple lanes in the physical layer (4 lanes for 40GBASE-R and 20 lanes for 100GBASE-R). Part of the distribution includes the periodic insertion of an alignment marker, which allows the receive PCS to align data from multiple lanes. Using the configured error mask, Spirent HLTAPI performs an XOR operation on the 64/66B lane marker and data block. The key in a hexadecimal or binary mask where a one in the binary indicates an error will be inserted and a zero indicates the bit will be left as is.

    Synopsis:Note: M indicates the argument is mandatory.

    sth::pcs_error_config [-port_handle M] [-burst_count ] [-burst_interval ] [-burst_length ] [-continuous_mode {LANE_MARKERS_ONLY | LANE_MARKERS_AND_PAYLOAD}] [-error_insertion_mode {LANE_MARKERS_ONLY | LANE_MARKERS_AND_PAYLOAD}] [-lane_enable [-sync_header ] [-marker0 ] [-bip3 ] [-marker4 ] [-marker5 ] [-marker6 ] [-bip7 ] Arguments: -port_handle Specifies the port on which the error mask will be configured. This argument is mandatory. -burst_count Number of error bursts. This argument is only valid when -continuous_mode is set to false. Possible values range from 1 to 0x3fffffffffff. The default is 1. -burst_interval Number of blocks between error bursts. This argument is only valid when -continuous_mode is set to false. The default value

    11

  • 40G/100G Functions

    is 1. -burst_length Number of sequential errored blocks in each burst. This argument is only valid when -continuous_mode is set to false. Possible values range from 1 to 0xffffff. The default is 1. -continuous_mode Determines whether the PCS error insertion is continuous or not. Possible values are true (continuous) and false (not continuous). The default is true. -error_insertion_mode Determines the error insertion mode. Possible Values are described below: LANE_MARKERS_ONLY Only alignment markers are corrupted upon insertion LANE_MARKERS_AND_PAYLOAD Both alignment markers and payload are corrupted upon insertion The default value is LANE_MARKERS_ONLY -lane_enable Boolean flags to individually enable/disable each of the PCS lanes. The value is a 4-Boolean list for 40GBASE-R, and a 20-Boolean list for 100GBASE-R. For example: -lane_enable {TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE \ FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE \ FALSE FALSE FALSE}\ -sync_header The 2-bit sync header in the alignment marker bytes (to corrupt). The alignment marker has the form of a specially defined 66-bit block with a control block Sync header. The transmitters periodically insert alignment markers simultaneously on each PCS lane after the transmission of every 16,383 blocks of data and control. A non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 3. The default is 0. -marker0 Marker 0 in the alignment marker bytes (to corrupt). The M bytes (-marker0 - -marker7) contain specific values that identify each lane from 0 to 19. A non-zero value for any bit indicates that the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -marker1 Marker 1 in the alignment marker bytes (to corrupt). A non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -marker2 Marker 2 in the alignment marker bytes (to corrupt). A non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -bip3 The first Bit Interleaved Parity (BIP) field in the alignment marker bytes (to corrupt). BIP contains a parity check calculated over the bits from the previously inserted alignment marker and all the subsequently transmitted blocks up to the current marker. A non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0.

    12

  • 40G/100G Functions

    -marker4 Marker 4 in the alignment marker bytes (to corrupt). A non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -marker5 Marker 5 in the alignment marker bytes (to corrupt). Non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -marker6 Marker 6 in the alignment marker bytes (to corrupt). Non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. -bip7 The second BIP field in the alignment marker bytes (to corrupt). This BIP maintains line balancing. Non-zero value for any bit indicates the bit will be flipped (corrupted) upon transmission. Possible values range from 0 to 255. The default is 0. Arguments Unsupported by Save as HLTAPI: This function is currently not supported by Save to HLTAPI. To test with this function, you must configure it manually in the generated Spirent HLTAPI scripts.

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

    handle Identifies the handle of the PCS error insertion configuration

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

    log An error message (if the operation failed)

    Description: The sth::pcs_error_config function configures the error mask for the 64/66B lane marker and data block on the specified PCS lane. Use -port_handle to specify the port on which you want to configure the error mask.

    Using the configured error mask, Spirent HLTAPI performs an XOR operation on the 64/66B lane marker and data block. The key in a hexadecimal or binary mask where a one in the binary indicates an error will be inserted and a zero indicates the bit will be left as is.

    Examples: To configure 40G PCS error insertion: set pcs_err_config [sth::pcs_error_config\ -port_handle $port1\ -continuous_mode false\ -lane_enable {TRUE FALSE FALSE TRUE}\ -sync_header 1\ -burst_count 10] Sample Output:

    {{status 1}{handle pcserrorinsertionconfig1}} To configure 100G PCS error insertion: set pcs_err_config [sth::pcs_error_config\ -port_handle $port1\

    13

  • 40G/100G Functions

    -continuous_mode false\ -lane_enable {TRUE FALSE FALSE TRUE FALSE FALSE FALSE \ FALSE FALSE FALSE FALSE FALSE FALSE FALSE \ FALSE FALSE FALSE FALSE FALSE FALSE}\ -sync_header 1\ -burst_count 10]

    Sample Output:

    {{status 1}{handle pcserrorinsertionconfig1}}

    sth::pcs_error_control

    Name: sth::pcs_error_control

    Purpose: Spirent Extension (for Spirent HLTAPI only). Starts or stops the configured PCS error insertion

    Synopsis:Note: M indicates the argument is mandatory.

    sth::pcs_error_control [-port_handle M] [-action {start | stop} M]

    Arguments: -port_handle Specifies the port handle on which you want to start or stop the PCS error insertion. This argument is mandatory. -action Specifies the action to perform. Possible values are start and stop. 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 (1) or failure (0) of the operation log An error message (if the operation failed) Description: The sth::pcs_error_control function starts or stops the configured PCS error insertion. Use the -action argument to specify the action to perform. (See the -action argument for information about the actions.)

    Examples: To start the PCS error insertion: set ctrl_ret [sth::pcs_error_control \ -action start \ -port_handle $port1]

    sth::random_error_config

    Name: sth::random_error_config

    14

  • 40G/100G Functions

    Purpose: Spirent Extension (for Spirent HLTAPI only). Configures pseudo-random bit stream (PRBS) error insertion. PRBS error insertion operates at the Physical Medium Attachment (PMA) sublayer, using an unframed PRBS per lane to determine if your 40/100 Gbps optical transceivers function correctly.

    Synopsis:Note: M indicates the argument is mandatory.

    sth::random_error_config [-port_handle M] [-lane_enable ] [-rate ] Arguments: -port_handle Specifies the port handle on which the PRBS error insertion will be configured. This argument is mandatory. -lane_enable Boolean flags to individually enable each of the PMA lanes for PRBS random error insertion. The value is a 4-Boolean list for 40G, and a 10-Boolean list for for 100G. For example: -lane_enable {TRUE FALSE FALSE TRUE FALSE FALSE FALSE\ FALSE FALSE FALSE}\

    -rate PRBS random error insertion rate. Possible values range from 0.00000000001 to 0.1. The default value is 0.000000001.

    Arguments Unsupported by Save as HLTAPI: The sth::random_error_config function is currently not supported by Save to HLTAPI. To test with this function, you must configure it manually in the generated Spirent HLTAPI scripts.

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

    handle Identifies the handle of the random error insertion configuration

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

    log An error message (if the operation failed)

    Description: The sth::random_error_config function configures the(PRBS) error insertion on the specified 40G/100G port. Use -port_handle to specify the port on which you want to configure random error insertion. Examples: To configure 40G random error insertion: set random_err_config [sth::random_error_config\ -port_handle $port2\ -lane_enable {TRUE FALSE FALSE TRUE}\ -rate 0.000001] Sample Output: {{status 1}{handle randomerrorinsertionconfig1}}

    To configure 100G random error insertion:

    15

  • 40G/100G Functions

    set random_err_config [sth::random_error_config\ -port_handle $port2\ -lane_enable {TRUE FALSE FALSE TRUE FALSE FALSE FALSE\ FALSE FALSE FALSE}\ -rate 0.000001] Sample Output: {{status 1}{handle randomerrorinsertionconfig1}}

    sth::random_error_control

    Name: sth::random_error_control

    Purpose: Spirent Extension (for Spirent HLTAPI only). A Spirent Extension created to start or stop injecting random errors on the high speed fiber interface

    Synopsis:Note: M indicates the argument is mandatory.

    sth::random_error_control [-port_handle M] [-action {start | stop} M]

    Arguments: -port_handle Specifies the port handle on which you want to start or stop the random error insertion. This argument is mandatory. -action Specifies the action to perform. Possible values are start and stop. 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 (1) or failure (0) of the operation

    log An error message (if the operation failed) Description: The sth::pcs_error_control function starts or stops the configured random error insertion. Use the -action argument to specify the action to perform. (See the -action argument description for information about the actions.)

    Examples: Sample Input: set ctrl_ret [sth::random_error_control \ -action start \ -port_handle $port1]

    16

  • 40G/100G Functions

    sth::forty_hundred_gig_l1_results

    Name: sth::forty_hundred_gig_l1_results

    Purpose: Spirent Extension (for Spirent HLTAPI only). A Spirent Extension created to return statistics for 40G/100G testing

    Synopsis: sth::forty_hundred_gig_l1_results [-port_handle [-type {pcs | pcs_lane | pma_lane}] [-mode {port | lanes | all}

    Arguments: -port_handle Specifies the port handle on which the results will be returned. If not specified, the results on all ports will be returned.

    -type Specifies the type of results to be returned Possible values are: pcs Port aggregated PCS results pcs_lane PCS lanes results pma_lane PMA lanes results The default value is pcs.

    -mode Specify the results mode. Possible values are: port Returns port-level results lanes Returns lane-level results all Returns all statistics The default value is port. If -type is set to pcs, no lane-level results will be returned. Description: The sth::forty_hundred_gig_l1_results function returns statistics for 40G/100G testing. Use -type to specify the type of the results to be returned. Use -mode to specify the scope of the results. (See the description of -type and -mode for more details) 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) The following keys are returned when you specify -type pcs. The results for each type of error contain four keys: *errors - Number of errors *errorrate - Rate of errors per second *errorserr - Number of errored seconds *errorslastsec - Number of errors in the previous second Key Error Description port_pcs_bip8errors BIP-8 code errors port_pcs_bip8errorrate port_pcs_bip8errorserr port_pcs_bip8errorslastsec

    17

  • 40G/100G Functions

    port_pcs_consecerrors Four consecutive PCS lane marker errors occurred port_pcs_consecerrorrate in the lane port_pcs_consecerrorserr port_pcs_consecerrorslastsec port_pcs_lengtherrors PCS lane markers were not 16,383 data blocks apart port_pcs_lengtherrorrate port_pcs_lengtherrorserr port_pcs_lengtherrorslastsec port_pcs_markererrors An incorrectly formed PCS lane marker word was port_pcs_markererrorrate detected in the respective lane port_pcs_markererrorserr port_pcs_markererrorslastsec port_pcs_sherrors One or more bad sync headers were detected in the port_pcs_sherrorrate most recent sampling interval port_pcs_sherrorserr port_pcs_sherrorslastsec The following keys are returned when you specify -type pcs_lane. The results for each type of error contain four keys: *errors - Number of errors *errorrate - Rate of errors per second *errorserr - Number of errored seconds *errorslastsec - Number of errors in the previous second Key Error Description

    port_pcs_lane_bip8errors BIP-8 code errors port_pcs_lane_bip8errorrate port_pcs_lane_bip8errorserr port_pcs_lane_bip8errorslastsec port_pcs_lane_consecerrors Four consecutive PCS lane marker errors port_pcs_lane_consecerrorrate occurred in the lane port_pcs_lane_consecerrorserr port_pcs_lane_consecerrorslastsec port_pcs_lane_lengtherrors PCS lane markers were not 16,383 data port_pcs_lane_lengtherrorrate blocks apart port_pcs_lane_lengtherrorserr port_pcs_lane_lengtherrorslastsec port_pcs_lane_markererrors An incorrectly formed PCS lane marker word port_pcs_lane_markererrorrate was detected in the respective lane port_pcs_lane_markererrorserr port_pcs_lane_markererrorslastsec port_pcs_lane_sherrors One or more bad sync headers were detected port_pcs_lane_sherrorrate in the most recent sampling interval port_pcs_lane_sherrorserr port_pcs_lane_sherrorslastsec The following keys are returned when you specify -type pma_lane: port_pma_lane_bererrors Number of bit errors port_pma_lane_bererrorrate Bit error rate port_pma_lane_bersync Number of seconds the lane was in sync port_pma_lane_berunsync Number of seconds the lane was not in sync port_pma_lane_rxprbspattern The PRBS pattern Examples: To return port level PCS results:

    18

  • 40G/100G Functions

    set results [::sth::forty_hundred_gig_l1_results] Sample Output: {result_count 2} {port1 {{port {{port_name {10.61.33.240-6-1 //6/1}} {port_pcs_bip8errorrate 0.085} {port_pcs_bip8errors 54} {port_pcs_bip8errorserr 12} {port_pcs_bip8errorslastsec 0} {port_pcs_consecerrorrate 1.321} {port_pcs_consecerrors 843} {port_pcs_consecerrorserr 29} {port_pcs_consecerrorslastsec 0} {port_pcs_lengtherrorrate 0.232} {port_pcs_lengtherrors 148} {port_pcs_lengtherrorserr 12} {port_pcs_lengtherrorslastsec 0} {port_pcs_markererrorrate 10.063} {port_pcs_markererrors 6420} {port_pcs_markererrorserr 50} {port_pcs_markererrorslastsec 0} {port_pcs_sherrorrate 24589.521} {port_pcs_sherrors 15688113} {port_pcs_sherrorserr 102} {port_pcs_sherrorslastsec 0} {port_pcs_syncerrorrate 10.011} {port_pcs_syncerrors 6387} {port_pcs_syncerrorserr 112} {port_pcs_syncerrorslastsec 0}}}}} {port2 {{port {{port_name {10.61.33.240-6-3//6/3}} {port_pcs_bip8errorrate 0.653} {port_pcs_bip8errors 295} {port_pcs_bip8errorserr 3} {port_pcs_bip8errorslastsec 0} {port_pcs_consecerrorrate 0.42} {port_pcs_consecerrors 190} {port_pcs_consecerrorserr 3} {port_pcs_consecerrorslastsec 0} {port_pcs_lengtherrorrate 0.383} {port_pcs_lengtherrors 173} {port_pcs_lengtherrorserr 2} {port_pcs_lengtherrorslastsec 0} {port_pcs_markererrorrate 0.655} {port_pcs_markererrors 296} {port_pcs_markererrorserr 3} {port_pcs_markererrorslastsec 0} {port_pcs_sherrorrate 411.449} {port_pcs_sherrors 185975} {port_pcs_sherrorserr 4} {port_pcs_sherrorslastsec 0} {port_pcs_syncerrorrate 0.221} {port_pcs_syncerrors 100} {port_pcs_syncerrorserr 4} {port_pcs_syncerrorslastsec 0}}}}} {status 1}

    To return PCS lane results: set results [::sth::forty_hundred_gig_l1_results -type "pcs_lane" -mode port] Sample Output: {result_count 2} {port1 {{port {{port_name {10.61.33.240-6-1 //6/1}} {port_pcs_lane_index {}} {port_pcs_lane_bip8errorrate 0.0757749711314244} {port_pcs_lane_bip8errors 54} {port_pcs_lane_bip8errorserr 18} {port_pcs_lane_bip8errorslastsec 0} {port_pcs_lane_consecerrorrate 0.967853040360467} {port_pcs_lane_consecerrors 843} {port_pcs_lane_consecerrorserr 199} {port_pcs_lane_consecerrorslastsec 0} {port_pcs_lane_lengtherrorrate 0.17910447721973} {port_pcs_lane_lengtherrors 148} {port_pcs_lane_lengtherrorserr 29} {port_pcs_lane_lengtherrorslastsec 0} {port_pcs_lane_markererrorrate 7.37083810096584} {port_pcs_lane_markererrors 6420} {port_pcs_lane_markererrorserr 292} {port_pcs_lane_markererrorslastsec 0} {port_pcs_lane_sherrorrate 18011.6107527504} {port_pcs_lane_sherrors 15688113} {port_pcs_lane_sherrorserr 1375} {port_pcs_lane_sherrorslastsec 0} {port_pcs_lane_syncerrorrate 7.33295061540012} {port_pcs_lane_syncerrors 6387} {port_pcs_lane_syncerrorserr 2233} {port_pcs_lane_syncerrorslastsec 0}}}}} {port2 {{port {{port_name {10.61.33.240-6-3 //6/3}} {port_pcs_lane_index {}} {port_pcs_lane_bip8errorrate 0.440876076599943} {port_pcs_lane_bip8errors 295} {port_pcs_lane_bip8errorserr 23} {port_pcs_lane_bip8errorslastsec 0} {port_pcs_lane_consecerrorrate 0.289051202539035} {port_pcs_lane_consecerrors 190} {port_pcs_lane_consecerrorserr 22} {port_pcs_lane_consecerrorslastsec 0} {port_pcs_lane_lengtherrorrate 0.267153384164866} {port_pcs_lane_lengtherrors 173} {port_pcs_lane_lengtherrorserr 20} {port_pcs_lane_lengtherrorslastsec 0} {port_pcs_lane_markererrorrate 0.442335931158221} {port_pcs_lane_markererrors 296} {port_pcs_lane_markererrorserr 23} {port_pcs_lane_markererrorslastsec 0} {port_pcs_lane_sherrorrate 271.496451475743} {port_pcs_lane_sherrors 185975} {port_pcs_lane_sherrorserr 78} {port_pcs_lane_sherrorslastsec 0} {port_pcs_lane_syncerrorrate 0.145985455827796} {port_pcs_lane_syncerrors 100} {port_pcs_lane_syncerrorserr 78} {port_pcs_lane_syncerrorslastsec 0}}}}} {status 1}

    To return PMA lane results: set results [::sth::forty_hundred_gig_l1_results -type pma_lane -mode lanes] Sample Output:

    19

  • 40G/100G Functions

    {result_count 2} {port1 {{lane {{0 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {1 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {2 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {3 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {4 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {5 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {6 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {7 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {8 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}} {9 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 896} {port_pma_lane_rxprbspattern NONE}}}}}}} {port2 {{lane {{0 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {1 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {2 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {3 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {4 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {5 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {6 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {7 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {8 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}} {9 {{port_pma_lane_bererrorrate 0.0} {port_pma_lane_bererrors 0} {port_pma_lane_bersync 0} {port_pma_lane_berunsync 710} {port_pma_lane_rxprbspattern NONE}}}}}}} {status 1}

    20

  • 6PE/6VPE Functions

    6PE/6VPE Functions

    Functions:sth::emulation_6pe_6vpe_provider_port_configsth::emulation_6pe_6vpe_cust_port_configsth::emulation_6pe_6vpe_configsth::emulation_6pe_6vpe_controlsth::emulation_6pe_6vpe_info

    sth::emulation_6pe_6vpe_provider_port_config

    Name: sth::emulation_6pe_6vpe_provider_port_config

    Purpose: Spirent Extension (for Spirent HLTAPI only). Configures or deletes an emulated provider-side test port

    Synopsis:Note: M indicates the argument is mandatory.

    sth::emulation_6pe_6vpe_provider_port_config [-mode {create|delete} M] [-port_handle ] [-handle ] [-dut_interface_ipv4_addr ] [-dut_interface_ipv4_addr_step ] [-dut_interface_ipv4_prefix_len ] [-sub_interface_enable {true|false}] [-sub_interface_count ] [-vlan_id ]

    Arguments: -port_handle Specifies the test port to be added to the provider side of the 6PE/6VPE network. This argument is mandatory for -mode create.

    -mode Specifies the action to be performed. This argument is mandatory. Possible values are described below: create Adds a provider-side test port. You must specify -port_handle. delete Deletes specified routers under the provide-side port. You must specify -handle. -handle Specifies the handle of routers created under the emulated test port. This argument is mandatory for -mode delete. -dut_interface_ipv4_addr Defines the first IPv4 address of the DUT interfaces connected to the port. The default value is 192.85.1.1. -dut_interface_ipv4_addr_step Specifies the step size by which the DUT IPv4 address is incremented. The default value is 0.0.1.0. The number of times that the step repeats is the same as the number of sub-interfaces. This argument is available when -sub_interface_enable is set to true. -dut_interface_ipv4_prefix_len

    21

  • 6PE/6VPE Functions

    Specifies the IPv4 address prefix length of DUT interface connected to the port. Possible values range from 0 to 32. The default value is 24. -sub_interface_enable Enables or disables sub-interface on the DUT. Possible values are true and false. The default value is false. When this argument is enabled, you can specify the following arguments: -sub_interface_count -dut_interface_ipv4_addr_step -vlan_id -vlan_id_step -sub_interface_count Defines the number of sub-interfaces on the DUT interface. Possible values range from 1 to 255. The default value is 1. This argument is available when -sub_interface_enable is set to true. -vlan_id Specifies the starting VLAN ID of DUT interfaces. Possible values range from 0 to 4095. The default value is 1. This argument is available when -sub_interface_enable is set to true. -vlan_id_step Specifies the step size by which the VLAN ID is incremented. Possible values range from 0 to 4095. The default value is 1. This argument is available when -sub_interface_enable is set to 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

    log An error message (if the operation failed)

    Description: The sth::emulation_6pe_6vpe_provider_port_config function configures an emulated provider-side port, or deletes the routers under the port (specified by -handle). Use the -port_handle argument to specify the port to be added. Use the -action argument to specify the action to perform.

    Examples:

    The following example configures a provider-side port: sth::emulation_6pe_6vpe_provider_port_config \ -port_handle $port1\ -mode create \ -dut_interface_ipv4_addr 192.86.1.1 \ -dut_interface_ipv4_addr_step 0.0.2.0 \ -dut_interface_ipv4_prefix_len 24 \ -sub_interface_enable true \ -sub_interface_count 10 \ -vlan_id 102 \ -vlan_id_step 2 \

    Sample output:

    {status 1}

    sth::emulation_6pe_6vpe_cust_port_config

    22

  • 6PE/6VPE Functions

    Name: sth::emulation_6pe_6vpe_cust_port_config

    Purpose: Spirent Extension (for Spirent HLTAPI only).

    Configures or deletes an emulated customer-side test port

    Synopsis:Note: M indicates the argument is mandatory.Note: M indicates the argument is mandatory.

    sth::emulation_6pe_6vpe_cust_port_config [-mode {create|delete} M] [-port_handle ] [-handle ] [-dut_interface_ipv6_addr ] [-dut_interface_ipv6_addr_step ] [-dut_interface_ipv6_prefix_len ] [-sub_interface_enable {true|false}] [-sub_interface_count ] [-vlan_id ] [-vlan_id_step ]

    Arguments: -port_handle Specifies the test port to be added to the customer side of the 6PE/6VPE network. This argument is mandatory for -mode create.

    -mode Specifies the action to be performed. This argument is mandatory. Possible values are described below: create Adds a customer-side test port. You must specify -port_handle delete Deletes specified routers under the customer-side port. You must specify -handle.

    -handle Specifies the handle of the CE routers. This argument is mandatory for -mode delete.

    -dut_interface_ipv6_addr Specifies the first IPv6 address of the DUT interfaces connected to the port. The default value is ::.

    -dut_interface_ipv6_addr_step Specifies the step value by which to increment subsequent DUT IPv6 addresses. This argument is only available when -sub_interface_enable is set to true. The default value is 0:0:0:1::.

    -dut_interface_ipv6_prefix_len Specifies the IPv6 address's prefix length of the DUT connected to the port. Possible values range from 1 to 128. The default value is 64.

    -sub_interface_enable Enables or disables sub-interfaces on the DUT interface. Possible values are true and false. The default value is false. -sub_interface_count Defines the number of sub-interfaces to be created for the DUT. Possible values range from 1 to 255. The default value is 1. This argument is available when -sub_interface_enable is set to true.

    -vlan_id Specifies the starting VLAN ID. Possible values

    23

  • 6PE/6VPE Functions

    range from 0 to 4095. The default value is 1. This argument is available when -sub_interface_enable is set to true. -vlan_id_step Defines the step size by which to increment the VLAN ID. Possible values range from 0 to 4095. The default value is 1. This argument is available when -sub_interface_enable is set to 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

    log An error message (if the operation failed)

    Description: The sth::emulation_6pe_6vpe_cust_port_config function configures an emulated customer-side port, or deletes the routers under the port (specified by -handle). Use the -port_handle argument to specify the port to be added. Use the -action argument to specify the action to perform.

    Examples: The following example configures a customer-side port: sth::emulation_6pe_6vpe_cust_port_config \ -port_handle $port2\ -mode create \ -dut_interface_ipv6_addr 2000::10 \ -dut_interface_ipv6_addr_step ::1 \ -dut_interface_ipv6_prefix_len 96 \ -sub_interface_enable true \ -sub_interface_count 10 \ -vlan_id 102 \ -vlan_id_step 2 \

    Sample output:

    {status 1}

    sth::emulation_6pe_6vpe_config

    Name: sth::emulation_6pe_6vpe_config

    Purpose: Spirent Extension (for Spirent HLTAPI only). Creates or deletes IPv6 Provider Edge Router (6PE) or IPv6 VPN Provider Edge Router (6VPE) network topologies, mapping the operations of the 6PE or 6VPE Wizard in the Spirent TestCenter GUI. The function creates emulated and simulated Customer Edge (CE), Provider (P), and Provider Edge (PE) routers, specifies and enables routing and labeling protocols, configures customer and provider side VPNs, and creates the traffic that is sent between VPNs.

    Synopsis:Note: M indicates the argument is mandatory.Note: M indicates the argument is mandatory.

    sth::emulation_6pe_6vpe_config [-handle M]

    24

  • 6PE/6VPE Functions

    [-mode M] [-dut_router_id ] [-dut_as ] [-dut_4byte_as_enable {true|false}] [-dut_4byte_as ] [-use_cust_ports {true|false}] [-use_provider_ports {true|false}] [-igp_protocol {ospf|isis|rip|none}] [-mpls_protocol {none|ldp|rsvp|ospf|isis}] IGP OSPF Router Generation Parameters [-igp_ospf_area_id ] [-igp_ospf_network_type {native|broadcast|p2p}] [-igp_ospf_router_priority ] [-igp_ospf_interface_cost ] [-igp_ospf_options ] [-igp_ospf_auth_mode {none|simple|md5}] [-igp_ospf_auth_password ] [-igp_ospf_auth_md5_key ] [-igp_ospf_graceful_restart_enable {true|false}] [-igp_ospf_graceful_restart_type {none|rfc_standard|ll_signalling}] [-igp_ospf_bfd_enable {true|false}] IGP ISIS Router Generation Parameters [-igp_isis_level {level1|level2|level1_and_2}] [-igp_isis_network_type {broadcast|p2p}] [-igp_isis_router_priority ] [-igp_isis_area1 ] [-igp_isis_area2 ] [-igp_isis_area3 ] [-igp_isis_circuit_id ] [-igp_isis_auth_mode {none|simple|md5}] [-igp_isis_auth_password ] [-igp_isis_auth_md5_key ] [-igp_isis_metric_mode {narrow|wide|narrow_and_wide}] [-igp_isis_l1_metric ] [-igp_isis_l1_wide_metric ] [-igp_isis_l2_metric ] [-igp_isis_l2_wide_metric ] [-igp_isis_graceful_restart_enable {true|false}] [-igp_isis_hello_padding {true|false}] [-igp_isis_bfd_enable {true|false}] MPLS RSVP-TE Router Generation Parameters [-mpls_rsvp_bandwidth_per_link {1-2147483647}] [-mpls_rsvp_bandwidth_per_tunnel {1-2147483647}] [-mpls_rsvp_egress_label {next_available|implicit_null|explicit_null }] [-mpls_rsvp_transit {accept_all|accept_configured }] [-mpls_rsvp_min_label {1-65535}] [-mpls_rsvp_max_label {1-65535}] [-mpls_rsvp_graceful_restart_enable {true|false}] [-mpls_rsvp_recover_time ] [-mpls_rsvp_restart_time ] [-mpls_rsvp_bfd_enable {true|false}] [-mpls_rsvp_request_conf {true|false}] [-mpls_rsvp_hello_enable {true|false}] [-mpls_rsvp_hello_interval ] [-mpls_rsvp_bundle_interval ] [-mpls_rsvp_summary_refresh_interval ] [-mpls_rsvp_inter_packet_delay ] [-mpls_rsvp_refresh_interval ] [-mpls_rsvp_refresh_delivery {true|false}] [-mpls_rsvp_retrans_interval ] [-mpls_rsvp_retrans_limit ] [-mpls_rsvp_retrans_delta ] MPLS LDP Router Generation Parameters

    25

  • 6PE/6VPE Functions

    [-mpls_ldp_hello_type { direct|targeted}] [-mpls_ldp_transport_mode { none|tester_ip|router_id }] [-mpls_ldp_hello_interval ] [-mpls_ldp_keepalive_interval ] [-mpls_ldp_egress_label { next_available|implicit_null|explicit_null }] [-mpls_ldp_min_label ] [-mpls_ldp_graceful_restart_enable {true|false}] [-mpls_ldp_recover_time ] [-mpls_ldp_reconnect_time ] [-mpls_ldp_bfd_enable {true|false}] [-mpls_ldp_label_adv_mode {downstream_unsolicited|downstream_on_demand}] [-mpls_ldp_auth_mode {none|md5}] [-mpls_ldp_auth_password ] MPLS OSPF-SR Router Generation Parameters [-mpls_ospf_sr_algorithms ] [-mpls_ospf_sid_base ] [-mpls_ospf_sid_range ] [-mpls_ospf_node_sid_index ] [-mpls_ospf_node_sid_index_step ] MPLS ISIS-SR Router Generation Parameters [-mpls_isis_sr_algorithm ] [-mpls_isis_sid_base ] [-mpls_isis_sid_range ] [-mpls_isis_node_sid_index ] [-mpls_isis_node_sid_index_step ] P Router Generation Parameters [-p_router_enable {true|false}] [-p_router_num_per_subif ] [-p_router_topology_type {tree|grid}] [-p_router_id_start ] [-p_router_id_step ] [-p_router_ipv4_addr ] [-p_router_ipv4_prefix_len ] PE Router Generation Parameters [-pe_router_num_per_subif ] [-pe_router_id_start ] [-pe_router_id_step ] [-vpn_6vpe_enable {true|false}] [-bgp_route_reflector_enable {true|false}] [-bgp_route_reflector_per_subif ] [-bgp_route_reflector_per_pe ] [-bgp_route_reflector_id_start ] [-bgp_route_reflector_id_step ] [-bgp_route_reflector_cluster_id ] [-bgp_route_reflector_cluster_id_step ] [-bgp_route_reflector_ids ] [-bgp_route_reflector_mode {stc_as_rr|dut_as_rr}] [-bgp_bfd_enable {true|false}] VPN Generation Parameters [-vrf_count ] [-vrf_rd_assignment {use_rt|manual}] [-vrf_route_target_start ] [-vrf_route_target_step ] [-cust_ce_vrf_assignment {round_robin|sequential}] [-cust_ce_routing_protocol {bgp|ospf|rip|isis|mixed}] [-cust_ce_bgp_percent ] [-cust_ce_rip_percent ] [-cust_ce_ospf_percent ] [-cust_ce_isis_percent ] [-cust_ce_bgp_as ] [-cust_ce_bgp_as_step_per_ce_enable {true|false}]

    26

  • 6PE/6VPE Functions

    [-cust_ce_bgp_as_step_per_ce ] [-cust_ce_bgp_as_step_per_vrf_enable {true|false}] [-cust_ce_bgp_as_step_per_vrf ] [-cust_ce_bgp_4byte_as_enable {true|false}] [-cust_ce_bgp_4byte_as ] [-cust_ce_bgp_4byte_as_step_per_ce_enable {true|false}] [-cust_ce_bgp_4byte_as_step_per_ce ] [-cust_ce_bgp_4byte_as_step_per_vrf_enable {true|false}] [-cust_ce_bgp_4byte_as_step_per_vrf ] [-cust_rd_start ] [-cust_rd_step_per_vrf_enable {true|false}] [-cust_rd_step_per_vrf ] [-cust_rd_step_per_ce_enable {true|false}] [-cust_rd_step_per_ce ] [-provider_pe_vrf_assignment {vpn_per_pe|pe_per_vpn}] [-provider_pe_vrf_count ] [-provider_pe_vrf_all_assign {true|false}] [-provider_ce_bgp_as_enable {true|false}] [-provider_ce_bgp_as ] [-provider_ce_bgp_as_step_per_ce_enable {true|false}] [-provider_ce_bgp_as_step_per_ce ] [-provider_ce_bgp_as_step_per_vrf_enable {true|false}] [-provider_ce_bgp_as_step_per_vrf ] [-provider_ce_bgp_4byte_as_enable {true|false}] [-provider_ce_bgp_4byte_as ] [-provider_ce_bgp_4byte_as_step_per_ce_enable {true|false}] [-provider_ce_bgp_4byte_as_step_per_ce ] [-provider_ce_bgp_4byte_as_step_per_vrf_enable {true|false}] [-provider_ce_bgp_4byte_as_step_per_vrf ] [-provider_rd_start ] [-provider_rd_step_per_vrf_enable {true|false}] [-provider_rd_step_per_vrf ] [-provider_rd_step_per_ce_enable {true|false}] [-provider_rd_step_per_ce ] [-cust_ipv6_vpn_route_start ] [-cust_ipv6_vpn_route_step ] [-cust_ipv6_vpn_route_prefix_len ] [-cust_ipv6_vpn_route_overlap {true|false}] [-cust_ipv6_ce_route_type {internal|external}] [-cust_route_count_per_ce {1-2147483647}] [-provider_ipv6_vpn_route_start ] [-provider_ipv6_vpn_route_step ] [-provider_ipv6_vpn_route_prefix_len ] [-provider_ipv6_vpn_route_overlap {true|false}] [-provider_route_count_per_ce {1-2147483647}] [-vrf_route_mpls_label_type {label_per_site|label_per_route}] [-vrf_route_mpls_label_start ] Traffic Generation Parameters [-traffic_flow_direction {none|fully_meshed|cust_to_core|core_to_customer|bidrectional}] [-traffic_pattern {one_to_one|one_to_many}] [-traffic_stream_group_method {aggregate|vpn }] [-traffic_use_single_stream_per_endpoint_pair {true|false}] [-traffic_load_percent_provider ] [-traffic_load_percent_cust ]

    Arguments: -handle Specifies the 6PE/6VPE network configuration handle. This argument is required for -mode delete.

    -mode Specifies the action to be performed. This argument is mandatory.

    27

  • 6PE/6VPE Functions

    Possible values are described below: create Creates a 6PE/6VPE network configuration delete Deletes the 6PE/6VPE network configuration specified by -handle

    -dut_router_id Specifies the router ID for the DUT. The value must be in IPv4 format. The default value is 10.0.0.1.

    -dut_as The Autonomous System (AS) number of the DUT. Possible values range from 1 to 65535. The default value is 1.

    -dut_4byte_as_enable Enables or disables the 4-byte AS number on the DUT. Possible values are true (enable) and false (disable). The default value is false.

    -dut_4byte_as Specifies the 4-byte AS number of the DUT, in the format of :. The integer must be less than 65535. The default value is 1:1. -use_cust_ports Determines whether to set the DUT to port connection for customer ports. Possible values are true and false. Set it to false if the test does not use customer-side ports. The default value is true. -use_provider_ports Determines whether to set the DUT to port connection for provider ports. Possible values are true and false. Set it to false if the test does not use provider-side ports. The default value is true. -igp_protocol Specifies the Interior Gateway Protocol (IGP) to be used by the DUT. Possible values are: OSPF OSPF ISIS ISIS RIP RIP NONE No IGP protocol The default value is OSPF.

    -mpls_protocol Specifies the MPLS protocol to be used by the DUT. Possible values are: NONE No MPLS protocol LDP LDP RSVP RSVP-TE OSPF OSPF SR ISIS ISIS SR The default value is LDP. -igp_ospf_area_id Specifies the IP address that indicates the customer-side area to which the emulated router belongs. The default value is 0.0.0.0. This argument is available when -igp_protocol is set to OSPF. -igp_ospf_network_type Specifies the network link type to use. Possible values are: native Use the adjacency specified by the port-type broadcast Use a Broadcast adjacency

    28

  • 6PE/6VPE Functions

    p2p Use a P2P adjacency The default value is native. This argument is available when -igp_protocol is set to OSPF.

    -igp_ospf_router_priority Specifies the router priority of the emulated router. Possible values range from 0 to 255. The default value is 0. This argument is available when -igp_protocol is set to OSPF.

    -igp_ospf_interface_cost Specifies the cost of the interface connecting the emulated router to the neighbor DUT router. Possible values range from 1 to 65535. The default value is 1. This argument is available when -igp_protocol is set to OSPF.

    -igp_ospf_options Specifies the Options field that describes the optional OSPF capabilities of the router. Possible values range from 0 to 0x7f. The values are described below: tbit Type of Service (TOS) (T,0). ebit Specifies the way AS-external-LSAs are flooded (E,1) mcbit Specifies whether IP multicast datagrams are forwarded (MC,2) npbit Specifies the handling of Type-7 LSAs (NSSA) (N/P,3) eabit Specifies the router's willingness to receive and forward External-Attributes-LSAs (EA,4) dcbit Specifies the router's handling of demand circuits (DC,5) obit Specifies the router's willingness to receive and forward Opaque LSAs as specified in RFC 2370 (O,6) unused7 This bit is not used The default for OSPFv2 is 0x02, which sets the E-bit.

    -igp_ospf_auth_mode Specifies the type of OSPFv2 authentication to be used. Possible values are: none No authentication simple Use simple authentication md5 Use MD5 authentication The default value is none. This argument is available when -igp_protocol is set to OSPF.

    -igp_ospf_auth_password Specifies the password used for OSPFv2 authentication. This argument is available when -igp_ospf_auth_mode is set to simple or md5. When you specify -igp_ospf_auth_mode simple, the value must be of 1-8 alphanumeric characters. When you specify -igp_ospf_auth_mode md5, the value must be of 1-16 alphanumeric characters. The default value is "spirent".

    -igp_ospf_auth_md5_key Specifies the MD5 key used for OSPFv2 authentication. Possible values range from 0 to 255. The default value is 1. This argument is available when -igp_ospf_auth_mode is set to md5.

    -igp_ospf_graceful_restart_enable Enables or disables graceful restart for OSPF sessions. Possible values are true (enable) and false (disable). The default value is false. This argument is available when -igp_protocol is set to OSPF.

    -igp_ospf_graceful_restart_type Specifies the type of graceful restart to be used by the OSPF session. Possible values are: none No graceful restart rfc_standard RFC3623 ll_signalling Link-Layer Signaling

    29

  • 6PE/6VPE Functions

    The default value is none.

    -igp_ospf_bfd_enable Enables or disables Bidirectional Forwarding Detection (BFD) on the OSPF interface. Possible values are true (enable) and false (disable). The default value is false. This argument is available when -igp_protocol is set to OSPF.

    -igp_isis_level Specifies the IS-IS level to be used on the customer side. It defines the type of adjacency that Spirent HLTAPI establishes with the DUT. Possible values are described below: level1 Level 1 (intra-area) level2 Level 2 (inter-area) level1_and_2 Both Level 1 and Level 2 The default value is level2. This argument is available when -igp_protocol is set to ISIS.

    -igp_isis_network_type Specifies the IS-IS network type on the customer side. Possible values are: broadcast Broadcast network p2p P2P network The default value is broadcast. This argument is available when -igp_protocol is set to ISIS.

    -igp_isis_router_priority Specifies the priority for the emulated IS-IS router. Possible values range from 0 to 127. The default value is 0. This argument is available when -igp_protocol is set to ISIS.

    -igp_isis_area1 Specifies the mandatory area address 1. You must specify at least one address. Spirent HLTAPI supports up to three addresses per emulated router. This argument is available when -igp_protocol is set to ISIS.

    -igp_isis_area2 Specifies the optional area address 2. This argument is available when -igp_protocol is set to ISIS. The default value is "".

    -igp_isis_area3 Specifies the optional area address 3. This argument is available when -igp_protocol is set to ISIS. The default value is "".

    -igp_isis_circuit_id Specifies the circuit ID for the IS-IS session. Possible values range from 0 to 255. The default value is 1. This argument is available when -igp_protocol is set to ISIS.

    -igp_isis_auth_mode Specifies the type of IS-IS authentication to be used. Possible values are: none No authentication simple Use simple authentication md5 Use the MD5 key ID The default value is none. This argument is available when -igp_protocol is set to ISIS. -igp_isis_auth_password Specifies the password used for IS-IS authentication. This argument is available when -igp_isis_auth_mode is set to simple or md5. When you specify -igp_isis_auth_mode simple, the value must be of 1-8 alphanumeric characters. When you specify

    30

  • 6PE/6VPE Functions

    -igp_isis_auth_mode md5, the value must be of 1-16 alphanumeric characters. The default value is "spirent".

    -igp_isis_auth_md5_key Specifies the MD5 key used in IS-IS authentication. Possible values range from 0 to 255. The default value is 1. This argument is available when -igp_isis_auth_mode is set to md5.

    -igp_isis_metric_mode Specifies the length of the metric field in the Link State Path (LSP) packet. This argument is available when -igp_protocol is set to ISIS. Possible values are described below: narrow Router advertises routes with a narrow (6-bit) metric wide Router advertises routes with a wide (24 or 32-bit) metric (required for IS-IS TE) narrow_and_wide Router advertises the same route with both metrics The default value is narrow_and_wide.

    -igp_isis_l1_metric Specifies the metric of the emulated router interface. It is blank and disabled if -igp_isis_level is set to level2 or if -igp_isis_metric_mode is set to wide. Possible values range from 1 to 63. The default value is 1. -igp_isis_l1_wide_metric Indicates the 3-octet metric of a link from the emulated ISIS router to the DUT. It is blank and disabled if -igp_isis_level is set to level2 or if -igp_isis_metric_mode is set to narrow. Possible values range from 0 to 16777215. The default value is 1.

    -igp_isis_l2_metric Indicates the metric of the emulated ISIS router interface. It is blank and disabled if -igp_isis_level is set to level1 or if -igp_isis_metric_mode is set to wide. Possible values range from 1 to 63. The default value is 1.

    -igp_isis_l2_wide_metric Indicates the 3-octet traffic engineering metric of a link from the emulated ISIS router to the DUT. It is blank and disabled if -igp_isis_level is set to level1 or if -igp_isis_metric_mode is set to narrow. Possible values range from 0 to 16777215. The default is 1.

    -igp_isis_graceful_restart_enable Enables or disables the IS-IS graceful restart. Possible values are false (disable) and true (enable). The default value is false.

    -igp_isis_hello_padding Enables or disables Hello padding for IS-IS sessions. Possible values are true (enable) and false (disable). The default value is true. This argument is available when you specify -igp_protocol ISIS.

    -igp_isis_bfd_enable Enables or disables BFD on IS-IS interfaces. Possible values are true (enable) and false (disable). The default value is false.

    -mpls_rsvp_bandwidth_per_link Specifies the maximum bandwidth per ISIS/OSPFv2 TE link, in bytes per second, for simulated provider router topology links. Possible values range from 1 to 2147483647. The default value is 100000. This argument is available when you specify -mpls_protocol RSVP.

    -mpls_rsvp_bandwidth_per_tunnel Specifies the RSVP-TE bandwidth rate, in bytes per second, for

    31

  • 6PE/6VPE Functions

    provider tunnels. Possible values range from 1 to 2147483647. The default value is 0. This argument is available when you specify -mpls_protocol RSVP.

    -mpls_rsvp_egress_label Specifies the label to be advertised when emulated router is at the tail-end of the tunnel. This argument is available when you specify -mpls_protocol rsvp. The values are described below: next_available Advertises the next available label implicit_null Advertises label 3, the implicit null label explicit_null Advertise label 9, the explicit null label The default value is next_available.

    -mpls_rsvp_transit Defines the RESV message sent when emulated router is not the tail-end router for PATH messages it receives. This argument is available when you specify -mpls_protocol rsvp. Possible values are described below: accept_all The router sends an RESV message with the next available label for every PATH message received by the unique MAC/VLAN combination on the port accept_configured The router sends an RESV message with the next available label in response to PATH messages that match one of its egress tunnels The default value is accept_configured. -mpls_rsvp_min_label Defines the minimum label number used by the RSVP session. Possible values range from 1 to 65535. The default value is 16. This argument is available when you specify -mpls_protocol RSVP.

    -mpls_rsvp_max_label Defines the maximum label number used by the RSVP session. Possible values range from 1 to 65535. The default value is 65535. This argument is available when you specify -mpls_protocol RSVP.

    -mpls_rsvp_graceful_restart_enable Enables or disables graceful restart for RSVP. Possible values are false (disable) and true (enable). The default value is false.

    -mpls_rsvp_recover_time Specifies the length of time (in milliseconds) that the sender wants the recipient to re-synchronize RSVP and MPLS forwarding


Recommended