LDP Functions

sth::emulation_ldp_config

Purpose

Creates, enables, disables, modifies, or deletes an emulated Label Switched Router (LSR) on a Spirent HLTAPI chassis.

LDP (Label Distribution Protocol) is a protocol that defines a set of procedures and messages by which one LSR informs another of the label bindings it has made. LDP enables LSRs to find each other and establish communication.

Synopsis

Note

  1. M indicates that the argument is Mandatory .
  2. S indicates the argument is for scaling scenarios.
sth::emulation_ldp_config
   [-mode  {create|enable|activate|disable|modify|delete|active|inactive}  M]
   [-port_handle  <port_handle> |
   [-handle <device_handle>|<lsr_handle>|<ldp_session_handle>]
   [-affiliated_router_target <router_session_handle>]
   [-adjacency_version {ipv4 | ipv6 | ipv4_and_ipv6|first}]
   [-bfd_registration {1|0}]
   [-count <integer>]
   [-directed_hello_interval <1-21845>]
   [-egress_label_mode {nextlabel | imnull | exnull}]
   [-enable_lsp_results {0 | 1}]
   [-enable_stateful_pseudowire_lsp_results {0 | 1}]
   [-expand {true|false} S]
   [-generalized_pwid_lsp_label_binding_mode  {tx_and_rx | tx_only | rx_only | none}]
   [-graceful_restart {0|1}
         [-reconnect_time <0-4294967>
         [-graceful_recovery_timer <0-4294967>]
   [-gateway_ip_addr <a.b.c.d> ]
        [-gateway_ip_addr_step <a.b.c.d> ]
   [-gateway_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-gateway_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-hello_version {ipv4 | ipv6| ipv4_and_ipv6}]
   [-hello_interval   <1-65535> ]
   [-hello_type {ldp_directed_hello|ldp_targeted_hello|ldp_directed_targeted_hello}]
   [-intf_ip_addr  <a.b.c.d> ]
        [-intf_ip_addr_step  <a.b.c.d>]
        [-intf_prefix_length <1-32> ]
   [-intf_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
       [-intf_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
       [-intf_ipv6_prefix_length <0-128>]
   [-ip_version {ipv4 | ipv6 | ipv46}]
   [-ipv6_router_id  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-ipv6_router_id_step  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-keepalive_interval <1-21845> ]
   [-label_adv   {unsolicited|on_demand} ]
   [-label_start  <0-1046400> ]
   [-label_step <integer> ]
   [-label_request_retry_count   <0-65535>]
   [-label_request_retry_interval <0-65535>]
   [-ldp_version    {version_1 | version_2}]
   [-liveness_time  <120-600>]
   [-link_local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-link_local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-link_local_ipv6_prefix_length <0-128>]
   [-lsr_id   <a.b.c.d> ]
        [-lsr_id_step <a.b.c.d>]
   [-mac_address_init <aa:bb:cc:dd:ee>]
   [-authentication_mode {none|simple|md5}]
   [-md5_key_id <1-255>]
   [-password <string>]
   [-peer_discovery   {link|targeted} ]
   [-prefix_lsp_label_binding_mode  {tx_and_rx | tx_only | rx_only | none}]
   [-pseudowire_redundancy_mode  {none | independent | master | slave}]
   [-remote_ip_addr   <a.b.c.d> ]
        [-remote_ip_addr_step <a.b.c.d>]
   [-remote_ipv6_addr  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
      [-remote_ipv6_addr_step  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
   [-transport_tlv_mode {none | tester_ip | router_id}]
   [-use_static_flow_label {0 | 1}]
   [-use_gateway_as_dut_ip_addr {true|false}]
   [-use_gateway_as_dut_ipv6_addr {true|false}]
   [-vc_lsp_label_binding_mode {tx_and_rx | tx_only | rx_only | none}]
   [-vci <0-65535>]
   [-vci_step <0-65535>]
   [-vlan_id  <0-4095> ]
        [-vlan_cfi {0|1} ]
        [-vlan_id_mode {fixed|increment} ]
        [-vlan_id_step  <1-4094> ]
        [-vlan_user_priority <0-7> ]
   [-vlan_outer_id <0-4095>]
        [-vlan_outer_id_mode {fixed|increment}]
        [-vlan_outer_id_step <1-4094>]
        [-vlan_outer_user_priority <0-7>]
   [-vpi <0-255>]
   [-vpi_step <0-255>]
   [-tunnel_handle <GRE_tunnel_handle>]
     [-loopback_ip_addr <a.b.c.d>]
     [-loopback_ip_addr_step < a.b.c.d>]

Arguments

-adjacency_version

Spirent Extension (for Spirent HLTAPI only).

Specifies the type of adjacency to create. This argument available when -hello_version is set to ipv4_and_ipv6. Possible values are:

ipv4             IPv4 adjacency
ipv6             IPv6 adjacency
ipv4_and_ipv6    Dual stack adjacency
first            First adjacency

The default value is ipv4.

-affiliated_router_target

Spirent Extension (for Spirent HLTAPI only).

Specifies the router to which the indirectly connected router will be connected. The value for the router session handle is alphanumeric. This option is used to support LDP testing with peer discovery (-peer_discovery) in targeted mode. For example, you could create an OSPF router to advertise IP routes. From this router, you could then create an indirectly connected router to run LDP:

set retKeyList [::sth::emulation_ldp_config -mode create \
             -port_handle $p0 \
             -peer_discovery targeted \
             -affiliated_router_target $ospf_router_handle\
             -count 1

The value of “mac_address_init <mac_addr>” will be ignored when you pass in a value for the -affiliated_router_target argument. Spirent HLTAPI fills in the MAC address of the indirectly connected router using the MAC address obtained from the router pointed to by the affiliated router target handle. Note that there is no support for the retrieval of the MAC address for a router in the HLTAPI framework.

-bfd_registration

Specifies to enable or disable Bidirectional Forwarding Detection (BFD) registration. Possible values are 1 (enable) and 0 (disable). The default is 0.

-count

Defines the number of sessions to create on the interface by incrementing the interface IP address (-intf_ip_addr), Label Switched Router ID (-lsr_id), and remote IP address (-remote_ip_addr). Possible values are 0 to <max_int>. The default is 1. If you specify a count greater than 1, then the -intf_ip_addr_step, -gateway_ip_addr_step, -lsr_id_step, and -remote_ip_addr_step arguments are Mandatory .

-directed_hello_interval

Spirent Extension (for Spirent HLTAPI only).

Time interval used by the peer for Direct Hello packet transmission Possible values range from 1 to 21845. The default value is 5.

-egress_label_mode

Specifies the mode for egress-targeted label assignment. Possible values are described below:

nextlabel - For each FEC, the LSR advertises the next available
           label starting from -label_start.

imnull - Implicit null is used for all LSPs. This label value is
        used in an LDP or RSVP packet to enable penultimate hop
        label popping.

exnull - Explicit null is used for all LSPs. Explicit null
        instructions are signaled to the penultimate router by
        the egress router.
-enable_lsp_results

Spirent Extension (for Spirent HLTAPI only).

Determines whether to generate LSP-level results. Possible values are 0 and 1. When it is set to 1, LSP-level results will be generated. The default value is 0.

-enable_stateful_pseudowire_lsp_results

Spirent Extension (for Spirent HLTAPI only).

Determines whether to generate stateful PW LSP-level results. Possible values are 0 and 1. When it is set to 1, stateful pseudowire LSP-level results will be generated. The default value is 0.

-expand

Spirent Extension (for Spirent HLTAPI only).

Determines whether to expand the specified LDP device parameters into emulated LDP device objects. Possible values are true and false. If it is set to true, a list of emulated LDP devices will be created and their handles returned. If it is set to false, no handles will be returned.

-generalized_pwid_lsp_label_binding_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies the generalized PW ID LSP label binding mode. Possible values are tx_and_rx, tx_only, rx_only, and none. The default value is tx_and_rx.

-hello_type

Spirent Extension (for Spirent HLTAPI only).

Type of Hello packets to be transmitted by the emulated peer. Possible values are ldp_directed_hello, ldp_targeted_hello, and ldp_directed_targeted_hello. The default value is ldp_directed_hello.

-hello_version

Spirent Extension (for Spirent HLTAPI only).

Specifies the version of Hello messages to send. This argument is available when -ip_version is set to ipv46. Possible values are ipv4, ipv6, and ipv4_and_ipv6. The default value is ipv4.

-gateway_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4 gateway address of the label switched router.

-gateway_ip_addr_step

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4 gateway address for multiple routers. This argument is used with the -gateway_ip_addr argument.

-gateway_ipv6_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv6 gateway address of the label switched router.

-gateway_ipv6_addr_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv6 gateway address for multiple routers. You must use this argument with the -gateway_ipv6_addr argument.

-graceful_recovery_timer

Specifies the amount of time, in seconds, it takes Spirent HLTAPI to recover after a graceful restart. To use this option, you must also enable -graceful restart and specify a value for the -reconnect_time argument. Possible values are 0 to 4294967. The default is 140.

-graceful_restart

Spirent Extension (for Spirent HLTAPI only).

Specifies if LDP graceful restart is enabled on the emulated router. Possible values are 1 (enable Graceful Restart) or 0 (disable Graceful Restart). The default is 0. To use -graceful_restart in LDP, you must also specify values for the -reconnect_time and -graceful_recovery_timer arguments. Example usage:

sth::emulation_ldp_config -mode create \
    -port_handle $p0 \
    -graceful_restart <0|1>
    -reconnect_time <0-4294967>
    -graceful_recovery_timer <0-4294967>
-handle

Specifies the LDP handle to use. This argument is Mandatory for the modify, delete, enable, disable, active and inactive modes. When -mode is set to create, Spirent HLTAPI creates LDP over the provided device. (Please refer to the description of the -mode argument for more information)

-hello_interval

Specifies the amount of time, in seconds, between HELLO messages. Possible values range from 1 to 65535. The default is 5.

-intf_ip_addr

Specifies the IP address of the interface for the LSR that will establish an adjacency with the DUT. The default for IPv4 is 192.85.1.3.

-intf_ip_addr_step

Defines the interface IP addresses of consecutive routers when multiple routers are created. The default is 0.0.0.0.

-intf_prefix_length

Specifies the prefix length on the emulated router. Possible values for IPv4 addresses range from 1 to 32. The default is 24.

-intf_ipv6_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv6 address of the router created.

-intf_ipv6_addr_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between interface IPv6 addresses of consecutive routers when multiple emulated routers are created.

-intf_ipv6_prefix_length

Spirent Extension (for Spirent HLTAPI only).

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

-ip_version

Spirent Extension (for Spirent HLTAPI only).

Specifies the IP version of the device to be created. Possible values are ipv4, ipv6, and ipv46. The default value is ipv4.

-ipv6_router_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv6 router ID of the emulated router. The value must be in IPv6 format.

-ipv6_router_id_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between IPv6 router IDs when multiple emulated routers are created. The value must be in IPv6 format.

-keepalive_interval

Specifies the amount of time, in seconds, between KEEPALIVE messages. Possible values range from 1 to 21845. The default is 60.

-label_adv

Specifies the label advertisement mode for the router, the mode by which the emulated router advertises its FEC ranges. Possible values are:

unsolicited - The router distributes FEC ranges whenever it
    has a new one. This is the default value.

on_demand - The router only distributes FEC ranges when
    requested by a peer.
-label_start

Specifies the starting value for the first label of the route. Possible values range from 0 to 1046400. The default is 16.

-label_step

Specifies how to increment the next label.The default is 1.

-label_request_retry_count

Spirent Extension (for Spirent HLTAPI only).

Number of times to send a label request. This argument is available when -label_adv is set to on_demand. Possible values range from 0 to 65535. The default is 0.

-label_request_retry_interval

Spirent Extension (for Spirent HLTAPI only).

Number of seconds to wait between label request attempts. This argument is available when-label_adv is set to on_demand. Possible values range from 0 to 65535. The default is 60.

-ldp_version

Spirent Extension (for Spirent HLTAPI only).

Version of LDP to use for this device block. This argument is available when -ip_version is set to ipv6, or when -ip_version is ipv46 and -hello_version is ipv6. Possible values are version_1 and version_2. The default value is version_1.

-liveness_time

Spirent Extension (for Spirent HLTAPI only).

Neighbor liveness time interval, in second. Possible values range from 120 to 600. The default is 360.

Spirent Extension (for Spirent HLTAPI only).

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

Spirent Extension (for Spirent HLTAPI only).

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

Spirent Extension (for Spirent HLTAPI only).

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

-lsr_id

Specifies the router ID of the Label Switched Router (LSR) to be emulated by the Spirent HLTAPI port. The LSR ID is a 32-bit value represented in dot notation. The default is 192.85.1.3.

-lsr_id_step

Defines the router ID of consecutive routers when multiple routers are created. You must specify a step value when the -count value is greater than 1. The default is 0.0.0.0.

-mac_address_init

Specifies the MAC address to use for the first session. When -count is greater than 1, the MAC address is automatically incremented by one on the last octet.

-mode

Specifies the action to perform. Possible values are create, enable, disable, modify, or delete. This argument is mandatory. The modes are described below: :

create
Creates one or more emulated label switched routers, and then starts all of the routers. When -port_handle is provided, Spirent HLTAPI creates one or more emulated routers that are associated with the specified port. When -handle is provided, LDP will be created over the specified device.
activate
  1. Enables LDP devices and configures LDP parameters for the devices created via the sth::interface_config or sth::emulation_device_config function. This mode requires the value of param_handle as the input to the -handle option. Use this mode for Scaling scenarios. Refer to -count and -expand options under the sth::interface_config or sth::emulation_device_config function for more information. For this mode, only the following options are valid:

    -bfd_registration
    -hello_type
    -hello_version
    -adjacency_version
    -graceful_restart
    -egress_label_mode
    -label_adv label_start
    -transport_tlv_mode
    -use_gateway_as_dut_ip_addr
    -use_gateway_as_dut_ipv6_addr
    -remote_ip_addr
    -remote_ip_addr_step
    -remote_ipv6_addr
    -remote_ipv6_addr_step
    
  1. Creates devices and enables LDP protocol. Requires -port_handle and -block_mode options. For this mode, the following options are required/supported along with the options specified above:

    -block_mode
    -block_mode_index
    -mac_addr
    -mac_addr_step
    -mac_addr_step_per_port
    -mac_addr_step_per_vlan
    -ip_step_per_port
    -ip_step_per_vlan
    -intf_ipv6_prefix_len
    -ipv6_step_per_port
    -ipv6_step_per_vlan
    -link_local_ipv6_step_per_port
    -link_local_ipv6_step_per_vlan
    -name
    -vlan_user_pri
    -vlan_id_count
    -vlan_outer_id_count
    -vlan_outer_user_pri
    -intf_prefix_len
    -router_id_ipv6
    -router_id_ipv6_step
    -router_id
    -router_id_step
    -link_local_ipv6_prefix_len
    -link_local_ipv6_addr
    -link_local_ipv6_addr_step
    -gateway_ipv6_addr
    -gateway_ipv6_addr_step
    -intf_ipv6_addr
    -intf_ipv6_addr_step
    

    Note

    Please refer to the emulation_device_config documentation.

enable
Same as “create”
disable
Same as “delete”
modify
Changes the configuration for the LSR identified by the -handle argument
delete
Deletes the LSR specified in the -handle argument
active
Enables the LDP router specified by the -handle argument. You must specify a valid LDP session handle.
inactive
Disables the LDP router specified by the -handle argument. You must specify a valid LDP session handle. The configuration for the router is retained, when it is inactive and is available as configured if the router is active.

Note

For -mode create, when -handle is provided, the following options will be obsoleted:

-count
-affiliated_router_target
-mac_address_init
-intf_ip_addr
-intf_ip_addr_step
-gateway_ip_addr
-gateway_ip_addr_step
-intf_prefix_length
-cfi
-vlan_cfi
-vlan_id
-vlan_id_mode
-vlan_id_step
-vlan_user_priority
-vlan_outer_id
-vlan_outer_id_mode
-vlan_outer_id_step
-vlan_outer_user_priority
-tunnel_handle
-vci
-vci_step
-vpi
-vpi_step
-loopback_ip_addr
-loopback_ip_addr_step
-authentication_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies the type of authentication to be used. Possible values are:

none     No authentication
simple   Use simple authentication
md5      Use the MD5 key ID for authentication
-password

Spirent Extension (for Spirent HLTAPI only).

Specifies the password when -authentication_mode is set to simple or md5. Possible values are alphanumeric characters. The length of the value ranges from 1 to 253 in simple mode, or from 1 to 16 in md5 mode. The default value is “Spirent”.

-md5_key_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the MD5 key ID to use for the MD5 authentication mode. You must specify -authentication_mode MD5. Possible values range from 1 to 255. The default is 1.

-peer_discovery

Specifies whether the emulated router sends a link or a targeted hello. Possible values are:

link - A Basic Discovery mechanism used to locate directly-
    connected neighbors. "Link" is the default.

targeted - An Extended Discovery mechanism used to locate
    neighbors not directly connected.
-port_handle

Specifies the handle of the port on which to create the label switched router (LSR). (Please refer to the description of the -mode argument for more information)

-reconnect_time

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of time, in seconds, it takes Spirent HLTAPI to reconnect after a graceful restart. To use this option, you must also enable -graceful_restart and specify a value for the -graceful_recovery_timer argument. Possible values are 0 to 4294967. The default is 60.

-prefix_lsp_label_binding_mode

Spirent Extension (for Spirent HLTAPI only).

Label binding mode for the Prefix FEC type. Possible values are tx_and_rx, tx_only, rx_only, and none. The default value is tx_and_rx.

-pseudowire_redundancy_mode

Spirent Extension (for Spirent HLTAPI only).

Pseudowire redundancy mode. Possible values are:

none            No mode specified

independent     PW endpoint nodes independently select which PW
                they intend to make active and which PWs they
                intend to make standby

master          Responsible for selecting which PW both endpoints
                must use to forward user traffic

slave            Follows the decision of the Master node based on
                the received status bits

The default value is none.

-remote_ip_addr

Specifies either the IPv4 address of the DUT interface that is connected to the Spirent HLTAPI port for the emulated LSR or the DUT router ID. The default is 192.85.1.1. This argument is available when -use_gateway_as_dut_ip_addr is set to false.

-remote_ip_addr_step

Configures either the IPv4 address of the DUT interface for multiple routers or the DUT router ID. You must specify the -remote_ip_address_step when the -count argument is greater than 1. The format of the remote_ip_addr_step value is an IP address, for example, 0.0.0.1. This argument is available when -use_gateway_as_dut_ip_addr is set to false. The default value is 0.0.0.0.

-remote_ipv6_addr

Spirent Extension (for Spirent HLTAPI only).

IPv6 address of the DUT interface. This argument is available when -use_gateway_as_dut_ipv6_addr is set to false.

-remote_ipv6_addr_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between IPv6 interface addresses of consecutive routers when multiple emulated routers are created. The value must be in IPv6 format. The default value is ::1. This argument is available when -use_gateway_as_dut_ipv6_addr is set to false.

-transport_tlv_mode

Spirent Extension (for Spirent HLTAPI only).

Transport TLV mode. Possible values are:

none        Transport Address TLV will not be included in LDP Hellos
tester_ip   Emulated router interface address
router_id   Emulated router ID

The default value is none.

-use_static_flow_label

Spirent Extension (for Spirent HLTAPI only).

Enables/disables the use of static labels. Possible values are 0 (disable) and 1 (enable). The default value is 0.

-use_gateway_as_dut_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Enables or disables using the gateway address defined on the emulated devices as the IPv4 address of the DUT. Possible values are true and false. The default value is false.

-use_gateway_as_dut_ipv6_addr

Spirent Extension (for Spirent HLTAPI only).

Enables or disables using the gateway address defined on the emulated devices as the IPv6 address of the DUT. Possible values are true and false. The default value is false.

-vc_lsp_label_binding_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies the label binding mode for the VC FEC type. Possible values are tx_and_rx, tx_only, rx_only, and none. The default value is tx_and_rx.

-vci

Specifies the VCI of the first ATM PVC pool. Possible values range from 0 to 65535.

-vci_step

Specifies the step size in which the VCI value is incremented. Possible values range from 0 to 65535.

-vlan_cfi

Sets the canonical format indicator field in VLAN for the emulated router node. Possible values are 0 (Ethernet) and 1 (Token Ring). If set to 0, it indicates the network is Ethernet. If set to 1, it indicates that Token Ring and packets are dropped by Ethernet ports.

-vlan_id

The VLAN ID of the first VLAN sub-interface. Possible values range from 0 to 4095. When the mode is either “create” or “enable”, Spirent HLTAPI checks for a VLAN object on the port with the given VLAN ID. If no VLAN object with that ID exists, Spirent HLTAPI creates a VLAN object with the specified VLAN ID.

-vlan_id_mode

If you configure more than one interface on Spirent HLTAPI with VLAN, you can choose to either automatically increment the VLAN tag (mode “increment”) or leave it idle for each interface (mode “fixed”). If you set this argument to “increment”, then you must also specify the -vlan_id_step argument to indicate the step size. The default is increment.

-vlan_id_step

The step size by which the VLAN value is incremented when you set -vlan_id_mode to “increment”. Possible values range from 1 to 4094. You must specify the step when the -count argument is greater than 1. The default is 1.

-vlan_user_priority

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

-vlan_outer_id

Spirent Extension (for Spirent HLTAPI only).

The outer VLAN ID of VLAN sub-interface. Possible values range from 0 to 4095. The default is 1. When you use -vlan_outer_id, you must specify -vlan_id.

-vlan_outer_id_mode

Spirent Extension (for Spirent HLTAPI only).

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

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

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

Spirent Extension (for Spirent HLTAPI only).

The amount by which to increment the specified outer VLAN ID (-vlan_outer_id) for subsequent packets. Possible values range from 1 to 4094. You must specify this step when you specify “increment” for the -vlan_outer_id_mode argument.

-vlan_outer_user_priority

Spirent Extension (for Spirent HLTAPI only).

Specifies the VLAN priority to assign to the outer header. Possible values range from 0 to 7. The default is 0.

-vpi

Specifies the VPI of the first ATM PVC pool (for an ATM connection). Possible values are 0 to 255.

-vpi_step

Specifies the step size in which the VPI value is incremented. Possible values are 0 to 255.

-tunnel_handle

Specifies the GRE tunnel handle, an array value, initialized by the emulation_gre_config command. The router sends traffic through this tunnel.

-loopback_ip_addr

Defines the loopback IP address. The value must be in IPv4 format.

-loopback_ip_addr_step

Specifies the step size in which the loopback IP address is incremented.The default is 0.0.1.0. The value must be in IPv4 format.

Arguments Unsupported by Save as HLTAPI

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

-loopback_ip_addr

Note

-lsr_id is supported by Save as HLTAPI and provides the same

functionality as -loopback_ip_addr.

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper

None

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper

-reset
-hello_hold_time
-keepalive_holdtime
-targeted_hello_hold_time
-vlan
-label_space
-enable_l2vpn_vc_fecs
-reset
-keepalive_interval
-hello_interval

Note

For more information about Spirent HLTAPI Wrapper, refer to Chapter 4 Spirent HLTAPI Wrapper in Spirent HLTAPI Programmer’s Reference.

Cisco-specific Arguments

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

-atm_merge_cap
-atm_range_max_vci
-atm_range_max_vpi
-atm_range_min_vci
-atm_range_min_vpi
-atm_vc_dir
-cfi
-config_seq_no
-discard_self_adv_fecs
-hello_hold_time
-keepalive_holdtime
-label_space
-label_type
-loop_detection
-max_lsps
-max_pdu_length
-max_peers
-message_aggregation
-mtu
-path_vector_limit
-timeout
-transport_ip_addr
-user_priofity

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             The handle that identifies the LDP router created by the
                   ``sth::emulation_ldp_config`` function.

handle_list        The list of emulated device handles with enabled LDP configuration
                   when expand is set true.

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

Description

The sth::emulation_ldp_config function creates, enables, disables, modifies, or deletes the specified LSR. Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.)

To create an LSR, use the create or enable modes with the sth::emulation_ldp_config function along with the -port_handle argument to specify the Spirent HLTAPI port that the emulated LSR will use. (The port handle value is contained in the keyed list returned by the connect function.)

In addition to specifying the port, you must also provide one or more of the following pieces of information when you create an LSR:

  • The port handle (-port_handle argument)
  • The IP address for the router (the -intf_ip_addr argument)
  • The IP address for the router (DUT) to communicate with (the -gateway_ip_add and -remote_ip_addr arguments)

For Spirent HLTAPI to start the router communication, use the sth::emulation_ldp_control mode “start” to start either an individual router or all emulated routers.

Two LSRs (Label Switched Routers) which use LDP to exchange label mapping information are known as LDP peers and they have an LDP session between them. In a session, each peer learns about the other’s label mappings.

LDP has four types of LDP messages: discovery (HELL0), adjacency (KEEPALIVE), label advertisement, and notification (error messages).

LSRs announce their presence in the network by sending HELLO messages at specified intervals. HELLO messages are transmitted as UDP packets. All other messages are sent over TCP.

Once you start an LDP session, Spirent HLTAPI handles all of the messages for the emulated routers. During the test, use the sth::emulation_ldp_control function to stop and re-start individual routers. To delete all of the routers associated with a particular port, use the disable or delete modes with the sth::emulation_ldp_config function. After you have created the routers for your test, use the sth::emulation_ldp_route_config function to set up routes.

Examples

#### HLTAPI for Tcl ####

The following example creates and starts an LSR on an LDP port:

sth::emulation_ldp_config \
               -mode create \
               -count 5 \
               -hello_interval 15 \
               -intf_ip_addr 192.168.1.11 \
               -intf_ip_addr_step 0.0.1.0 \
               -intf_prefix_length 24 \
               -keepalive_interval 70 \
               -label_adv on_demand\
               -label_start 7 \
               -label_step 7 \
               -lsr_id 12.1.1.1 \
               -lsr_id_step 0.0.0.1 \
               -peer_discovery link \
               -port_handle $port_handle1 \
               -gateway_ip_addr 192.168.1.1 \
               -gateway_ip_addr_step 0.0.1.0 \
               -remote_ip_addr 1.1.1.4 \
               -remote_ip_addr_step 0.0.0.0 \
               -vlan_cfi 0 \
               -vlan_id 7 \
               -vlan_id_mode increment \
               -vlan_id_step 7 \
               -vlan_user_priority 7

Sample Output:

{handle router1} {handles router1} {status 1}

To modify the created LDP router:

sth::emulation_ldp_config -handle $ldpRouterHandle \
                        -hello_interval 5 \
                        -mode modify

Sample Output:

{handle router1} {handles router1} {status 1}

To delete the created LDP router:

sth::emulation_ldp_config -handle $ldpRouterHandle \
                    -mode delete

Sample Output:

{status 1}

The following example enables LDP over a provided device:

puts "Config IS-IS-------------------"
set routerStatus  [sth::emulation_isis_config \
                     -port_handle            $port\
                     -mode                   create  \
                     -ip_version             4 \
                     -area_id                000000000001 \
                     -count                  1 \
                     -hello_interval         11 \
                     -holding_time           40 \
                      -intf_ip_addr           13.25.0.2\
                     -intf_ip_prefix_length  16 \
                     -intf_metric            10 \
                     -bfd_registration       1\
                      -gateway_ip_addr        13.25.0.1 \
                     -vlan_id                100 \
                     -vlan_outer_id          200 \
                     ]
puts "IS-IS: $routerStatus"
keylget routerStatus handle router

puts "Config LDP--------------------"
set routerStatus [sth::emulation_ldp_config -mode create \
                     -handle                      $router\
                     -graceful_recovery_timer     55 \
                     -egress_label_mode           exnull \
                     -label_adv                   on_demand \
                     -bfd_registration       1 \
                               ]
puts "LDP: $routerStatus"

Sample output for example shown above:

Config IS-IS--------------------
IS-IS: {handle router1} {handles router1} {session_router isislspconfig1}
       {status 1}
Config LDP--------------------
LDP: {handle router1} {handles router1} {status 1}

Sample input for the Scaling mode(activate) with -handle:

 set hnd [keylget int_ret0 param_handle]
 # param_handle returned from sth::interface_config
 puts "Param List: $int_ret0"
set ldp_ret [sth::emulation_ldp_config \
             -mode                            activate\
             -handle                          $int_ret0 \
             -egress_label_mode               exnull \
             -use_gateway_as_dut_ip_addr      true \
             -bfd_registration                1 \
             -adjacency_version               ipv4\
             -hello_type                      ldp_directed_hello\
             -authentication_mode             none\
             -label_adv                       on_demand\
             -hello_version                   ipv4\
             -label_start                     1\
             -expand                          true\

Sample Output:

{handle {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4
emulateddevice5}} {handles {emulateddevice1 emulateddevice2 emulateddevice3
emulateddevice4 emulateddevice5}} {handle_list {emulateddevice1 emulateddevice2
emulateddevice3 emulateddevice4 emulateddevice5}} {status 1}

Sample input for the Scaling mode(activate) with -port_handle and -block_mode:

set ldp_ret [sth::emulation_ldp_config \
             -mode                            activate\
             -port_handle                     $port1 \
             -block_mode                      ONE_DEVICE_PER_BLOCK\
             -block_name_index                1\
             -count                           5\
             -intf_ip_addr                    192.85.1.2 \
             -egress_label_mode               exnull \
             -use_gateway_as_dut_ip_addr      true \
             -bfd_registration                1 \
             -adjacency_version               ipv4\
             -hello_type                      ldp_directed_hello\
             -authentication_mode             none\
             -label_adv                       on_demand\
             -hello_version                   ipv4\
             -label_start                     1\
             -expand                          true\

Sample Output:

{param_handle emulateddevicegenparams1} {status 1} {handle_list
{emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4
emulateddevice5}} {handle {emulateddevice1 emulateddevice2
emulateddevice3 emulateddevice4 emulateddevice5}} {handles
{emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4
emulateddevice5}}

#### HLTAPI for Python ####

The following example creates and starts an LSR on an LDP port:

device_ret0 = sth.emulation_ldp_config (
             mode                = 'create',
             vlan_id_mode        = 'increment',
             port_handle         = port_handle[0],
             vlan_user_priority  = '7',
             vlan_cfi            = '0',
             vlan_id             = '7',
             vlan_id_step        = '7',
             lsr_id              = '12.1.1.1',
             mac_address_init    = '00:10:94:00:00:04',
             intf_ip_addr        = '192.168.1.11',
             gateway_ip_addr     = '192.168.1.1',
             intf_prefix_length  = '24',
             hello_interval      = '15',
             label_adv           = 'on_demand',
             keepalive_interval  = '70',
             peer_discovery      = 'link',
             label_start         = '7',
             recovery_time       = '140',
             remote_ip_addr      = '1.1.1.4',
             reconnect_time      = '60',
             egress_label_mode   = 'nextlabel',
             graceful_restart    = '0',
             graceful_recovery_timer= '140');

Sample Output:

{'status': '1', 'handles': 'router1', 'handle': 'router1'}

#### HLTAPI for Perl ####

The following example creates and starts an LSR on an LDP port:

my %device_ret0 = sth::emulation_ldp_config (
             mode                => 'create',
             vlan_id_mode        => 'increment',
             port_handle         => "$hport[1]",
             vlan_user_priority  => '7',
             vlan_cfi            => '0',
             vlan_id             => '7',
             vlan_id_step        => '7',
             lsr_id              => '12.1.1.1',
             mac_address_init    => '00:10:94:00:00:04',
             intf_ip_addr        => '192.168.1.11',
             gateway_ip_addr     => '192.168.1.1',
             intf_prefix_length  => '24',
             hello_interval      => '15',
             label_adv           => 'on_demand',
             keepalive_interval  => '70',
             peer_discovery      => 'link',
             label_start         => '7',
             recovery_time       => '140',
             remote_ip_addr      => '1.1.1.4',
             reconnect_time      => '60',
             egress_label_mode   => 'nextlabel',
             graceful_restart    => '0',
             graceful_recovery_timer=> '140');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';
$VAR3 = 'handles';
$VAR4 = 'router1';
$VAR5 = 'handle';
$VAR6 = 'router1';

End of Procedure Header

sth::emulation_ldp_control

Purpose

Starts, stops, or restarts an LSR

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ldp_control
     [-handle <LDP_session_handle_list>  M]
     [-mode {stop|start|restart}  M]
     [-port_handle <port_handle_list> ]

Arguments

-handle

Identifies a list of router handles, returned from the emulation_ldp_config function when creating an LSR. This argument is Mandatory . The router handle value is alphanumeric.

-port_handle

Identifies a list of ports on which to stop, start, or restart the routers.

-mode

Specifies the action to be taken. Possible values are stop, start, or restart the LSR, This argument is Mandatory . The modes are described below:

stop - Stops the router with the specified handle.

start - Starts the router with the specified handle.

restart - Stops the router with the specified handle
        and then starts it again. If graceful restart is
        enabled (sth::emulation_ldp_config -graceful_restart 1),
        the restart mode restarts the router without stopping
        the router first.

Cisco-specific Arguments

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

-advertise
-flap_count
-flap_down_time
-flap_interval_time
-flap_router
-withdraw

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_ldp_control function controls the starting and stopping of LSRs as well as deleting them.

Examples

#### HLTAPI for Tcl ####

To start an LSR:

sth::emulation_ldp_control -mode start -handle $ldpRouterHandle

To stop an LSR:

sth::emulation_ldp_control -mode stop -handle $ldpRouterHandle

To restart an LSR:

sth::emulation_ldp_control -mode restart -handle $ldpRouterHandle

Sample Output:

{status 1}

#### HLTAPI for Python ####

To start an LSR:

ctrl_ret1 = sth.emulation_ldp_control (
             handle              = device_list,
             mode                = 'start');

Sample Output:

{'status': '1'}

#### HLTAPI for Perl #### To start an LSR:

my %ctrl_ret1 = sth::emulation_ldp_control (
             handle              => "$device_list",
             mode                => 'start');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';

End of Procedure Header

sth::emulation_ldp_info

Purpose

Returns information about the LDP session.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ldp_info
  [-handle <ldp_handle>  M]
  [-mode   {state|stats|settings|lsp_labels}  M]

Arguments

-handle

The handle of the LDP session for which you want information.

-mode

Specifies the kind of information you want to see. Possible values are state, stats, settings, and lsp_labels. You must specify a mode; there is no default.

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):

state
           Returns the state of an LSR and a summary of LSPs
           configured on each LSR (see list below). This is a
           Spirent-added key.

stats
           Retrieves the IP address of the specified port and the
           number of messages transmitted and received (see list
           below).

settings
           Retrieves the IP address of the specified port and the
           configuration settings for the LDP session (see list
           below).

lsp_labels
           Retrieves the list of LSP labels, information about
           them, and their FEC type (see list below).

status
           Retrieves a value indicating the success (1) or failure
           (0) of the operation.

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

The following keys are returned when you specify -mode state:

session_state
               State of the LDP router::

               LDP_SESSION_STATE_NO_ STATE ------ >nonexist
               LDP_SESSION_STATE_DOWN  -----> init
               LDP_SESSION_STATE_UP -----> operational
               LDP_SESSION_STATE_FAILED -----> disabled
               LDP_SESSION_STATE_OPEN ------> opensent
               LDP_SESSION_STATE_CONNECT -----> openrec

num_incoming_ingress_lsps
               Specifies number of opened ingress LSPs.

num_incoming_egress_lsps
               Specifies number of opened egress LSPs.

lsp_pool_handle
               Specifies LSP handles.

type
               Type of LSP: egress or ingress.

num_opened_lsps
               Specifies number of opened LSPs.

The following keys are returned when you specify -mode stats:

routing_protocol    Not supported in Spirent HLTAPI.

elapsed_time        Time in seconds measured when the router
                    session is started until the time the
                    statistics are retrieved or when the router
                    session has stopped.

ip_address          IP address of the port on the interface card.

linked_hellos_tx    Number of direct HELLO messages sent.

linked_hellos_RX    Number of direct HELLO messages received.

targeted_hellos_tx  Number of targeted HELLO messages sent.

targeted_hellos_RX  Number of targeted HELLO messages received.

total_setup_time    Not supported in Spirent HLTAPI.

min_setup_time      Not supported in Spirent HLTAPI.

max_setup_time      Not supported in Spirent HLTAPI.

num_lsps_setup      Number of LSPs configured on the LDP session.

req_rx              Number of label requests received.

req_tx              Number of label requests sent.

map_rx              Number of label mappings sent.

map_tx              Number of label mappings received.

release_rx          Number of label release received.

release_tx          Number of label release sent.

withdraw_rx         Number of label withdraws received.

withdraw_tx         Number of label withdraws sent.

abort_rx            Number of label aborts received.

abort_tx            Number of label aborts sent.

notif_rx            Number of notifications received.

notif_tx            Number of notifications sent.

The following keys are returned when you specify -mode settings:

intf_ip_address
                    IP address of the port on the interface card::
                    a.b.c.d.

label_type
                    Not supported in Spirent HLTAPI.

transport_address
                    Not supported in Spirent HLTAPI.

targeted_hello
                    Not supported in Spirent HLTAPI.

label_adv
                    Specified type of label advertisement.
                    Spirent HLTAPI always runs in unsolicited mode

loop_detection
                    Not supported in Spirent HLTAPI.

hello_hold_time
                    Not supported in Spirent HLTAPI.

hello_interval
                    Number of seconds between HELLO messages.

keepalive_interval
                    Number of seconds between KEEPALIVE messages.

keepalive_holdtime
                    Not supported in Spirent HLTAPI.

path_vector_limit
                    Not supported in Spirent HLTAPI.

max_pdu_length
                    Not supported in Spirent HLTAPI.

label_space
                    Not supported in Spirent HLTAPI.

vpi
                    Not supported in Spirent HLTAPI.
vci
                    Not supported in Spirent HLTAPI.

vc_direction
                    Not supported in Spirent HLTAPI.

atm_merge_capability
                    Not supported in Spirent HLTAPI.

fr_merge_capability
                    Not supported in Spirent HLTAPI.

atm_range_min_vci
                    Not supported in Spirent HLTAPI.

atm_range_max_vci
                    Not supported in Spirent HLTAPI.

atm_range_min_vpi
                    Not supported in Spirent HLTAPI.

atm_range_max_vpi
                    Not supported in Spirent HLTAPI.

The following keys are returned when you specify -mode lsp_labels:

source
                    The list of LSP pool handles.

fec_type
                    The list of FEC types belonging to each source.
                    (The FEC type specified in the -fec_type
                    argument for the sth::emulation_ldp_route_config
                    function.)

prefix
                    The list of prefixes belonging to each source.

prefix_length
                    The list of prefix lengths belonging to each
                    source.

label
                    The list of MPLS labels belonging to each source.

Description

The sth::emulation_ldp_info function provides information about either the state of the LDP session, the settings specified for the LDP configuration, the statistics returned by it, or the list of LSP labels.

This function returns the requested data 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. (See Return Values for a description of each key.)

Examples

#### HLTAPI for Tcl ####

To get results for -mode stats:

sth::emulation_ldp_info  \
           -mode stats  \
           -handle $ldpSessionHnd

Sample Output:

{ip_address 41.1.0.2} {abort_rx 0.000000} {map_tx 5.000000} {abort_tx
0.000000}
{withdraw_rx 0.000000} {withdraw_tx 0.000000} {linked_hellos_rx
27.000000}
{targeted_hellos_rx 0.000000} {linked_hellos_tx 24.000000} {notif_rx
0.000000}
{targeted_hellos_tx 0.000000} {req_rx 0.000000} {release_rx 0.000000}
{notif_tx 0.000000} {req_tx 0.000000} {release_tx 0.000000} {map_rx
1774.000000} {elapsed_time 123.418951035} {num_lsps_setup 5} {status
1}

To get results for -mode state:

sth::emulation_ldp_info -mode state  -handle $ldpSessionHnd

Sample Output:

{type egress} {session_state operational} {lsp_pool_handle
ipv4prefixlsp1} {num_incoming_ingress_lsps 0.000000} {num_opened_lsps
5.000000} {num_incoming_egress_lsps 5.000000} {status 1}

To get results for -mode lsp_labels:

sth::emulation_ldp_info -mode lsp_labels -handle $ldpSessionHnd

Sample Output:

{source {ldplspresults1 ldplspresults2 ldplspresults3 ldplspresults4
ldplspresults5}} {label {50 51 52 53 54}} {prefix_length {24 24 24 24
24}}  {prefix {10.0.0.0 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0}}
{fec_type {ipv4_prefix ipv4_prefix ipv4_prefix ipv4_prefix
ipv4_prefix}} {status 1}

#### HLTAPI for Python ####

Sample Input:

results_ret1 = sth.emulation_ldp_info (
             handle              = device,
             mode                = 'state');
Sample Output::
{‘status’: ‘1’, ‘session_state’: ‘nonexist’, ‘num_opened_lsps’: ‘0’, ‘lsp_pool_handle’: ‘ipv4prefixlsp1’, ‘num_incoming_egress_lsps’: ‘0’, ‘num_incoming_ingress_lsps’: ‘0’, ‘type’: ‘’}

#### HLTAPI for Perl ####

Sample Input:

my %results_ret1 = sth::emulation_ldp_info (
             handle              => "$device",
             mode                => 'state');

Sample Output:

$VAR1 = 'num_incoming_ingress_lsps';
$VAR2 = '0';
$VAR3 = 'status';
$VAR4 = '1';
$VAR5 = 'type';
$VAR6 = '';
$VAR7 = 'lsp_pool_handle';
$VAR8 = 'ipv4prefixlsp1';
$VAR9 = 'num_opened_lsps';
$VAR10 = '0';
$VAR11 = 'num_incoming_egress_lsps';
$VAR12 = '0';
$VAR13 = 'session_state';
$VAR14 = 'nonexist';

End of Procedure Header

sth::emulation_ldp_route_config

Purpose

Creates, modifies, or deletes Link State Path (LSP) pools or Forwarding Equivalent Class (FEC) ranges on an emulated Label Switched Router (LSR) on a Spirent HLTAPI chassis.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ldp_route_config
    [-mode {create|modify|delete}  M]
    [-handle <ldp_handle_list>]
    [-lsp_handle <lsp_handle>]
    [-address_family <ipv4>]
    [-custom_opaque_value <0-65535>]
    [-custom_opaque_type <1-255>]
    [-enable_extended_type {true|false}]
    [-extended_opaque_type <0-65535>]
    [-lsp_type {ipv4_egress|ipv4_ingress|ipv6_egress|ipv6_ingress|pwid|
                generalized_pwid|p2mp}]
    [-num_lsps <integer>]
    [-num_routes <integer>]
    [-fec_host_addr <a.b.c.d>
    [-fec_host_step <integer>
    [-fec_host_prefix_length <1-32>]
    [-fec_type  {prefix|host_addr|vc}]
    [-fec_ip_prefix_length <1-128>]
    [-fec_ip_prefix_start <a.b.c.d>]
    [-fec_ip_prefix_step <integer>]
    [-fec_ip_prefix_device_step <integer>]
    [-fec_vc_cbit {0|1}]
    [-fec_vc_count <integer>]
    [-fec_vc_group_id <0-0xFFFFFFFFF>]
    [-fec_vc_id_start <0-0xFFFFFFFFF>]
    [-fec_vc_id_step <0-0xFFFFFFFFF>]
    [-fec_vc_intf_mtu  <0-65535>]
    [-fec_vc_type {none|fr_dlci|eth_vlan|eth|hdlc|ppp|cem|eth_vpls}]
    [-fec_vc_id_count <1-65535>]
    [-fec_vc_bfd_msg_format {bfd_cc|bfd_cv}]
    [-fec_vc_bfd_my_dis <0-4294967295>]
    [-fec_vc_ctrl_pre    {not_preferred|preferred}]
    [-fec_vc_custom_status_en {true|false}]
    [-fec_vc_custom_status  <integer>]
    [-fec_vc_dst_ipv4_addr <a.b.c.d>]
    [-fec_vc_bfd_enable  {true|false}]
    [-fec_vc_gal_enable {true|false}]
    [-fec_vc_label_sub_tlv_en {true|false}]
    [-fec_vc_label_sub_tlv {0|1|2|3}
    [-fec_vc_if_des <ANY>]
    [-fec_vc_status_tlv_en {true|false}]
    [-fec_vc_redundant_set_role  {none|primary_pseudowire|secondary_pseudowire}]
    [-fec_vc_req_vlan_id  <0-4095>]
    [-fec_vc_req_vlan_id_incr  <0-4095>]
    [-fec_vc_signal_req_switchover_status_bit {true|false}]
    [-fec_vc_vccv_connectivity_verification {0|icmp_ping|lsp_ping|
                    bfd_ip_udp_pw_fault_detection_only|
                    bfd_ip_udp_pw_fault_detection_with_status_signaling|
                    bfd_pw_ach_pw_fault_detection_only|
                    bfd_pw_ach_pw_fault_detection_with_status_signaling}]
    [-fec_vc_vccv_ctrl_channel {0|mpls_pw_label_with_ttl|mpls_router_alert_label|
                    pwe3_control_word_with_0001b_as_first_nibble}]
    [-fec_vc_count <integer>]
    [-fec_vc_mac_start <aa:bb:cc:dd:ee:ff>]
    [-fec_gen_pwid_attachment_group_id <integer::integer>]
    [-fec_gen_pwid_attachment_group_id_incr <integer::integer>]
    [-fec_gen_pwid_target_individual_id <a.b.c.d>]
    [-fec_gen_pwid_target_individual_id_incr <a.b.c.d>]
    [-fec_gen_pwid_src_individual_id <a.b.c.d>]
    [-fec_gen_pwid_src_individual_id_incr <a.b.c.d>]
    [-fec_gen_pwid_ctrl_pre   {not_preferred|preferred}]
    [-fec_gen_pwid_type {none|fr_dlci|eth_vlan|eth|hdlc|ppp|cem|eth_vpls}]
    [-fec_gen_pwid_group_id <0-0xFFFFFFFFF>]
    [-fec_gen_pwid_intf_mtu  <0-65535>]
    [-fec_gen_pwid_id_count  <0-5000000>]
    [-fec_gen_pwid_bfd_my_dis <0-4294967295.>]
    [-fec_gen_pwid_custom_status_en  {true|false}]
    [-fec_gen_pwid_custom_status  <integer>]
    [-fec_gen_pwid_dst_ipv4_addr <a.b.c.d>]
    [-fec_gen_pwid_bfd_enable {true|false}]
    [-fec_gen_pwid_bfd_msg_format {bfd_cc|bfd_cv}]
    [-fec_gen_pwid_gal_enable {true|false}]
    [-fec_gen_pwid_label_sub_tlv_en {true|false}]
    [-fec_gen_pwid_label_sub_tlv {0|1|2|3}]
    [-fec_gen_pwid_if_des <ANY>]
    [-fec_gen_pwid_status_tlv_en  {true|false}]
    [-fec_gen_pwid_redundant_set_role {none|primary_pseudowire|secondary_pseudowire}]
    [-fec_gen_pwid_req_vlan_id <0-4095 >]
    [-fec_gen_pwid_req_vlan_id_incr <0-4095>]
    [-fec_gen_pwid_signal_req_switchover_status_bit  {true|false}]
    [-fec_gen_pwid_vccv_connectivity_verification {0 icmp_ping|lsp_ping|
                        bfd_ip_udp_pw_fault_detection_only|
                        bfd_ip_udp_pw_fault_detection_with_status_signaling|
                        bfd_pw_ach_pw_fault_detection_only|
                        bfd_pw_ach_pw_fault_detection_with_status_signaling}]
    [-fec_gen_pwid_vccv_ctrl_channel {0|mpls_pw_label_with_ttl|mpls_router_alert_label|
                        pwe3_control_word_with_0001b_as_first_nibble}]
    [-fec_gen_pwid_pw_count  <0-5000000>]
    [-global_id_reserved <0-15>]
    [-global_id_table_id <0-16383>]
    [-global_id_tree_id <NUMERIC>]
    [-multicast_group_handle <multicast group handle>]
    [-opaque_type_selector {type3_s_g|type250_s_g_rd|custom}]
    [-source_address <a.b.c.d>]
    [-root_node_address <a.b.c.d>]
    [-route_distinguisher <AS:Number>]

Arguments

-fec_host_addr

The first host address to be advertised. You must specify “-fec_type host_addr” with this argument. The default is 192.0.1.0.

-fec_host_step

The amount by which the host address to be advertised should be increased. The default is 1. You must specify -fec_type host_addr with this argument. When -num_lsps is greater than 1, you must also specify this argument.

-fec_host_prefix_length

Defines the prefix length for the host address to be advertised. Possible values range from 1 to 32. The default value is 24. You must specify “-fec_type host_addr” with this argument.

-fec_type

Spirent Extension (for Spirent HLTAPI only).

The type of FEC element to use. Possible values are:

prefix          Configure FECs to be advertised by the
                emulated LSR

host_addr       Configure FECs to be advertised by a single host

vc              VC ID with a label assigned to it

The default value is prefix.

-fec_ip_prefix_length

Spirent Extension (for Spirent HLTAPI only).

The prefix length for the IPv4-prefix or IPv6-prefix FEC range to be advertised. This argument is available when -lsp_type is set to ipv4_egress, ipv4_ingress, ipv6_egress, or ipv6_ingress. Possible values range from 1 to 128.

-fec_ip_prefix_start

Spirent Extension (for Spirent HLTAPI only).

The first prefix to be advertised in the IPv4-prefix and IPv6-prefix FEC range. This argument is available when -lsp_type is set to ipv4_egress, ipv4_ingress, ipv6_egress, or ipv6_ingress. The value must be in IPv4 format.

-fec_ip_prefix_step

Spirent Extension (for Spirent HLTAPI only).

The amount by which the prefix to be advertised should be increased. This argument is available when -lsp_type is set to ipv4_egress, ipv4_ingress, ipv6_egress, or ipv6_ingress.

-fec_ip_prefix_device_step

Spirent Extension (for Spirent HLTAPI only).

The amount by which the prefix to be advertised should be increased across devices. This argument is available when -lsp_type is set to ipv4_egress, ipv4_ingress, ipv6_egress, or ipv6_ingress. The default value is 1.

The following group of arguments configure VC LSPs. You must specify -lsp_type pwid.

-fec_vc_cbit

Enables the generation of a control bit in the VC. Possible values are 0 (disable) and 1 (enable). The default is 0 (disabled). You must specify -fec_type vc with this argument.

-fec_vc_group_id

Spirent Extension (for Spirent HLTAPI only).

The group ID associated with all VC FEC elements for this interface. Possible values range from 0 to 0xFFFFFFFFF. The default is 0.

-fec_vc_id_start

The virtual circuit ID, together with the value of the fec_vc_type option, identifies a unique VC. Possible values range from 0 to 0xFFFFFFFFF. The default is 1.

-fec_vc_id_step

The step value applied between uses of VC ID. Possible values range from 0 to 0xFFFFFFFFF. The default value is 1.

-fec_vc_intf_mtu

The size of the interface MTU, in bytes, for the VC. Possible values range from 0 to 65535. The default value is 1500.

-fec_vc_type

The type of virtual circuit to be used. Possible values are:

Value            Description
none           Do not use a virtual circuit
fr_dlci        Frame Relay Data Link Connection Identifier (DLCI)
eth_vlan       Ethernet VLAN
eth            Ethernet
hdlc           High-Level Data Link Control (HDLC)
ppp            PPP
cem            CEM
eth_vpls       Ethernet VPLS

The Default value is eth_vlan.

-fec_vc_id_count

Specifies the number of VC IDs to be configured. Possible values range from 1 to 65535. The default value is 0.

-fec_vc_bfd_msg_format

Spirent Extension (for Spirent HLTAPI only).

Specifies the BFD message format. This argument is available when -fec_vc_bfd_enable is set to true. Possible values are:

bfd_cc           BFD Control Channel (CC) message format
bfd_cv           BFD Connection Verification (CV) message format

The default value is bfd_cc.

-fec_vc_bfd_my_dis

Spirent Extension (for Spirent HLTAPI only).

Specifies the beginning discriminator value for the BFD. This argument is available when -fec_vc_bfd_enable is set to true. Possible values range from 0 to 4294967295. The default value is 1.

-fec_vc_ctrl_pre

Spirent Extension (for Spirent HLTAPI only).

Specifies the control word preference (C bit) in the FEC TLV. Possible values are not_preferred and preferred. The default value is not_preferred.

-fec_vc_custom_status_en

Spirent Extension (for Spirent HLTAPI only).

Enables/disables custom status code. Possible values are true (enable) and false (disable). The default value is false.

-fec_vc_custom_status

Spirent Extension (for Spirent HLTAPI only).

Custom status code. This argument is available when -fec_vc_custom_status_en is set to true. The default value is 0.

-fec_vc_dst_ipv4_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the destination IPv4 address. This argument is available when -fec_vc_bfd_enable is set to true. The default value is 127.0.0.1.

-fec_vc_bfd_enable

Spirent Extension (for Spirent HLTAPI only).

Enables/disables BFD for the VC LSP. Possible values are true (enable) and false (disable). The default value is false.

-fec_vc_gal_enable

Spirent Extension (for Spirent HLTAPI only).

Enables/disables Generic Associated Label (GAL) for the VC LSP. Possible values are true (enable) and false (disable). The default value is false.

-fec_vc_label_sub_tlv_en

Spirent Extension (for Spirent HLTAPI only).

Determines whether to include the flow label sub-TLV. Possible values are true and false. If it is set to true, flow label sub-TLV will be included in the PDU. The default value is false.

-fec_vc_label_sub_tlv

Spirent Extension (for Spirent HLTAPI only).

Specifies the flags for the flow label sub-TLV. This argument is available when -fec_vc_label_sub_tlv_en is set to true. Possible values are:

Value Description 0 none 1 Tbit 2 RBit 3 Tbit.RBit

The default value is 0.

-fec_vc_if_des

Spirent Extension (for Spirent HLTAPI only).

User-defined interface description

-fec_vc_status_tlv_en

Spirent Extension (for Spirent HLTAPI only).

Specifies whether to include or exclude the pseudowire status TLV. Possible values are true (include) and false (exclude). The default value is false.

-fec_vc_redundant_set_role

Spirent Extension (for Spirent HLTAPI only).

Specifies the backup role that the LSP plays. Possible values are:

none No role set primary_pseudowire Primary pseudowire secondary_pseudowire Secondary pseudowire

The default value is none.

-fec_vc_req_vlan_id

Spirent Extension (for Spirent HLTAPI only).

ID of the first requested VLAN. Possible values range from 0 to 4095.

-fec_vc_req_vlan_id_incr

Spirent Extension (for Spirent HLTAPI only).

Step value for additional VLAN IDs. Possible values range from 0 to 4095.

-fec_vc_signal_req_switchover_status_bit

Spirent Extension (for Spirent HLTAPI only).

Specifies the value for the Signal Request Switchover Status bit. Possible values are true and false. The default value is false.

-fec_vc_vccv_connectivity_verification

Spirent Extension (for Spirent HLTAPI only).

Control verification type of Virtual Circuit Connectivity Verification (VCCV) as specified in RFC 5085. Possible values are listed below:

0
icmp_ping
lsp_ping
bfd_ip_udp_pw_fault_detection_only
bfd_ip_udp_pw_fault_detection_with_status_signaling
bfd_pw_ach_pw_fault_detection_only
bfd_pw_ach_pw_fault_detection_with_status_signaling

Value 0 indicates no type is specified. The default is 0.

-fec_vc_vccv_ctrl_channel

Spirent Extension (for Spirent HLTAPI only).

Control channel type of VCCV as specified in RFC 5085. Possible values are listed below:

0
mpls_pw_label_with_ttl
mpls_router_alert_label
pwe3_control_word_with_0001b_as_first_nibble

Value 0 indicates no type is specified. The default is 0.

-fec_vc_count

Specifies the number of pseudowires to be configured on each LDP VC range.

-fec_vc_mac_start

Specifies the first MAC address. The default value is 00:00:00:00:00:00.

The following group of arguments configure Generalized PWid LSPs. You must specify -lsp_type generalized_pwid.

-fec_gen_pwid_attachment_group_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the starting value for the attachment group identifier field of the generalized PWid FEC (FEC 129). The value must be in the format of integer::integer. The default value is 100::1.

-fec_gen_pwid_attachment_group_id_incr

Spirent Extension (for Spirent HLTAPI only).

Increment value for the attachment group identifier field. The value must be in the format of integer::integer. The default value is 0::1.

-fec_gen_pwid_target_individual_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the starting value for the target attachment individual identifier (TAII) field of the generalized PWid FEC (FEC 129). The value must be in IPv4 format. The default value is 192.0.0.1.

-fec_gen_pwid_target_individual_id_incr

Spirent Extension (for Spirent HLTAPI only).

Increment value for the TAAI field. The value must be in IPv4 format. The default value is 0.0.0.1.

-fec_gen_pwid_src_individual_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the starting value for the source attachment individual identifier (SAII) field of the generalized PWid FEC (FEC 129). The value must be in IPv4 format. The default value is 192.0.0.1.

-fec_gen_pwid_src_individual_id_incr

Spirent Extension (for Spirent HLTAPI only).

Increment value for the SAAI field. The value must be in IPv4 format. The default value is 0.0.0.1.

-fec_gen_pwid_ctrl_pre

Spirent Extension (for Spirent HLTAPI only).

Specifies the control word preference (C bit) in the FEC TLV. Possible values are not_preferred and preferred. The default value is not_preferred.

-fec_gen_pwid_type

Spirent Extension (for Spirent HLTAPI only).

The type of virtual circuit used. Possible values are:

Value          Description
none            Do not use a virtual circuit
fr_dlci         Frame Relay DLCI
eth_vlan        Ethernet VLAN
eth             Ethernet
hdlc            HDLC
ppp             PPP
cem             CEM
eth_vpls        Ethernet VPLS

The default value is eth_vlan.

-fec_gen_pwid_group_id

Spirent Extension (for Spirent HLTAPI only).

Pseudowire group ID of the generalized PWid FEC (FEC 129). Possible values range from 0 to 0xFFFFFFFFF. The default is 0.

-fec_gen_pwid_intf_mtu

Spirent Extension (for Spirent HLTAPI only).

The size of the interface MTU, in bytes. Possible values range from 0 to 65535. The default value is 1500.

-fec_gen_pwid_id_count

Spirent Extension (for Spirent HLTAPI only).

Number of generalized PWid (FEC 129) PWs to advertise. Possible values range from 0 to 5000000. The default value is 1.

-fec_gen_pwid_bfd_my_dis

Spirent Extension (for Spirent HLTAPI only).

Specifies the beginning discriminator value. Possible values range from 0 to 4294967295. The default value is 1.

-fec_gen_pwid_custom_status_en

Spirent Extension (for Spirent HLTAPI only).

Enables/disables custom status code. This argument is available when -fec_gen_pwid_status_tlv_en is set to true. Possible values are true (enable) and false (disable). The default value is false.

-fec_gen_pwid_custom_status

Spirent Extension (for Spirent HLTAPI only).

Specifies the status code. This argument is available when -fec_gen_pwid_custom_status_en is set to true.

-fec_gen_pwid_dst_ipv4_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the destination IPv4 address. This argument is available when -fec_gen_pwid_bfd_enable is set to true. The default value is 127.0.0.1.

-fec_gen_pwid_bfd_enable

Spirent Extension (for Spirent HLTAPI only).

Enables/disables BFD for the Generalized PWid LSP. Possible values are true (enable) and false (disable). The default value is false.

-fec_gen_pwid_bfd_msg_format

Spirent Extension (for Spirent HLTAPI only).

Specifies the BFD message format. This argument is available when -fec_vc_bfd_enable is set to true. Possible values are:

bfd_cc              BFD Control Channel (CC) message format
bfd_cv             BFD Connection Verification (CV) message format

The default value is bfd_cc.

-fec_gen_pwid_gal_enable

Spirent Extension (for Spirent HLTAPI only).

Enables/disables Generic Associated Label (GAL) for the generalized PWid LSP. Possible values are true (enable) and false (disable). The default value is false.

-fec_gen_pwid_label_sub_tlv_en

Spirent Extension (for Spirent HLTAPI only).

Determines whether to include the flow label sub-TLV in the PDU. Possible values are true and false. If it is set to true, flow label sub-TLVs will be included in the PDU. The default value is false.

-fec_gen_pwid_label_sub_tlv

Spirent Extension (for Spirent HLTAPI only).

Specifies the flags for the flow label sub-TLV. This argument is available when -fec_gen_pwid_label_sub_tlv_en is set to true. Possible values are:

Value Description 0 None 1 Tbit 2 RBit 3 Tbit.RBit

The default value is 0.

-fec_gen_pwid_if_des

Spirent Extension (for Spirent HLTAPI only).

User-generated interface description. This argument is available when -fec_gen_pwid_label_sub_tlv_en is set to true.

-fec_gen_pwid_status_tlv_en

Spirent Extension (for Spirent HLTAPI only).

Specifies whether to include or exclude the pseudowire status TLV in the label mapping message. Possible values are true (include) and false (exclude). The default value is false.

-fec_gen_pwid_redundant_set_role

Spirent Extension (for Spirent HLTAPI only).

Specifies the backup role that the LSP plays. Possible values are:

none                           No role set
primary_pseudowire            Primary pseudowire
secondary_pseudowire          Secondary pseudowire

The default value is none.

-fec_gen_pwid_req_vlan_id

Spirent Extension (for Spirent HLTAPI only).

ID of the first requested VLAN. Possible values range from 0 to 4095.

-fec_gen_pwid_req_vlan_id_incr

Spirent Extension (for Spirent HLTAPI only).

Step value for additional VLAN IDs. Possible values range from 0 to 4095.

-fec_gen_pwid_signal_req_switchover_status_bit

Spirent Extension (for Spirent HLTAPI only).

Specifies the value for the Signal Request Switchover Status bit. Possible values are true and false. The default value is false.

-fec_gen_pwid_vccv_connectivity_verification

Spirent Extension (for Spirent HLTAPI only).

Control verification type of VCCV as specified in RFC 5085. Possible values are listed below:

0
icmp_ping
lsp_ping
bfd_ip_udp_pw_fault_detection_only
bfd_ip_udp_pw_fault_detection_with_status_signaling
bfd_pw_ach_pw_fault_detection_only
bfd_pw_ach_pw_fault_detection_with_status_signaling

Value 0 indicates no type is specified. The default is 0.

-fec_gen_pwid_vccv_ctrl_channel

Spirent Extension (for Spirent HLTAPI only).

Control channel type of VCCV as specified in RFC 5085. Possible values are listed below:

0
mpls_pw_label_with_ttl
mpls_router_alert_label
pwe3_control_word_with_0001b_as_first_nibble

Value 0 indicates no type is specified. The default is 0.

-fec_gen_pwid_pw_count

Spirent Extension (for Spirent HLTAPI only).

Number of generalized PWid (FEC 129) pseudowires (PW) to advertise. Possible values range from 0 to 5000000. The default value is 1.

-handle

Identifies a list of LDP router handles on which to create, modify, or delete LSP (FEC) pools or FEC ranges. This argument is Mandatory . The value is alphanumeric.

-lsp_handle

Specifies the LSP for which to configure the LSP pools and FEC range options. This argument is Mandatory for modify and delete modes, but not for create mode. When you use -mode create, Spirent HLTAPI will return a handle for the newly created LSP.

-mode

Specifies whether to create, modify, or delete LSPs from the emulated router’s LSR database. Possible values are:

create - Creates a new LSP for the LDP session. The handle
        for the LSP is returned in the lsp_handle key (see
        Return Values).

modify - Modifies the setup for the LSP specified in the
        -lsp_handle argument.

delete - Removes the LSP specified in the -lsp_handle
        argument.
-lsp_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the type of LSP to create. Possible values are:

ipv4_egress        IPv4 prefix/host LSP

ipv4_ingress    IPv4 ingress prefix LSP

ipv6_egress     IPv6 prefix/host LSP

ipv6_ingress    IPv6 ingress prefix LSP

pwid            Virtual Circuit (VC) LSP

generalized_pwid   Generalized PWid (FEC129) LSP

p2mp             Point to Multiple Point (P2MP) LSPs (FEC 6)

The default value is ipv4_egress.

-address_family

Spirent Extension (for Spirent HLTAPI only).

IP version of the address. The available option is ipv4. The default value is ipv4.

-custom_opaque_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the custom opaque type. This argument is available when -opaque_type_selector is set to custom. Possible values range from 1 to 255. The mapping is listed as below:

1-254        Custom type

255         Extended type

The default value is 1.

-custom_opaque_value

Spirent Extension (for Spirent HLTAPI only).

Specifies the value of the custom opaque element. This argument is available when -element_type is set to custom. Possible values range from 0 to 65535. The default value is 0. The default value is 0.

-enable_extended_type

Spirent Extension (for Spirent HLTAPI only).

Enables/disables extended opaque type. This argument is available when -opaque_type_selector is set to custom. Possible values are true (enable) and false (disable). The default value is false.

-extended_opaque_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the value of the extended opaque element. This argument is available when -element_type is set to custom. Possible values range from 0 to 65535. The default value is 0.

-global_id_reserved

Spirent Extension (for Spirent HLTAPI only).

Reserved bits (4 bits) of the global ID. Possible values range from 0 to 15. The default value is 0.

-global_id_table_id

Spirent Extension (for Spirent HLTAPI only).

Table ID (12 bits) field of the global ID. Possible values range from 0 to 16383. The default value is 0.

-global_id_tree_id

Spirent Extension (for Spirent HLTAPI only).

Tree ID (12 bits) field of the global ID. The default value is 1.

-multicast_group_handle

Spirent Extension (for Spirent HLTAPI only).

Multicast group handle received from the sth::emulation_multicast_group_config function. This argument is available when -opaque_type_selector is set to type3_s_g or type250_s_g_rd.

-num_lsps

The number of label bindings to be advertised. The default is 1. When -num_lsps is greater than 1, you must also specify the -fec_host_step, and -fec_ip_prefix_step arguments.

-num_routes

Indicates the number of routes per LSP that will be advertised when -fec_type is set to ipv4_egress, ipv4_ingress, ipv6_egress, or ipv6_ingress.

-root_node_address

Spirent Extension (for Spirent HLTAPI only).

Root node address of the P2MP LSP. The value must be in IPv4 format. The default value is 192.85.1.1.

-opaque_type_selector

Spirent Extension (for Spirent HLTAPI only).

Type of the opaque FEC element. Possible values are described below:

type3_s_g               Type 3 (S, G)
type250_s_g_rd          Type (S, G, RD)
custom                  Custom type

The default value is type3_s_g.

-route_distinguisher

Spirent Extension (for Spirent HLTAPI only).

Specifies the route distinguisher. This argument is available when -opaque_type_selector is type250_s_g_rd. The value must be in the format of AS:Number or IPv4:Number. The default value is 100:1.

-source_address

Spirent Extension (for Spirent HLTAPI only).

Source address of the P2MP LSP. This argument is available when -opaque_type_selector is set to type3_s_g or type250_s_g_rd. The value must be in IPv4 format. The default value is 192.85.1.3.

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper

None

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper

-egress_label_mode
-label_msg_type
-fec_vc_intf_desc
-fec_vc_intf_mtu_enable
-hop_count_tlv_enable
-hop_count_value
-path_vector_tlv
-path_vector_tlv_lsr
-label_value_start
-packing_enable
-no_write

Note

For more information about Spirent HLTAPI Wrapper, refer to Chapter 4 Spirent HLTAPI Wrapper in Spirent HLTAPI Programmer’s Reference.

Cisco-specific Arguments

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

-egress_label_mode
-fec_vc_intf_desc
-fec_vc_intf_mtu_enable
-hop_count_tlv_enable
-hop_count_value
-label_msg_type
-path_vector_tlv
-path_vector_tlv_lsr

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):

lsp_handle
          The handle that identifies the LSP created by the
          ``sth::emulation_ldp_route_config`` function.

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

log
          An error message (if the operation failed).

Description

The sth::emulation_ldp_route_config function creates and configures LSPs. Use the -lsp_handle argument to identify the router for which to create, modify, or delete an LSP. (The router handle value is contained in the keyed list returned by the sth::emulation_ldp_config function.) Use the -mode argument to specify the action to perform. See the -mode argument for a description of the actions.

FEC is a group of IP packets which are forwarded in the same way, over the same path, and with the same forwarding treatment. An FEC (Forwarding Equivalence Class) is associated with each LSP created. The FEC specifies which packets are mapped to that LSP.

Note

The -fec_vc_intf_mtu_enable is not supported in the Spirent HLTAPI. The VC Fec interface MTU option (-fec_vc_intf_mtu) is always enabled in the Spirent HLTAPI.

Examples

#### HLTAPI for Tcl ####

Assume we already have a list of LDP router handles:

set device_ret1_route1 [sth::emulation_ldp_route_config\
         -mode                      create \
         -handle                    $device_ret1_hdl $device_ret0_hdl\
         -lsp_type                  ipv4_egress\
         -fec_type                  prefix \
         -fec_ip_prefix_step        1 \
         -fec_ip_prefix_length      24 \
         -fec_ip_prefix_start       192.7.1.0 \
         -num_routes                10 \
  ]

The following example creates an LSP pool with two LSPs in it on the LDP router (ldpRouterHandle) on port1:

sth::emulation_ldp_route_config -mode create \
                            -handle $ldpRouterHandle \
                            -num_lsps 2  \
                            -fec_type ipv4_prefix \
                            -fec_ip_prefix_step 1 \
                            -fec_ip_prefix_length 24 \
                            -fec_ip_prefix_start 32.25.0.0

Sample Output:

{lsp_handle ipv4prefixlsp1} {status 1}

MLDP type 3 configuration with a multicast group:

set device_ret0_macstgroup_1 [sth::emulation_multicast_group_config\
        -mode                                             create\
        -ip_prefix_len                                     32 \
        -ip_addr_start                                    225.0.0.1 \
        -ip_addr_step                                     1 \
        -num_groups                                       1 \
        -pool_name                                        Ipv4Group_1 \
]
set macstgroup "[keylget device_ret0_macstgroup_1 handle]"

set device_ret1_route0 [sth::emulation_ldp_route_config\
       -mode                                 create \
       -handle                               $device_ret1_hdl \
       -lsp_type                              p2mp \
       -address_family                        ipv4\
       -root_node_address                    1.1.1.1\
       -opaque_type_selector                 type3_s_g\
       -global_id_reserved                   3\
       -global_id_table_id                   100\
       -global_id_tree_id                    10\
       -source_address                       2.2.2.2\
       -multicast_group_handle               $macstgroup
   ]

Sample Output:

{lsp_handle p2mplsp1} {status 1}

#### HLTAPI for Python ####

Assume we already have the LDP router handle device_ret0_hdl:

device_ret0_route0 = sth.emulation_ldp_route_config (
             mode                = 'create',
             handle              = device_ret0_hdl,
             fec_type            = 'ipv4_prefix',
             fec_ip_prefix_step  = '1',
             fec_ip_prefix_start = '32.25.0.0',
             num_lsps            = '2',
             fec_ip_prefix_length= '24');

Sample Output:

{'lsp_handle': 'ipv4prefixlsp1', 'status': '1'}

#### HLTAPI for Perl ####

Assume we already have the LDP router handle device_ret0_hdl:

my %device_ret0_route0 = sth::emulation_ldp_route_config (
             mode                => 'create',
             handle              => "$device_ret0_hdl",
             fec_type            => 'ipv4_prefix',
             fec_ip_prefix_step  => '1',
             fec_ip_prefix_start => '32.25.0.0',
             num_lsps            => '2',
             fec_ip_prefix_length=> '24');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';
$VAR3 = 'lsp_handle';
$VAR4 = 'ipv4prefixlsp1';

sth::emulation_ldp_route_element_config

Purpose

Spirent Extension (for Spirent HLTAPI only).

Configures, modifies, or deletes LDP route elements.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ldp_route_element_config
    [-mode {create|modify|delete}  M]
    [-lsp_handle <ALPHANUM>]
    [-element_handle <ALPHANUM>]
    [-element_type {p2mp_custom_element | generalized_pwid_switch_tlv}]
    [-enable_extended_type {true | false}]
    [-extended_opaque_type <0-65535>]
    [-custom_opaque_value <0-65535>]
    [-custom_opaque_type <1-255>]

Arguments

-mode

Specifies the action to perform. This argument is Mandatory . The modes are described below:

create       Creates a new LDP element. See the
             description of the -element_type argument for the
             types of elements you can create. Use the
             -lsp_handle argument to specify the LDP route
             handle under which the specified element must be
             created.

modify       Modifies an existing LDP route element.
             Use the -element_handle argument to specify the
             element to modify.

delete       Deletes an existing LDP route element. Use
             the -element_handle argument to specify the element
             to delete.
-lsp_handle

The LSP handle received from the sth::emulation_ldp_route_config function. This argument is Mandatory for -mode create.

-element_handle

The LDP element handle received from the current function. This argument is Mandatory for the modify and delete modes.

-element_type

Specifies the type of route elements to be configured. This argument is mandatory. Possible values are described below:

p2mp_custom_element     Specify this type to create, modify, or
                        delete custom opaque elements under P2MP

generalized_pwid_switch_tlv   Specify this type to create,
                               modify, or delete Switching Point
                               TLVs under Generalized PWID
-enable_extended_type

Enables/disables the extended opaque type. This argument is available when -element_type is set to p2mp_custom_element. Possible values are true (enable) and false (disable). The default value is false.

-extended_opaque_type

Specifies the value of the extended opaque element. This argument is available when -element_type is set to p2mp_custom_element. Possible values range from 0 to 65535. The default value is 0.

-custom_opaque_type

Specifies the opaque type. This argument is available when -element_type is set to p2mp_custom_element. Possible values range from 1 to 255. The mapping is listed as below:

1-254          Custom type

255             Extended type

The default value is 1.

-custom_opaque_value

Specifies the value of the custom opaque element. This argument is available when -element_type is set to p2mp_custom_element. Possible values range from 0 to 65535. The default value is 0. The default value is 0.

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):

element_handle        The LDP route element handle

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

log                   An error message (if the operation failed )

Description

The sth:: emulation_ldp_route_element_config function creates, modifies, or deletes an LDP route element. Use the -mode argument to specify the operation to perform. When you create a route element, the function returns a handle to the newly created element. Use this handle as the input for modify and delete operations. The mode you use determines the set of arguments you use to configure the required element.

When you specify -mode create or modify, you must also use the -element_type argument to specify the type of element to create or modify. Refer to Examples and Arguments for detailed information.

Examples

The following example creates an Opaque type element:

set device_ret1_route1 [sth::emulation_ldp_route_config\
      -mode                                  create \
      -handle                                $device_ret1_hdl \
      -lsp_type                              p2mp \
      -address_family                        ipv4\
      -root_node_address                     1.1.1.1\
      -opaque_type_selector                  custom\
      -global_id_reserved                    3\
      -global_id_table_id                    100\
      -global_id_tree_id                     10\
      -custom_opaque_type                     1\
      -enable_extended_type                   true\
      -extended_opaque_type                   3\
      -custom_opaque_value                    4\
]

To get P2MP handle:

set p2mp_custom_hnd "[keylget device_ret1_route1 lsp_handle]"

To create Opaque type:

set device_ret1_route1 [sth::emulation_ldp_route_element_config\
        -mode                            create \
        -lsp_handle                      $p2mp_custom_hnd \
        -element_type                    p2mp_custom_element \
        -custom_opaque_type              8\
        -enable_extended_type            false\
        -extended_opaque_type            8\
        -custom_opaque_value             8\
  ]

Sample Output:

{element_handle ldpmldpcustomopaque2} {status 1}

The following example modifies the specified Opaque type element:

set p2mp_custom_opaque_hnd "[keylget device_ret1_route1 element_handle]"

set device_ret1_route2 [sth::emulation_ldp_route_element_config\
        -mode                                 modify \
        -element_handle                       $p2mp_custom_opaque_hnd \
        -element_type                         p2mp_custom_element \
        -custom_opaque_type                   3\
        -enable_extended_type                 true\
        -extended_opaque_type                 2\
        -custom_opaque_value                  3\
    ]

Sample output:

{status 1}

The following example modifies the specified Opaque type element:

set device_ret1_route3 [sth::emulation_ldp_route_element_config\
        -mode                             delete \
        -element_handle                   $p2mp_custom_opaque_hnd \
    ]

Sample output:

{status 1}

sth::emulation_lsp_switching_point_tlvs_config

Purpose

A Spirent Extension created to configure, modify, or delete switching point TLVs for VC LSP (FEC128) or generalized PWid (FEC129) LSP

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_lsp_switching_point_tlvs_config
   [-mode {create|modify|delete}  M]
   [-lsp_handle <lsp_handle>]
   [-tlv_handle <tlv_handle>]
   [-attachment_group_id <integer::integer>]
   [-attachment_group_id_incr <integer::integer>]
   [-last_segment_traversed_subtlv_enable {true | false}]
   [-last_pseudowire_segment_fec_type  {fec_128 | fec_129}]
   [-local_ipv4_addr <a.b.c.d>]
   [-pseudowire_addr_enable {true | false}]
   [-pseudowire_addr_attachment_circuit_id <a.b.c.d>]
   [-pseudowire_addr_attachment_circuit_id_incr <a.b.c.d>]
   [-pseudowire_addr_global_id  <integer>]
   [-pseudowire_addr_prefix <a.b.c.d>]
   [-remote_ipv4_addr <a.b.c.d>]
   [-remote_ipv4_addr_increment <a.b.c.d>]
   [-remote_ipv4_addr_repeat_count <integer>]
   [-remote_ipv4_unique_addr_count <integer>]
   [-start_vc_id <integer>]
   [-src_attachment_individual_id <a.b.c.d>]
   [-src_attachment_individual_id_incr <a.b.c.d>]
   [-switching_point_description <string>]
   [-target_attachment_individual_id <a.b.c.d>]
   [-target_attachment_individual_id_incr <a.b.c.d>]
   [-vc_id_incr <integer>]

Arguments

-mode

Specifies the action to perform. This argument is Mandatory . Possible values are:

create   Creates a new S-PE TLV. The handle
         for the TLV is returned in the tlv_handle key (see
         Return Values)

modify   Modifies the setup for the Switching point TLV specified
         in the -tlv_handle argument

delete   Removes the Switching point TLV specified in the
        -tlv_handle argument
-tlv_handle

Specifies the switching point TLV under which to configure the TLV options. This argument is Mandatory for the modify and delete modes, but not for create mode. When you use -mode create, Spirent HLTAPI will return a handle for the newly created switching point TLV.

-lsp_handle

Specifies the LSP under which to create the switching point TLV. This argument is required for -mode create. The LSP handle is returned from the sth::emulation_ldp_route_config function, with -lsp_type set to pwid or generalized_pwid.

-attachment_group_id

Starting attachment group identifier for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The value must be in the format of integer::integer. The default value is 100:1.

-attachment_group_id_incr

Attachment Group Identifier (AGI) increment for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The value must be in the format of integer::integer. The default value is 0:1.

-last_segment_traversed_subtlv_enable

Enables/disables sub-TLV to specify the FEC of the last pseudowire segment traversed for the multi-segment pseudowire (MS-PW). Possible value are true (enable) and false (disable). The default value is true.

-last_pseudowire_segment_fec_type

FEC type of the last pseudowire segment traversed. This argument is available when -last_segment_traversed_subtlv_enable is set to true. Possible values are:

fec_128             VC/PWid FEC (FEC 128)
fec_129             Generalized PWid FEC (FEC 129)

The default value is fec_128.

-local_ipv4_addr

A sub-TLV to specify the router ID/loopback IPv4 address of the local switching point. The value must be in IPv4 format.

-pseudowire_addr_enable

Enables/Disables sub-TLV for specifying Layer 2 address of the PW switching point. Possible values are true (enable) and false (disable). The default value is false.

-pseudowire_addr_attachment_circuit_id

Starting value for the attachment circuit ID. It is used in the sub-TLV for specifying Layer 2 address of the PW switching point. This argument is available when pseudowire_addr_subtlv_enable is set to true. The value must be in IPv4 format. The default value is 0.0.0.1.

-pseudowire_addr_attachment_circuit_id_incr

Increment value for subsequent attachment circuit IDs. This argument is available when -pseudowire_addr_subtlv_enable is set to true. The value must be in IPv4 format. The default value is 0.0.0.1.

-pseudowire_addr_global_id

Global ID that should be used in the sub-TLV for specifying Layer 2 address of the PW switching point. This argument is available when -pseudowire_addr_subtlv_enable is set to true. The value must an integer. The default value is 1.

-pseudowire_addr_prefix

Pseudowire address prefix used in the sub-TLV for specifying Layer 2 address of the PW switching point. This argument is available when -pseudowire_addr_subtlv_enable is set to true. The value must be in IPv4 format. The default value is 192.0.0.1.

-remote_ipv4_addr

Specifies the router ID/loopback IPv4 address of the last PW switching point traversed or of the T-PE.

-remote_ipv4_addr_increment

Increment value for subsequent remote IPv4 addresses. The value must be in IPv4 format. The default value is 0.0.0.0.

-remote_ipv4_addr_repeat_count

Number of times a created remote IPv4 address should be repeated as the TLV value of the remote IPv4 sub-TLV, before the next created remote IPv4 address is used. Value 0 indicates no repetition. The default value is 0.

-remote_ipv4_unique_addr_count

Number of remote IPv4 unique addresses. The default value is 0.

-start_vc_id

Starting VC ID of the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_128. The default value is 1.

-src_attachment_individual_id

Starting source attachment individual identifier (SAII) for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The default value is 192.0.0.1.

-src_attachment_individual_id_incr

Source SAII increment for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The value must be in IPv4 format. The default value is 0.0.0.0.

-switching_point_description

PW switching point description, in string format. 0 to 80 characters are supported. This argument is available when -pseudowire_addr_subtlv_enable is set to true.

-target_attachment_individual_id

Starting target attachment individual identifier (TAII) for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The value must be in IPv4 format. The default value is 192.0.0.1

-target_attachment_individual_id_incr

Target TAII increment for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_129. The value must be in IPv4 format. The default value is 0.0.0.0.

-vc_id_incr

VC ID increment for the last pseudowire segment traversed. This argument is available when -last_pseudowire_segment_fec_type is set to fec_128. The default value is 1.

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):

tlv_handle The handle that identifies the switching point TLV created by
the function
status
Success (1) or failure (0) of the operation
log
An error message (if the operation failed)

Description

The sth::emulation_lsp_switching_point_tlvs_config function creates, modifies, or deletes switching point TLVs for VC LSP (FEC128) or generalized PWid (FEC129) LSP. (The LSP handle value is contained in the keyed list returned by the sth::emulation_ldp_route_config function). Use the -mode argument to specify the action to perform. See the -mode argument for a description of the actions.

Examples

The following examples create a generalized PWid LSP, and then the switching point TLV using the LSP handle returned:

set device_ret0_route0 [sth::emulation_ldp_route_config\
    -mode                                             create \
    -handle                                           $device_ret0_hdl \
    -lsp_type                                         generalized_pwid \
    -fec_gen_pwid_label_sub_tlv_en                    false \
    -fec_gen_pwid_custom_status_en                    false \
    -fec_gen_pwid_ctrl_pre                            not_preferred \
    -fec_gen_pwid_src_individual_id                   192.0.0.1 \
    -fec_gen_pwid_label_sub_tlv                       0 \
    -fec_gen_pwid_custom_status                       0 \
    -fec_gen_pwid_src_individual_id_incr              0.0.0.0 \
    -fec_gen_pwid_redundant_set_role                  none \
    -fec_gen_pwid_gal_enable                          false \
    -fec_gen_pwid_type                                eth_vlan \
    -fec_gen_pwid_signal_req_switchover_status_bit    false \
    -fec_gen_pwid_target_individual_id_incr           0.0.0.0 \
    -fec_gen_pwid_req_vlan_id_incr                    1 \
    -fec_gen_pwid_pw_count                            1 \
    -fec_gen_pwid_attachment_group_id                 100:1 \
    -fec_gen_pwid_bfd_enable                          false \
    -fec_gen_pwid_bfd_msg_format                      bfd_cc \
    -fec_gen_pwid_status_tlv_en                       false \
    -fec_gen_pwid_dst_ipv4_addr                       127.0.0.1 \
    -fec_gen_pwid_vccv_connectivity_verification      0 \
    -fec_gen_pwid_attachment_group_id_incr            0:1 \
    -fec_gen_pwid_id_count                            1 \
    -fec_gen_pwid_group_id                            0 \
    -fec_gen_pwid_vccv_ctrl_channel                   0 \
    -fec_gen_pwid_intf_mtu                            1500 \
    -fec_gen_pwid_target_individual_id                192.0.0.1 \
]

set device_ret0_lsp0_hdl [lindex [keylget device_ret0_route0 lsp_handle] 0]

set device_ret0_route0_tlv0 [sth::emulation_lsp_switching_point_tlvs_config\
    -mode                                             create \
    -lsp_handle                                       $device_ret0_lsp0_hdl \
    -remote_ipv4_addr_repeat_count                    0 \
    -last_pseudowire_segment_fec_type                 fec_128 \
    -remote_ipv4_addr_increment                       0.0.0.0 \
    -remote_ipv4_unique_addr_count                    0 \
    -vc_id_incr                                       1 \
    -last_segment_traversed_subtlv_enable             true \
    -start_vc_id                                      1 \
    -pseudowire_addr_enable                           false \
]

Sample Output:

{tlv_handle pseudowireswitchingpointtlv1} {status 1}

End of Procedure Header