OSPF Functions

sth::emulation_ospf_config

Purpose

Creates, enables, disables, modifies, or deletes one or more emulated Open Shortest Path First (OSPF) routers on the specified test port. OSPF is an Interior Gateway Protocol (IGP) that is designed to manage communications in large IP networks by dividing them into smaller networks called “areas.”

An individual router maintains a local state that represents the router’s interfaces and adjacent neighbors. OSPF routers use link state advertisements (LSAs) to exchange the local state information. Within an AS, the combined LSA data produces a link-state database. Routers maintain a representation of the AS topology in a link-state database. Each router has a separate link-state database for each area to which it is connected. A router uses the topology information to create a shortest-path tree for the routing table.

OSPFv2 is designed to work with IPv4. OSPFv3 uses IPv6. The two OSPF protocols are based on the same concepts of LSA communication. In general, OSPFv3 introduces new LSA types, and it modifies the packet format to support IPv6 addresses, IPv6 authentication, and multiple instances per link. (For detailed information about the differences between the protocols, see RFC 2740, “OSPF for IPv6”.)

Synopsis

Note

  1. M indicates that the argument is Mandatory .
  2. S indicates the argument is for scaling scenarios.
sth::emulation_ospf_config
     [-mode {create|modify|disable|enable|delete|active|activate|inactive}  M]
     [-port_handle <port_handle>]
     [-handle <ospf_handle>|<device_handle>]
     [-area_id <a.b.c.d>]
          [-area_id_step <a.b.c.d>]
          [-area_type {external_capable | stub | nssa} ]
     [-password <password>]
     [-authentication_mode {none | simple | md5} ]
     [-bfd_registration {1|0}]
     [-count <integer>]
     [-dead_interval <1-65535>]
     [-demand_circuit {1|0} ]
     [-expand {true|false} S]
     [-gateway_ip_addr <a.b.c.d> ]
          [-gateway_ip_addr_step <a.b.c.d> ]
     [-gateway_ipv4_addr <a.b.c.d> ]
          [-gateway_ipv4_addr_step <a.b.c.d> ]
     [-hello_interval <1-65535>]
     [-graceful_restart_enable {0|1}]
     [-graceful_restart_type  {none | rfcstandard | llsignalling}]
     [-interface_cost <1-65535>]
     [-intf_ip_addr <a.b.c.d>]
          [-intf_ip_addr_step <integer> OR <a.b.c.d>]
          [-intf_prefix_length <1-128>]
     [-intf_ipv4_addr <a.b.c.d>]
          [-intf_ipv4_addr_step <integer> OR <a.b.c.d>]
          [-intf_ipv4_prefix_length <1-128>]
     [-ip_version {6|4_6}]
     [-ipv6_router_id <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
     [-ipv6_router_id_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
     [-lsa_retransmit_delay <1-65535>]
     [-lsa_refresh_interval <10-21600>]
     [-mac_address_start <aa:bb:cc:dd:ee:ff>]
     [-mac_address_step <aa:bb:cc:dd:ee:ff>]
     [-md5_key_id <1-255>]
     [-network_type {broadcast|ptop|native} ]
     [-option_bits <hexadecimal>]
     [-router_id <a.b.c.d> ]
     [-router_id_step <integer>]
     [-router_priority <0-255>]  for broadcast and nba networks only
     [-session_type {ospfv2 | ospfv3}]
     [-adj_sid <NUMERIC>]
     [-adj_sid_step <NUMERIC>]
     [-enable_adj_sid {true|false}]
     [-enable_prefix_sid {true|false}]
     [-enable_sr_label_management {true|false}]
     [-prefix_range_tlv_percentage <0-100>]
     [-algorithms <string>]
     [-sid_label_base <NUMERIC>]
     [-sid_label_range <1-16777215>]
     [-sid_label_type {20-bit-Label|32-bit-SID}]
     [-node_prefix_sid <1-16777215>]
     [-node_prefix_sid_flags {NPBIT|MBIT|EBIT|VBIT|LBIT}]
     [-node_prefix_sid_step <NUMERIC>]
     [-prefix_sid <NUMERIC>]
     [-prefix_sid_algorithm <NUMERIC>]
     [-prefix_sid_flags {NPBIT|MBIT|EBIT|VBIT|LBIT}]
     [-prefix_sid_step <NUMERIC>]
     [-anycast_base <NUMERIC>]
     [-anycast_enabled {true|false}]
     [-anycast_ipv4_addr <a.b.c.d>]
     [-anycast_prefix_sid_flags {NPBIT|MBIT|EBIT|VBIT|LBIT}]
     [-anycast_range <1-16777215>]
     [-anycast_sid <NUMERIC>]
     [-te_admin_group <1-4294967295>]
     [-te_max_bw <1-2147483647>]
     [-te_max_resv_bw <1-2147483647>]
     [-te_route_category {undefined|primary|secondary|unique|any}]
     [-te_metric <0-4294967295>]
     [-te_unresv_bw_priority0 <1-2147483647>]
     [-te_unresv_bw_priority1 <1-2147483647>]
     [-te_unresv_bw_priority2 <1-2147483647>]
     [-te_unresv_bw_priority3 <1-2147483647>]
     [-te_unresv_bw_priority4 <1-2147483647>]
     [-te_unresv_bw_priority5 <1-2147483647>]
     [-te_unresv_bw_priority6 <1-2147483647>]
     [-te_unresv_bw_priority7 <1-2147483647>]
     [-vci <0-65535>]
     [-vci_step <0-65535>]
     [-vlan_cfi {0|1} ]
     [-vlan_id <0-4095>]
     [-vlan_id_mode {fixed|increment}]
     [-vlan_id_step <0-4095>]
     [-vlan_user_priority <0-7>]
     [-vlan_outer_id <0-4095>]
           [-vlan_outer_id_mode {fixed|increment}]
           [-vlan_outer_id_step <0-4095>]
           [-vlan_outer_user_priority <0-7>]
     [-vpi <0-255>]
     [-vpi_step <0-255>]
     [-tunnel_handle <GRE_tunnel_handle>]
     [-interface_id <0-4294967295>]
     [-enable_extended_lsa {true|false}]
     [-extended_lsa_mode {none|mixed_mode_originate_only|mixed_mode_originate_spf|full}]
     [-area_extended_lsa_mode {inherit_global|none|mixed_mode_originate_only|mixed_mode_originate_spf|full}]
     [-advertise_lsa {reachable_lsas|all_lsas}]
     [-flood_delay <20-2147483647>]
     [-state_max_load {true|false}]
     [-guarantee_delivery {true|false}]

Arguments

-area_id

Identifies the OSPF area to which the router belongs. Areas are groups of contiguous networks and attached hosts. A network belongs to only one area. Each area has an area ID, designated as a.b.c.d. The area ID is NOT an IP address although it looks like one. Areas should be kept to a maximum of 100 routers. The default area ID is 0.0.0.0.

-area_id_step

The increment between consecutive area IDs when multiple emulated OSPF routers are created. The value must be in IPv4 format. The default value is 0.0.0.1.

-area_type

Specifies the type of area to which the OSPF router belongs and sets two option bits: the E bit and the NP bit. If you also specify the -option_bits argument, the -option_bit setting overwrites any previous value (the -area_type argument is processed before the -option_bit argument). Possible values are:

external_capable - An area in which non-AS boundary routers
    can handle routes to destinations outside of the
    autonomous system. In an external_capable area,
    boundary routers will flood the area with AS-external
    LSAs describing the external routes. Specifying
    -area_type external capable sets the E bit.

stub - An area that does not handle external routes.  AS-
    external LSAs are not flooded into stub areas, so you
    cannot redistribute routing data from another protocol
    into a stub area. Specifying -area_type stub clears the
    E bit.

nssa - (not so stubby area) An area that supports NSSA-
    encoded route information area. It allows external
    routes to be flooded within the area but does not allow
    external routes from other areas to enter it.
    Specifying -area_type nssa sets the NP bit.
-authentication_mode

(OSPFv2 only) Specifies the authentication mode for an interface. Possible values are:

none - No authentication

simple - Simple authentication uses a password (key) that is
    configured on each router and is included in plain text
    in each OSPF packet originated by that router

md5 - MD5 authentication is based on shared secret keys that
    are configured in all routers in the area

All OSPF protocol exchanges are authenticated. The authentication type is configurable on a per-area basis.

-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 OSPF routers to create on the interface. Possible values are 1 to <max_int>. The default is 1.

-dead_interval

Specifies the number of seconds after receiving the most recent Hello message, at which point neighboring routers will declare the emulated router down. Possible values range from 1 to 65535. The default is 40 on broadcast networks; otherwise, it is 120.

-demand_circuit

Enables the demand circuit bit. Pertains to handling of demand circuits (DCs) by the router. Possible values are 0 and 1. If true (1), sets the DC bit(0x20) in the Options field of all LSAs generated.

-expand

Determines whether to expand the specified OSPFv2/OSPFv3 device parameters into emulated OSPFv2/OSPFv3 device objects. It is used in Scaling test scenarios.

When set to true, a list of emulated device handles (handle_list) with enabled OSPFv2/OSPFv3 device configurations are created.

When set to false, only OSPF parameters are configured with no handle returned.

-gateway_ip_addr

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4/IPv6 gateway address of the OSPF router. The default for OSPFv2 is 192.85.1.1. The default for OSPFv3 is 2000:0:0:0:0:0:0:1.

-gateway_ip_addr_step

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4/IPV6 gateway address step for multiple routers. This argument is used with the -gateway_ip_addr argument. The default for OSPFv2 is 0.0.0.0. The default for OSPFv3 is 0000::0000

-gateway_ipv4_addr

Spirent Extension (for Spirent HLTAPI only).

Configures the IPv4 gateway address of the OSPFv3 router. The default value is 192.85.1.1. It only works when -ip_version set to 4_6.

-gateway_ipv4_addr_step

Spirent Extension (for Spirent HLTAPI only).

Configures the step value to increment IPv4 gateway addresses for multiple OSPFv3 routers. This argument is used with the -gateway_ipv4_addr argument. The default value is 1. It only works when -ip_version set to 4_6.

-graceful_restart_enable

Spirent Extension (for Spirent HLTAPI only).

Specifies if OSPF graceful restart is enabled on the simulated router. Possible values are 1 (enable Graceful Restart) or 0 (disable Graceful Restart). The default is 0. Example usage:

sth::emulation_ospf_config -mode create \
   -port_handle $p0 \
   -graceful_restart_enable 1
-graceful_restart_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the graceful restart type. You must set -graceful_restart_enable to true. In OSPFv2, possible values are:

none                No graceful restart
rfcstandard         Follows RFC 3623
llsignalling        Link-Layer Signaling

The default value is none.

In OSPFv3, possible values are:

helper_only Graceful Restart Helper Only

The default value is helper_only.

-handle

Specifies the OSPF handle(s) to use. This argument is Mandatory for modify, delete, enable, disable, active, activate, and inactive modes. When mode is create, Spirent HLTAPI creates OSPF 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 10 on broadcast networks; otherwise, it is 30.

-interface_cost

The metric associated with sending packets over the OSPF interface. Possible values range from 1 to 65535. The default is 1.

-intf_ip_addr

Specifies the IP address of the interface for the OSPF emulated router that will establish an adjacency with the DUT. The default for IPv4 is 192.85.1.3. The default for IPv6 is 0:0:0:0:0:0:0:0.

-intf_ip_addr_step

Specifies the difference between interface IP addresses of consecutive routers when multiple OSPF routers are created. The default increment is 1 or 0.0.0.1 .. note:: The value can be specified as an integer or a four-octet

format.
-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. Possible values for IPv6 addresses range from 1 to 128; the default is 64.

-intf_ipv4_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv4 address of the interface for the OSPFv3 emulated router that will establish an adjacency with the DUT. The default value is 192.85.1.3. It only works when -ip_version is 4_6.

-intf_ipv4_addr_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the difference between interface IPv4 addresses of consecutive routers when multiple OSPFv3 routers are created. The default value is 1. It only works when -ip_version set to 4_6.

-intf_ipv4_prefix_length

Spirent Extension (for Spirent HLTAPI only).

Specifies the ipv4 prefix length on the OSPFv3 emulated router. Possible values range from 1 to 32. The default value is 24. It only works when -ip_version set to 4_6.

-ip_version

Spirent Extension (for Spirent HLTAPI only).

Specifies the IP version of OSPFv3. Possible values are 6 and 4_6. You can create the dual stack for OSPFv3 by set this argument to 4_6. The default value is 6.

-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.

-lsa_refresh_interval

Spirent Extension (for Spirent HLTAPI only).

Maximum time in seconds between originations of an LSA. Possible values range from 10 to 21600. The default value is 1800.

-lsa_retransmit_delay

Specifies the number of seconds between retransmission of unacknowledged link state updates. Possible values range from 1 to 65535. The default is 5.

-mac_address_start

Initial MAC address of the interfaces created for the OSPF configuration. The default is 00:10:94:00:00:02 when sth::emulation_ospf_config is first called. For the second or later uses of this function, the default value would increment by 00:00:00:00:00:01 based on the MAC address of last router created. This argument is Mandatory when -count is greater than 1.

-mac_address_step

Specifies the step value to generate interface MAC addresses for consecutive OSPF routers. The default value is 00:00:00:00:00:01.

-md5_key_id

(OSPFv2 only) Specifies the MD5 key ID to use for MD5 authentication mode. To use this argument, you must specify -authentication_mode MD5. Possible values range from 1 to 255. The default is 1.

-mode

Specifies the action to be performed. Possible values are create, modify, delete, disable, enable, active, activate, and inactive. There is no default, you must specify a mode. The modes are described below:

create - Creates an emulated router.
         When -port_handle is provided, Spirent HLTAPI creates
         one or more emulated routers that are associated
         with the specified port.  When -handle is provided, OSPF
         will be created over the specified device.

modify - Changes the configuration for the OSPF router
         specified in the -handle argument.

delete - Deletes the OSPF router specified in the -handle
         argument.

disable - Stops the OSPF router specified in the -handle
         argument.

enable - Starts the OSPF router specified in the -handle.

active - Enables the OSPF router specified by the -handle
         argument. You must specify a valid OSPF session handle.

activate - Used for ``Scaling`` scenarios.
           1. Enables OSPFv2/OSPFv3 devices and configures
              OSPFv2/OSPFv3 parameters for the devices created
              via interface_config/emulation_device_config(wizard).
              Requires -param_handle value as the input to the
              -handle option.
           2. Creates devices and enables OSPFv2/OSPFv3 protocol.
              Requires -port_handle and -block_mode options.

inactive - Disables the OSPF router specified by the -handle
           argument. You must specify a valid OSPF session
           handle. The configuration for the router is retained
           when it is inactive, and it is available as
           configured, if the router becomes active.

Note

  1. When -handle is provided for the create mode, the following

options will be obsoleted:

-count
-intf_ip_addr
-intf_ip_addr_step
-intf_prefix_length
-gateway_ip_addr
-gateway_ip_addr_step
-loopback_ip_addr
-loopback_ip_addr_step
-router_id
-router_id_step
-vci
-vci_step
-vlan_cfi
-vlan_id
-vlan_id_mode
-vlan_id_step
-vlan_user_priority
-vpi
-vpi_step
-tunnel_handle
-vlan_outer_id
-vlan_outer_id_mode
-vlan_outer_id_step
-vlan_outer_user_priority
-gre_checksum
-gre_local_ip
-gre_remote_ip
-gre_tunnel
  1. For -mode activate, only the following set of options are valid:

    When -handle option is provided:

    OSPFv2
     -area_id
     -graceful_restart_enable
     -graceful_restart_type
     -network_type
     -router_priority
     -option_bits
     -authentication_mode
     -password
     -md5_key_id
    
    OSPFv3
     -area_id
     -network_type
     -router_priority
     -option_bits
    

    When -port_handle and -block_mode options are provided, requires following options along with above specified options.

    -block_mode -block_name_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 -ipv6_router_id_src -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.

-network_type

Indicates the type of network for the interface. Possible values are:

broadcast - Indicates that the network is a broadcast
      network, as in an Ethernet connection. This is the
      default.

ptop - Point-to-point (PTOP). A network formed by a
      point-to-point link between two routers.

native - Specifies that the interface on OSPF session uses the
      default adjacency implied by the port-type. Use this setting
      to override the physical link type to emulate a broadcast
      adjacency over POS, or a point-to-point adjacency over
      Ethernet.

The default value is native.

-option_bits

A bit mask that specifies the settings of the Options field in Hello packets sent to the DUT. The Options field describes the optional OSPF capabilities of the router. Section A.2 in RFC 2328 describes the Options field for OSPFv2; Section A.2 in RFC 2740 describes the Options field for OSPFv3.

Use hexadecimal for this value. The default for OSPFv2 is 0x02, which sets the E-bit (binary 00000010). The default for OSPFv3 is 0x13.

The value specified for this argument overwrites the initial value specified by -area_type and -demand_circuit:

V6: 0x01: If this bit is clear, the router/link should be
          excluded from IPv6 routing calculations.

E: 0x02:  External Routing: This bit specifies the way
          AS-external-LSAs are flooded.  When this bit is
          set, the area type is external_capable; when this
          bit is cleared, the area type is stub.

MC: 0x04: Multicast: This bit specifies whether IP multicast
          datagrams are forwarded.

NP: 0x08: NSSA: This bit specifies the handling of Type-7
          LSAs.

EA: 0x10: External Attribute: This bit specifies the
          router's willingness to receive and forward
          External-Attributes-LSAs. Used only for OSPFv2
          sessions.

R: 0x10:  This bit indicates if the originator is an active
          router.

DC: 0x20: Demand Circuit: This bit specifies the router's
          handling of demand circuits.

O: 0x40:  Opaque: This bit specifies the router's
          willingness to receive and forward Opaque LSAs as
          specified in RFC 2370. Used only for OSPFv2
          sessions.
-password

(OSPFv2 only) Assigns a password that is used by neighboring OSPF routers on an area that is using OSPF’s simple password authentication. The default is “Spirent”. To use this argument, you must specify -authentication_mode simple. For OSFPv3, the password for OSPF authentication mode is enabled and set to “simple”.

-port_handle

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

-router_id

Identifies the emulated router. The router ID is a 32-bit value, represented in dot notation. (It is not an IP address.) The default is 192.85.1.3.

-router_id_step

The step size is the increment used to assign IDs to routers. Use the -router_id_step argument along with the -router_id and -count arguments to create routers on the interface. You must specify a step value when the -count value is greater than 1.

-router_priority

Sets the priority for the emulated router. OSPF routers use the priority to elect the designated and back-up designated routers. If you do not want the router to act as a designated router, set this value to 0. The default is 0 for broadcast and NBMA networks. For other networks, this argument is ignored. For OSPFv2 sessions, if designated routers are not supported, this value is always 0. Possible values are 0 to 255.

-session_type

Specifies the OSPF version to be emulated. Possible values are ospfv2 or ospfv3. The default is ospfv2.

-adj_sid

(OSPFv2 only) Specifies the starting value of the SID or label for Extended Link TLV. The default is 9001.

-adj_sid_step
(OSPFv2 only) Specifies the increment value to create subsequent

SIDs or labels for Extended Link TLV. The default is 1.

-enable_adj_sid

(OSPFv2 only) Specifies whether enable or disable Adj-SID for the adjacency link. Possible values are described below:

Value Description true Enable Adj-SID for the adjacency link false Disable Adj-SID for the adjacency link

The default is true

-enable_prefix_sid

(OSPFv2 only) Specifies whether enable or disable Prefix-SID for IPv4 routes. Possible values are described below:

Value Description true Enable Prefix-SID for IPv4 routes false Disable Prefix-SID for IPv4 routes

The default is true

-enable_sr_label_management

(OSPFv2 only) Specifies whether enable or disable SR label management for Simplified Segment Routing. Possible values are described below:

Value Description true Enable SR Label Management. false Disable SR Label Management.

The default is false

-prefix_range_tlv_percentage

(OSPFv2 only) Specifies the percentage of the Extended Prefix LSA using Extended Prefix Range TLV. Possible values range from 0 to 100. The default is 0.

-algorithms

(OSPFv2 only) Specifies the algorithm to use to calculate reachability to other nodes or to prefixes attached to these nodes. The default is 0.

-sid_label_base

(OSPFv2 only) Specifies the starting value of the SID or label for SID/Label Range TLV. The default is 800000.

-sid_label_range

(OSPFv2 only) Specifies the number of values of the range from the starting value defined in the SID/Label Range TLV. Possible values range from 1 to 16777215. The default is 80000.

-sid_label_type

(OSPFv2 only) Specifies the type of value used, SID or label. Possible values are described below:

Value             Description
20-bit-Label   20-bit Label.
32-bit-SID     32-bit SID.

The default is 20-bit-Label

-node_prefix_sid

(OSPFv2 only) Specifies the starting value of the SID or index for Extended Prefix TLV. The default is 101.

-node_prefix_sid_flags

(OSPFv2 only) Specifies the node prefix SID flags. Possible values are described below:

Value Description NPBIT NP bit, No PHP. MBIT M bit, Mapping Server. EBIT E bit, Explicit-Null. VBIT V bit, Value/Index. LBIT L bit, Local/Global.

The default is NPBIT.

-node_prefix_sid_step

(OSPFv2 only) Specifies the increment value to create subsequent SIDs or indexes for Extended Prefix TLV. The default is 1.

-prefix_sid

(OSPFv2 only) Specifies the Prefix SID. The default is 11000.

-prefix_sid_algorithm

(OSPFv2 only) Specifies the algorithm to use to calculate reachability to other nodes or to prefixes attached to these nodes. The default is 0.

-prefix_sid_flags

(OSPFv2 only) Specifies the Prefix SID flags. Possible values are described below:

Value      Description
NPBIT      NP bit, No PHP.
MBIT    M bit, Mapping Server.
EBIT       E bit, Explicit-Null.
VBIT    V bit, Value/Index.
LBIT       L bit, Local/Global.

The default is NPBIT.

-prefix_sid_step

(OSPFv2 only) Specifies the Prefix SID step. The default is 1.

-anycast_base

(OSPFv2 only) Specifies the anycast base SID/Label. The default is 800000.

-anycast_enabled

(OSPFv2 only) Specifies the enable Anycast or not. Possible values are described below:

Value      Description
true       Enable Anycast.
false      Disable Anycast.

The default value is false.

-anycast_ipv4_addr

(OSPFv2 only) Specifies the anycast IPv4 address. The default is 192.1.1.1

-anycast_range

(OSPFv2 only) Specifies the anycast Range Size. Possible values range from 1 to 16777215. The default is 80000.

-anycast_sid

(OSPFv2 only) Specifies the anycast SID. The default is 100.

-anycast_prefix_sid_flags

(OSPFv2 only) Specifies the anycast prefix SID flags. Possible values are described below:

Value      Description
NPBIT       NP bit, No PHP
MBIT        M bit, Mapping Server
EBIT        E bit, Explicit-Null
VBIT        V bit, Value/Index
LBIT        L bit, Local/Global

The default is NPBIT

-te_admin_group

(OSPFv2 only) Specifies the administrative group of the traffic engineering link. Possible values range from 1 to 4294967295. The default is 1.

-te_max_bw

(OSPFv2 only) Specifies the maximum bandwidth that can be used on the traffic engineering link. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_max_resv_bw

(OSPFv2 only) Specifies the maximum bandwidth that may be reserved on the traffic engineering link. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_metric

(OSPFv2 only) Specifies the link metric for traffic engineering purposes. Possible values range from 0 to 4294967295.

-te_unresv_bw_priority0

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 0. The values corresponds to the bandwidth that can be reserved with a setup priority of 0 through 7. Arranged in ascending order, priority 0 occurs at the start of the sub-TLV and priority 7 at the end. The initial values, before any bandwidth is reserved, are all set to the value specified for the maximum reservable bandwidth (-te_max_resv_bw). Each value will be less than or equal to the maximum reservable bandwidth. The default is 100000 bytes per second.

-te_unresv_bw_priority1

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 1. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority2

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 2. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority3

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 3. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority4

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 4. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority5

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 5. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority6

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 6. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-te_unresv_bw_priority7

(OSPFv2 only) Specifies the amount of bandwidth not yet reserved at priority level 7. Possible values range from 1 to 2147483647. The default is 100000 bytes per second.

-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). The default is 1. 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. The default is 1.

-vlan_id_mode

For multiple neighbor configurations, configures the VLAN ID mode to “fixed” or “increment.” If you set this argument to “increment,” then you must also specify the -vlan_id_step argument to indicate the step size.

-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 0 to 4095. You must specify the step when the -count argument is greater than 1.

-vlan_user_priority

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

-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 0 to 4095. 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.

-interface_id

Specifies to identify an interface on a router. Used in the Router, Network, and Link LSAs to describe the link between the DUT and the emulated router. Used as the source address for OSPFv3 packets to identify the interface advertising the routes. Possible values range from 0 to 4294967295. The default value is 0.

-enable_extended_lsa

Specifies to enable or disable OSPFv3 Extended LSAs related functions on the device. Possible values are true and false. The default is false.

-extended_lsa_mode

Specifies the OSPFv3 extended LSA mode. You must set -enable_extended_lsa to true. Possible values are:

none                            Legacy LSAs are originated
                                and sent out

mixed_mode_originate_only       Extended and Legacy LSAs are
                                originated and sent out

mixed_mode_originate_spf        Extended and Legacy LSAs are
                                originated and sent out

full                            Extended LSAs are originated and
                                sent out

The default value is full.

-area_extended_lsa_mode

Specifies the OSPFv3 area extended LSA mode. You must set -enable_extended_lsa to true. Possible values are:

inherit_global                  Area Extended LSA support is
                                inherited from Extended LSA support

none                            Legacy link and area scoped
                                LSAs are originated and sent out

mixed_mode_originate_only       Extended and Legacy link and area
                                scoped LSAs are originated and
                                sent out

mixed_mode_originate_spf        Extended and Legacy link and area
                                scoped LSAs are originated and
                                sent out

full                            Extended link and area scoped LSAs
                                are originated and sent out

The default value is inherit_global.

-advertise_lsa

Specifies which LSAs this emulated OSPFv3 router advertises. Possible values are:

reachable_lsas                  The router advertises only the routers
                                it can reach through the simulated topology

all_lsas                        The router advertises all LSAs in the area

The default value is all_lsas.

-flood_delay

Specifies the flood interval (in milliseconds) that controls the rate at which LSAs are generated by each emulated OSPFv3 router (that is, inter-LSA delay). Possible values range from 20 to 2147483647. The default value is 100.

-state_max_load

Specifies to request all LSAs from the DUT during the database exchange process. This exerts the maximum possible load on the DUT. Possible values are true and false. The default is false.

-guarantee_delivery

Determines how LSA configuration changes are handled. Possible values are:

true                    Protocol will transmit LSA configuration
                        changes in one or more LS Update packets.
                        The protocol will wait for acknowledgment
                        or the Retransmit Interval before sending
                        the next packet.

false                   Protocol will transmit LSA configuration
                        changes in one or more LS Update packets
                        separated by the interval defined in the
                        Flood Delay field. The protocol will not
                        wait for acknowledgment before sending
                        the next packet.

The default value is false.

Arguments Unsupported by Save as HLTAPI

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

-handle
-area_id_step
-count
-mac_address_start
-mac_address_step
-intf_ip_addr_step
-gateway_ip_addr_step
-router_id_step

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper

-mac_address_init

The MAC address that will be configured on the Spirent TestCenter interface

-neighbor_intf_ip_addr

The IP address of the DUT OSPF interface. The default value is 0.0.0.0 for OSPFv2, or 0:0:0:0::0 for OSPFv3.

-neighbor_intf_ip_addr_step

Step that will be used for incrementing the -neighbor_intf_ip_addr option. The default value is 0.0.0.0 for OSPFv2, or 0:0:0:0::0 for OSPFv3.

-loopback_ip_addr

Defines the IP address of the loopback interface for MPLS VPN testing. The default value is 0.0.0.0.

-loopback_ip_addr_step

IP address step of the loopback interface for MPLS VPN. The default value is 0.0.0.0.

-interface_handle

A handle or a list of the handles that are returned from the -interface_config call.

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper

-lsa_discard_mode
-mtu
-reset
-validate_received_mtu
-vlan
-neighbor_router_id

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 attributes are specific to the Cisco HLTAPI but are not Supported by Spirent HLTAPI:

-gre_checksum
-gre_local_ip
-gre_remote_ip
-gre_tunnel
-host_route
-instance_id
-instance_id_step
-int_msg_exchange
-loopback_ip_addr
-loopback_ip_addr_step
-lsa_discard_mode
-max_lsas_per_pkt
-md5_key
-mtu
-neighbor_dr_eligibility
-neighbor_intf_ip_addr
-neighbor_intf_ip_add_step
-neighbor_router_id
-neighbor_router_id_step
-poll_interval
-te_enable
-te_router_id
-transmit_delay

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(s) of the OSPF router returned by the
                ``sth::emulation_ospf_config`` function when you use -mode
                create to create a new OSPF router. When you want to modify
                or delete the OSPF router, you specify the handle as the
                value to the -handle argument.

handle_list     A list of emulated devices enabled with OSPF routers created by the
                ``sth::emulation_ospf_config`` function 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_ospf_config function creates, enables, modifies, deletes, or disables an emulated OSPF router. Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.)

When you create an OSPF emulated router, use the -port_handle argument to specify the Spirent HLTAPI port that the emulated router will use for OSPF communication. (The port handle value is contained in the keyed list returned by the connect function.)

In addition to specifying the port handle (-port_handle), you must also provide the following arguments when you create an OSPF router:

-intf_ip_addr
-mode create
-router_id
-area_type
-area_id
-network_type

When you create an OSPF router, Spirent HLTAPI creates the router in memory and downloads the configuration to the card. To start the router, use the sth::emulation_ospf_control function with -mode start. OSPF communication begins with a discovery phase in which routers transmit Hello packets to identify themselves. Through the reception of Hello packets from other routers, a router discovers its neighbors. Two routers become neighbors by agreeing on the following criteria:

  • The connecting interfaces of the router are in the same area (Area ID)
  • The routers use the same type of authentication
  • How often they will exchange Hello packets to maintain the neighbor relationship
  • How long they will wait to hear from a neighbor before it is declared dead
  • The Stub Area Flag

On point-to-point and broadcast networks, the router discovers neighbors by sending Hello packets to the IP multicast address 224.0.0.5. On broadcast and non-broadcast, multi-access (NBMA) networks the Hello Protocol also elects a Designated Router (DR).

Once you start sessions, Spirent HLTAPI handles all of the message traffic for the emulated routers. During the test, use the sth::emulation_ospf_control function to stop and re-start individual routers. After you have created the routers for your test, use the sth::emulation_ospf_lsa_config function to set up link state advertisements.

Examples

#### HLTAPI for Tcl ####

The following example creates an OSPFv2 router on the specified port:

sth::emulation_ospf_config  \
       -port_handle $port(1) \
       -intf_ip_addr 134.231.242.112\
       -hello_interval 1\
       -router_priority 10\
       -session_type ospfv2 \
       -gateway_ip_addr 134.231.242.2\
       -area_id 10.01.12.24\
       -mode create

The above example produced the following output:

{{handle ospfv2routerconfig1} {status 1}}

The following example creates an OSPFv3 router on the specified port:

sth::emulation_ospf_config \
     -mode create \
     -port_handle $port(1) \
     -area_id 10.01.12.24\
     -intf_ip_addr 2000::2 \
     -hello_interval 1 \
     -router_priority 10 \
     -session_type ospfv3\
     -intf_prefix_length 27

The above example produced the following output:

{{handle ospfv3routerconfig1} {status 1}}

The following example creates an OSPFv3 router on the specified port when ip_version is 4_6:

set device_ret0 [sth::emulation_ospf_config\
               -mode                                             create\
               -ip_version                                       4_6\
               -session_type                                     ospfv3\
               -network_type                                     ptop\
               -option_bits                                      0x13\
               -port_handle                                      $port1\
               -hello_interval                                   10 \
               -lsa_retransmit_delay                             5 \
               -instance_id                                      0 \
               -router_priority                                  0 \
               -dead_interval                                    40 \
               -interface_cost                                   1 \
               -area_id                                          0.0.0.0 \
               -intf_ip_addr                                     2001::2 \
               -gateway_ip_addr                                  2001::3 \
               -intf_prefix_length                               64 \
               -router_id                                        192.0.0.1 \
               -mac_address_start                                00:10:94:00:00:01 \
               -intf_ipv4_addr                                   192.85.1.3 \
               -intf_ipv4_prefix_length                          24 \
               -gateway_ipv4_addr                                192.85.1.4 \
        ]

The above example produced the following output:

{{handle ospfv3routerconfig1} {status 1}}

The following example enables OSPF over a provided device:

puts "Config LDP--------------------"
set routerStatus [sth::emulation_ldp_config -mode            create \
                            -port_handle              $port1Handle \
                            -intf_ip_addr             13.25.0.2\
                            -loopback_ip_addr         13.25.0.1 \
                            -gateway_ip_addr          13.25.0.1\
                            -remote_ip_addr           13.25.0.2 \
                            -graceful_recovery_timer  55 \
                            -keepalive_interval       56 \
                            -reconnect_time           57 \
                            -recovery_time            58 \
                            -egress_label_mode        exnull \
                            -label_adv                on_demand \
                            -bfd_registration         1 \
                            ]
puts "LDP:  $routerStatus"
keylget routerStatus handle router

puts "Config OSPF--------------------"
set routerStatus [sth::emulation_ospf_config \
                            -mode                  create \
                            -handle                $router\
                            -session_type          ospfv2 \
                            -area_id               0.0.0.0 \
                            -network_type          ptop \
                            -count                 1 \
                            -router_priority       0 \
                            -interface_cost        1 \
                            -lsa_retransmit_delay  5 \
                            -dead_interval         40 \
                            -area_type             stub \
                            -demand_circuit        1 \
                            -te_max_bw             5000 \
                            -te_admin_group        5000 \
                            -option_bits           0x24 \
                            -bfd_registration      1 \
                          ]
puts "OSPF:  #$routerStatus"

Sample output for example shown above:

Config LDP--------------------
LDP:  {handle router1} {handles router1} {status 1}
Config OSPF --------------------
OSPF: {session_router ospfv2routerconfig1} {handle router1}
     {handles router1} {status 1}

Sample input for Scaling mode with -handle option:

set hnd [keylget int_ret0 param_handle]
# param_handle returned from sth::interface_config
puts "Param List: $int_ret0"

# OSPF devices
set rtn [sth::emulation_ospf_config \
    -mode                    activate\
    -handle                  "$hnd"\
    -session_type            ospfv2\
    -authentication_mode     none\
    -network_type            broadcast\
    -router_priority         1\
    -area_id                 0.0.0.0\
    -graceful_restart_enable 0\
    -graceful_restart_type   none\
    -expand                  true]

Sample Output:

{handle_list {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4}}
{ospfv2_handle_list {ospfv2routerconfig1 ospfv2routerconfig2 ospfv2routerconfig3
ospfv2routerconfig4}} {ospfv3_handle_list {}} {handle {}} {handles {}} {status 1}

Sample input for Scaling mode(activate) with -expand, -port_handle and -block_mode options:

# OSPF devices
 set ospf_ret [sth::emulation_ospf_config \
          -mode                           activate\
          -port_handle                    $port1\
          -count                          5\
          -block_mode                     ONE_DEVICE_PER_BLOCK\
          -block_name_index               1\
          -session_type                   ospfv2\
          -intf_ip_addr                   10.10.10.2\
          -authentication_mode            none\
          -network_type                   broadcast\
          -router_priority                1\
          -area_id                        0.0.0.0\
          -graceful_restart_enable        0\
          -graceful_restart_type          none\
          -expand                         true \
        ]

Sample Output:

{param_handle emulateddevicegenparams1} {status 1} {handle_list {emulateddevice21
emulateddevice22 emulateddevice23 emulateddevice24 emulateddevice25}} {ospfv2_handle_list
{ospfv2routerconfig1 ospfv2routerconfig2 ospfv2routerconfig3 ospfv2routerconfig4
ospfv2routerconfig5}} {ospfv3_handle_list {}} {handle {}} {handles {}}

#### HLTAPI for Python ####

To create an OSPFv2 router on the specified port:

device_ret0 = sth.emulation_ospf_config (
             mode                = 'create',
             session_type        = 'ospfv2',
             authentication_mode = 'none',
             network_type        = 'native',
             option_bits         = '0x2',
             port_handle         = port_handle[0],
             router_id           = '192.0.0.1',
             mac_address_start   = '00:10:94:00:00:01',
             intf_ip_addr        = '192.85.1.3',
             gateway_ip_addr     = '192.85.1.1',
             intf_prefix_length  = '24',
             hello_interval      = '10',
             lsa_retransmit_delay= '5',
             te_metric           = '0',
             router_priority     = '0',
             te_enable           = '0',
             dead_interval       = '40',
             interface_cost      = '1',
             area_id             = '0.0.0.0',
             graceful_restart_enable= '0');

Sample Output:

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

To create an OSPFv3 router on the specified port:

device_ret0 = sth.emulation_ospf_config (
            mode                = 'create',
            ip_version          = '6',
            session_type        = 'ospfv3',
            network_type        = 'native',
            option_bits         = '0x13',
            port_handle         = port_handle[0],
            hello_interval      = '10',
            lsa_retransmit_delay= '5',
            instance_id         = '0',
            router_priority     = '0',
            dead_interval       = '40',
            interface_cost      = '1',
            area_id             = '0.0.0.0',
            intf_ip_addr        = '2001::2',
            gateway_ip_addr     = '2001::1',
            intf_prefix_length  = '64',
            router_id           = '192.0.0.1',
            mac_address_start   = '00:10:94:00:00:01');

Sample Output:

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

#### HLTAPI for Perl ####

To create an OSPFv2 router on the specified port:

my %device_ret0 = sth::emulation_ospf_config (
             mode                => 'create',
             session_type        => 'ospfv2',
             authentication_mode => 'none',
             network_type        => 'native',
             option_bits         => '0x2',
             port_handle         => "$hport[1]",
             router_id           => '192.0.0.1',
             mac_address_start   => '00:10:94:00:00:01',
             intf_ip_addr        => '192.85.1.3',
             gateway_ip_addr     => '192.85.1.1',
             intf_prefix_length  => '24',
             hello_interval      => '10',
             lsa_retransmit_delay=> '5',
             te_metric           => '0',
             router_priority     => '0',
             te_enable           => '0',
             dead_interval       => '40',
             interface_cost      => '1',
             area_id             => '0.0.0.0',
             graceful_restart_enable=> '0');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'router1';
$VAR3 = 'handles';
$VAR4 = 'router1';
$VAR5 = 'status';
$VAR6 = '1';
$VAR7 = 'session_router';
$VAR8 = 'ospfv2routerconfig1';

To create an OSPFv3 router on the specified port:

my %device_ret0 = sth::emulation_ospf_config (
            mode                => 'create',
            ip_version          => '6',
            session_type        => 'ospfv3',
            network_type        => 'native',
            option_bits         => '0x13',
            port_handle         => "$hport[1]",
            hello_interval      => '10',
            lsa_retransmit_delay=> '5',
            instance_id         => '0',
            router_priority     => '0',
            dead_interval       => '40',
            interface_cost      => '1',
            area_id             => '0.0.0.0',
            intf_ip_addr        => '2001::2',
            gateway_ip_addr     => '2001::1',
            intf_prefix_length  => '64',
            router_id           => '192.0.0.1',
            mac_address_start   => '00:10:94:00:00:01');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'router1';
$VAR3 = 'handles';
$VAR4 = 'router1';
$VAR5 = 'status';
$VAR6 = '1';
$VAR7 = 'session_router';
$VAR8 = 'ospfv3routerconfig1';

Note

  1. OSPFv3 interfaces are per link instead of per IPv6 subnet. Two nodes can “talk OSPF” directly over a single link even if they do not share a common IPv6 subnet.
  2. IPv6 addresses are not present in packets, except in prefix LSA packets (Inter-Area Prefix LSAs and Intra-Area Prefix LSAs).
  3. In OSPFv3, neighboring routers are always identified by router ID. In OSPFv2, neighbors on broadcast and NBMA networks are identified by IPv4 addresses.
  4. In OSPFv3,router and network LSAs do not contain network prefixes. New prefix LSAs have “referenced” fields that determine which router or network LSA they are advertising prefixes on behalf of.
  5. OSPFv3 is enabled at the port level.

End of Procedure Header

sth::emulation_ospf_control

Purpose

Starts, stops, and controls flapping operations on an OSPF router. You can also use this function to withdraw a route or an LSA handle and to control route flapping.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_control
     [-mode {advertise|establish|flap|start|stop|restart|stop_hellos|
            resume_hellos|restore|shutdown}   M]
     [-handle <router_handle>]
     [-port_handle <port_handle>]
     [-flap_lsa {list of LSA handles}] |
     [-flap_routes {list of topology_elem_handles}]
       [-flap_count <int eger>]
       [-flap_down_time <integer>]
       [-flap_interval_time <integer>]
     [-age_lsa  {list of LSA handles}
     [-readvertise_lsa {list of LSA handles}
     [-withdraw_lsa {list of LSA handles}
     [-advertise {list of topology_elem_handles}]
     [-withdraw {list of topology_elem_handles}]

Arguments

-advertise

Not supported in this release. Advertises LSAs for topology elements.

-age_lsa

Specifies a list of LSA handles for which to withdraw the advertised LSA. For example:

::sth::emulation_ospf_control -age_lsa $hOspfLsaList.
-readvertise_lsa

Specifies the list of LSA handles to readvertise. For example: sth::emulation_ospf_control -readvertise_lsa $hOspfLsaList

-flap_count

Specifies the number of flaps for each LSA handle specified in the -flap_lsa argument and/or for each route handle specified by the -flap_route argument. Each flap includes one advertise and one withdraw operation. When you want to perform multiple flapping operations, you can define this argument.

-flap_down_time

During a flapping operation, specifies the period (in seconds) during which the LSAs or routes are withdrawn from their neighbors. The default is 60 seconds.

-flap_interval_time

During a flapping operation, the time (in seconds) between flap cycles. The default is 60 seconds.

-flap_lsa

A list of LSAs on which to perform flapping operations. When the mode argument is set to “flap” (-mode flap), you must also specify either the -flap_lsa or -flap_routes argument.

-flap_routes

Not supported in this release. Perform periodic route flapping on topology elements. When the mode argument is set to “flap” (-mode flap), you must also specify either the -flap_lsa or -flap_routes argument.

-handle

Identifies the router handle, returned from the sth::emulation_ospf_config function when creating an OSPF router.

-mode

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

start - Starts the OSPF router with the specified handle
       (-handle), or starts all of the OSPF routers associated
       with the port specified with -port_handle.

stop - Stops the OSPF router with the specified handle
       (-handle), or stops all of the OSPF routers associated
       with the port specified with -port_handle.

restart - Stops the OSPF router with the specified handle
       (-handle) and then starts it again, or stops and then
       restarts all OSPF routers associated with the port
       specified with -port_handle. This is not a graceful
       restart.

flap - Enables flapping on the LSA handles specified in the
       -flap_lsa argument and/or for each route handle specified by
       the -flap_route argument. This attribute withdraws the
       routes or LSAs for the time defined by -flap_down_time and
       then readvertises the routes or LSAs for the time defined by
       -flap_interval_time.

       If you specify "flap" for the -mode argument without
       defining -flap_count, Spirent TestCenter will perform the
       flapping operation only once. If you define -flap_count
       while you specify -mode flap, Spirent TestCenter will
       perform the flapping operation the number of times defined
       in the -flap_count argument.

       For example, if there is an OSPF session handle ospf_handle1
       and an LSA handle lsa_handle1, a 100-time flapping of this
       LSA can be processed by calling the following command::

        set cmdStatus [sth::emulation_ospf_control  -mode   flap \
                      -handle              ospf_handle1 \
                      -flap_lsa            lsa_handle1 \
                      -flap_interval_time  300 \
                      -flap_down_time      30 \
                      -flap_count          100]

advertise -  Advertises routes on specified routers after
             OSPF has been established

establish -  Establishes OSPF without advertising routes on
             the router specified by -handle, or
             on all routers associated
             with the port specified with -port_handle

stop_hellos -  Stops sending OSPF Hello packets on the OSPF
               router with the specified handle (-handle), or
               on all OSPF routers associated
               with the port specified with -port_handle

resume_hellos - Resumes sending Hello packets on the OSPF
                router with the specified handle (-handle), or
                on all OSPF routers associated
                with the port specified with -port_handle

restore   -  Restores router commands on the OSPF
             router with the specified handle (-handle), or
             on all OSPF routers associated
             with the port specified with -port_handle


shutdown  -  Shuts down router commands on the OSPF
             router with the specified handle (-handle), or
             on all OSPF routers associated
             with the port specified with -port_handle
-port_handle

Specifies the handle for the port to be controlled. That is, the port on which all OSPF routers should be started, stopped, or restarted.

-withdraw

Not supported in this release.

-withdraw_lsa

Specifies the list of LSA handles to withdraw.

Cisco-specific Arguments

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

-advertise_lsa

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_ospf_control function controls the starting and stopping of OSPF routers as well as withdrawing LSAs.

Note

Because Spirent HLTAPI advertises only at the router level, not at the LSA level, all (both specified and unspecified) LSAs associated with the specified LSA’s router(s) will be readvertised.

Examples

#### HLTAPI for Tcl ####

To start an OSPF router:

sth::emulation_ospf_control \
     -mode start \
     -handle Ospfv2RouterConfig1

To stop an OSPF router:

sth::emulation_ospf_control -mode stop -handle Ospfv2RouterConfig1

To restart an OSPF router:

sth::emulation_ospf_control -mode restart -handle Ospfv2RouterConfig1

Sample Output:

{status 1}

#### HLTAPI for Python ####

To start an OSPF router::
ctrl_ret1 = sth.emulation_ospf_control (
handle = device_list, mode = ‘start’);

Sample Output:

{'status': '1'}

#### HLTAPI for Perl ####

To start an OSPF router:

my %ctrl_ret1 = sth::emulation_ospf_control (
             handle              => "$device_list",
             mode                => 'start');
Sample Output:
$VAR1 = ‘status’; $VAR2 = ‘1’;

Note

  1. Graceful restart is not available for this function.
  2. You can specify either the -mode or -withdraw_lsa argument but not both.

End of Procedure Header

sth::emulation_ospf_lsa_config

Purpose

Creates, modifies, or deletes a Link State Advertisement (LSA). When you add a route (see description for -mode), Spirent HLTAPI returns the LSA handle in a keyed list with “lsa_handles” as the key.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_lsa_config
   [-mode {create|reset|modify|delete}  M]
   [-handle <router_handle>]
   [-lsa_handle <lsa_handle>]
   [-adv_router_id <a.b.c.d>]
   [-link_state_id <a.b.c.d>|<0-65535>]
   [-ls_age <0-3600>]
   [-ls_checksum {good|bad}
   [-ls_seq <0 - 0xffffffff>]
   [-options <hexadecimal> ]
   [-session_type {ospfv2|ospfv3}]
   [-return_details {0|1}]
   [-type asbr_summary]
      [-asbr_summary_route_category  {undefined|primary|secondary|unique|any}]
   [-type ext_pool]]
      [-external_number_of_prefix  <numeric>]
      [-external_prefix_forward_addr <a.b.c.d>|<a:b:c:d:e:f:g:h>]
      [-external_prefix_length <1-128>]
      [-external_prefix_metric <1-16777215>]
      [-external_prefix_start <a.b.c.d>|<a:b:c:d:e:f:g:h>]
      [-external_prefix_step <integer>]
      [-external_prefix_type  {{1|2}|{0|1} }]
      [-external_prefix_route_category {undefined|primary|secondary|unique|any}]
   [-type network]
      [-attached_router_id <a.b.c.d>]
      [-net_attached_router {create|delete|reset}]
      [-net_prefix_length <1-128> ]
      [-net_route_category {undefined|primary|secondary|unique|any}]
      [-network_route_category  {undefined|primary|secondary|unique|any}]
    [-type nssa_ext_pool]
      [-nssa_number_of_prefix <numeric>]
      [-nssa_prefix_forward_addr <a.b.c.d>|<a:b:c:d:e:f:g:h>]
      [-nssa_prefix_length  <1-128>]
      [-nssa_prefix_metric  <1-16777215>]
      [-nssa_prefix_start <a.b.c.d>|<a:b:c:d:e:f:g:h>]
      [-nssa_prefix_step    <numeric>]
      [-nssa_prefix_type    {{1|2}|{0|1} }]
      [-nssa_prefix_route_category  {undefined|primary|secondary|unique|any}]
    [-type router]
      [-ls_route_category  {undefined|primary|secondary|unique|any}]
      [-router_abr {0|1}]
      [-router_asbr {0|1}]
      [-router_link_data <a.b.c.d>]
      [-router_link_id  <a.b.c.d>]
      [-router_link_step <a.b.c.d>]
      [-router_link_count <numeric>]
      [-router_link_count_per_router <numeric>]
      [-router_link_neighbor_if_id <numeric>]
      [-router_link_idx  <numeric>]
      [-router_link_metric  <1-65535>]
      [-router_link_mode {create|delete|reset}]
      [-router_link_type {ptop|transit|stub|virtual}]
      [-router_virtual_link_endpt {0|1} ]
      [-router_route_category {undefined|primary|secondary|unique|any}]
    [-type summary_pool]
      [-summary_number_of_prefix <numeric>]
      [-summary_prefix_length <1-128>]
      [-summary_prefix_metric <1-65535>]
      [-summary_prefix_start <a.b.c.d>|<a:b:c:d:e:f:g:h>]
      [-summary_prefix_step   <numeric>]
      [-summary_route_category {undefined|primary|secondary|unique|any}]
   [-type  intra_area_prefix]
      [-intra_area_adv_router_id <a.b.c.d>]
      [-intra_area_age <0-3600>]
      [-intra_area_checksum <good|bad>]
      [-intra_area_link_state_id <NUMERIC>]
      [-intra_area_seq_num <0-0xffffffff>]
      [-intra_area_prefix_start <IPv6>]
      [-intra_area_prefix_step  <NUMERIC>]
      [-intra_area_number_of_prefix  <NUMERIC>]
      [-intra_area_prefix_length  <1-128>]
      [-intra_area_prefix_metric  <0-65535>]
      [-intra_area_prefix_options <nubit|labit|mcbit|pbit|unused4|unused5|unused6|unused7>]
      [-intra_area_route_category <undefined|primary|secondary|unique|any>]
      [-intra_area_ref_ls_type <0-9999>]
      [-intra_area_ref_link_state_id <NUMERIC>]
      [-intra_area_ref_advertising_router_id  <a.b.c.d>]
    [-type opaque_type_10]
      [-te_tlv_type link]
      [-te_link_id <a.b.c.d>]
      [-te_link_type {ptop|multiaccess}]
      [-te_tlv_type router]
      [-te_router_addr <a.b.c.d>]
      [-te_instance_id <instance of TE LSA> ]
      [-te_metric <0-2147483647>]
      [-te_local_ip <a.b.c.d>]
      [-te_remote_ip <a.b.c.d>]
      [-te_admin_group <1-4294967295>]
      [-te_max_bw <1-2147483647>]
      [-te_max_resv_bw <1-2147483647>]
      [-te_unresv_bw_priority0 <1-2147483647>]
      [-te_unresv_bw_priority1 <1-2147483647>]
      [-te_unresv_bw_priority2 <1-2147483647>]
      [-te_unresv_bw_priority3 <1-2147483647>]
      [-te_unresv_bw_priority4 <1-2147483647>]
      [-te_unresv_bw_priority5 <1-2147483647>]
      [-te_unresv_bw_priority6 <1-2147483647>]
      [-te_unresv_bw_priority7 <1-2147483647>]
  [-type router_info]
      [-router_info_adv_router_id <a.b.c.d>]
      [-router_info_age <0-3600>]
      [-router_info_checksum  {good|bad}]
      [-router_info_seq_num <hex>]
      [-router_info_instance <integer>]
      [-router_info_route_category {undefined|primary|secondary|unique|any}]
      [-router_info_opaque_type {traffic_engineering|router_information|extended_prefix|extended_link}]
      [-router_info_options {tbit|ebit|mcbit|npbit|eabit|dcbit|obit|unused7}]
      [-router_info_scope {link_local|area_local|area_system_wide}]
   [-type extended_prefix]
      [-extended_prefix_adv_router_id <a.b.c.d>]
      [-extended_prefix_age <0-3600>]
      [-extended_prefix_checksum <good|bad>]
      [-extended_prefix_seq_num <hex>]
      [-extended_prefix_instance <integer>]
      [-extended_prefix_options {tbit|ebit|mcbit|npbit|eabit|dcbit|obit|unused7}]
      [-extended_prefix_scope {link_local|area_local|area_system_wide}]
   [-type extended_link]
      [-extended_link_adv_router_id <a.b.c.d>]
      [-extended_link_age  <0-3600>]
      [-extended_link_checksum  {good|bad}]
      [-extended_link_seq_num   <hex>]
      [-extended_link_instance <integer>]
      [-extended_link_opaque_type {traffic_engineering|router_information|extended_prefix|extended_link}]
      [-extended_link_route_category {undefined|primary|secondary|unique|any}]
      [-extended_link_options {tbit|ebit|mcbit|npbit|eabit|dcbit|obit|unused7}]
      [-extended_link_scope {link_local|area_local|area_system_wide}]

Arguments

-asbr_summary_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. This argument is available when the route type is asbr_summary. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-adv_router_id

Specifies the OSPF router ID of the LSA’s originator. (the Advertising Router field in the LSA header). The default is 0.0.0.0. For router LSAs, this value is identical to the Link-state ID value. For network LSAs, this value is originated by the designated router. For summary LSAs, this value is originated by area border routers. For external/NSSA LSAs, this value is originated by AS boundary routers.

Spirent Extension (for Spirent HLTAPI only).

Router ID of the simulated router that will advertise this Opaque/TE LSA. The default is the IPv4 address from the router interface. See the description in -type for more information on the LSA.

Spirent Extension (for Spirent HLTAPI only).

Age of the Extended Link Opaque LSA, in seconds. This field is examined if a router receives two instances of an LSA with identical LS Sequence Numbers and LS Checksums. The value is 0 when the LSA is originated. The default value is 0.

Spirent Extension (for Spirent HLTAPI only).

Specifies whether the Extended Link Opaque LSA will be advertised with a good or bad checksum. Possible values are good and bad. The default is good.

Spirent Extension (for Spirent HLTAPI only).

Initial value of the LS sequence number in an Extended Link Opaque LSA header. It is used to detect old and duplicate LSAs. The larger the sequence number, the more recent the LSA. Possible Values range from 0 to 0xffffffff. The default value is 0x80000001.

Spirent Extension (for Spirent HLTAPI only).

Specifies the router’s OSPF instance for the Extended Link Opaque LSA. Not currently used by OSPFv2. The default value is 1.

Spirent Extension (for Spirent HLTAPI only).

Specifies the Opaque Type. Possible values are:

Value                      Description
traffic_engineering        Opaque Type is traffic_engineering
router_information Opaque Type is router_information
extended_prefix            Opaque Type is extended_prefix
extended_link              Opaque Type is extended_link

The default is traffic_engineering

Spirent Extension (for Spirent HLTAPI only).

Specifies the route category. This argument is available when the route type is extended_link. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default is undefined.

Spirent Extension (for Spirent HLTAPI only).

Specifies the 8-bit field of capabilities advertised with each prefix of the Extended Link Opaque LSA. Possible values are described below:

tbit      Type of Service
ebit      Describes the way AS-External LSAs are flooded
mcbit     Specifies whether IP multicast datagrams are forwarded
npbit     Specifies the handling of Type 7 LSAs
eabit     Specifies the router's willingness to receive and forward
          External-Attributes LSAs
dcbit     Specifies the router's handling of demand circuits
obit      Specifies the router's willingness to receive and forward
          Opaque LSAs used for OSPF traffic engineering (OSPF-TE)
          extensions
unused7   Not used

Spirent Extension (for Spirent HLTAPI only).

Specifies the flooding scope of the Extended Link Opaque LSA. Possible values are described below:

link_local          Type-9 Opaque LSA. Not flooded beyond the
                    local (sub)network
area_local          Type-10 Opaque LSA. Not flooded beyond the
                    borders of the associated area
area_system_wide    Type-11 Opaque LSA. The LSA is flooded
                    throughout the Autonomous System (AS)

The default value is area_local.

-extended_prefix_adv_router_id

Spirent Extension (for Spirent HLTAPI only).

Router ID of the simulated router that will advertise this Opaque/TE LSA. The default is the IPv4 address from the router interface. See the description in -type for more information on the LSA.

-extended_prefix_age

Spirent Extension (for Spirent HLTAPI only).

Age of the Extended Prefix Opaque LSA, in seconds. This field is examined if a router receives two instances of an LSA with identical LS Sequence Numbers and LS Checksums. The value is 0 when the LSA is originated. The default is 0.

-extended_prefix_checksum

Spirent Extension (for Spirent HLTAPI only).

Specifies whether the Extended Prefix Opaque LSA will be advertised with a good or bad checksum. Possible values are good and bad. The default is good.

-extended_prefix_seq_num

Spirent Extension (for Spirent HLTAPI only).

Initial value of the LS sequence number in an Extended Prefix Opaque LSA header. It is used to detect old and duplicate LSAs. The larger the sequence number, the more recent the LSA. Possible Values range from 0 to 0xffffffff. The default is 0x80000001.

-extended_prefix_instance

Spirent Extension (for Spirent HLTAPI only).

Specifies the router’s OSPF instance for the Extended Prefix Opaque LSA. Not currently used by OSPFv2. The default is 1.

-extended_prefix_options

Spirent Extension (for Spirent HLTAPI only).

8-bit field of capabilities advertised with each prefix of the Extended Prefix Opaque LSA. Possible values are described below:

tbit      Type of Service
ebit      Describes the way AS-External LSAs are flooded
mcbit     Specifies whether IP multicast datagrams are forwarded
npbit     Specifies the handling of Type 7 LSAs
eabit     Specifies the router's willingness to receive and forward
          External-Attributes LSAs
dcbit     Specifies the router's handling of demand circuits
obit      Specifies the router's willingness to receive and forward
          Opaque LSAs used for OSPF traffic engineering (OSPF-TE)
          extensions
unused7   Not used
-extended_prefix_scope

Spirent Extension (for Spirent HLTAPI only).

Specifies the flooding scope of the Extended Prefix Opaque LSA. Possible values are described below:

link_local          Type-9 Opaque LSA. Not flooded beyond the
                    local (sub)network
area_local          Type-10 Opaque LSA. Not flooded beyond the
                    borders of the associated area
area_system_wide    Type-11 Opaque LSA. The LSA is flooded
                    throughout the AS

The default value is area_local.

-external_number_of_prefix

Specifies the number of routes in a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool.

-external_prefix_forward_addr

Specifies the forwarding IP address for a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool. The default for IPv4 is 0.0.0.0, and the default for IPv6 is 0:0:0:0:0:0:0:0.

-external_prefix_length

Specifies the number of leading bits which form the network part of an IP address for a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool. Possible values for IPv4 addresses range from 1 to 32; the default is 24. Possible values for IPv6 addresses range from 1 to 128; the default is 64.

-external_prefix_metric

Specifies a metric value for a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool. Possible values range from 1 to 16777215.

-external_prefix_start

Specifies the starting IP address for a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool. The default for IPv4 is 0.0.0.0 and the default for IPv6 is 0:0:0:0:0:0:0:0.

-external_prefix_step

Specifies the amount by which to increment the network part of the first IP address to generate subsequent IP addresses belonging to different routes for a Type 5 external pool LSA. Use this argument only if you specified -type ext_pool.

-external_prefix_type

Specifies the type of external pool LSA metric by setting the E bit in the LSA header. For OSPFv2, possible values are 1 and 2. Specify 1 for type 1 (internal cost is added to external cost) or 2 for type 2 (external cost only). For OSPFv3, possible values are 0 (Metric is expressed in the same units as interface cost.) and 1 (Metric is considered larger than any intra-AS path). The default is 1. Use this argument only if you specified -type ext_pool.

-external_prefix_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. This argument is available when the route type is ext_pool. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-handle

Identifies the OSPF router on which the LSA is created.

-intra_area_adv_router_id

Specifies the simulated router that will advertise Intra-Area Prefix LSAs. The value must be in IPv4 format. The default is 0.0.0.0.

LSA identifier, chosen arbitrarily by the advertising router. The default value is 0.

-intra_area_age

Initial value of the LS Age in an Intra-Area Prefix LSA header. The default value is 0.

-intra_area_checksum

Determines whether the Intra-Area Prefix LSA will be advertised with a good or a bad checksum. A bad checksum indicates a corrupted LSA and is used for negative testing. Possible values are GOOD and BAD. The default is GOOD.

-intra_area_seq_num

Initial value of the LS sequence number in an Intra-Area Prefix LSA header. This value must be in hexadecimal format. The default is 0x80000001.

-intra_area_prefix_start

Specifies the starting IPv6 address. The default value is 2000::1.

-intra_area_prefix_step

Specifies the amount by which to increment the network part of the first IPv6 address to generate subsequent IPv6 addresses. The default value is 1.

-intra_area_number_of_prefix

Specifies the number of routes. The default value is 1.

-intra_area_prefix_length

Specifies the number of leading bits which form the network part of an IP address. Possible values range from 1 to 128. The default value is 64.

-intra_area_prefix_metric

Specifies a metric value for a type 9 Intra-Area Prefix LSA. Possible values range from 0 to 65535. The default value is 1.

-intra_area_prefix_options

8-bit field of capabilities advertised with each prefix. Possible values are described below:

Value      Description

NUBIT       NU (NU, Bit 1): No unicast capability bit. If set,
            the prefix is excluded from IPv6 unicast
            calculations.
LABIT       LA (LA, Bit 0): Local Address capability bit. If
            set, the prefix becomes an IPv6 interface address
            of the advertising router.
MCBIT       Multicast (MC, Bit 2):  Multicast capability bit.
            If set, the prefix is included in the IPv6
            multicast calculations.
PBIT        NSSA (N/P, 3): The Propagate (P) bit. Set this on
            the NSSA area prefixes that should be
            readvertised at the NSSA border.
UNUSED4     Unused bit
UNUSED5     Unused bit
UNUSED6     Unused bit
UNUSED7     Unused bit

The default value is 0.

-intra_area_route_category

Specifies the route type. Possible values are described below:

Value       Description

UNDEFINED   Undefined. The default category assigned to a
            manually created block.
PRIMARY     Primary. A preferred route that has duplicates
            (secondary routes)
Secondary   A less preferred backup route.
UNIQUE      Unique. Indicates that a single port in the test
            configuration advertises this route.
ANY         Any route

The default value is UNDEFINED.

-intra_area_ref_ls_type

Specifies the type of the referenced LSA. Possible values range from 0 to 9999. The default value is 0.

Specifies the LS ID of the LSA that carries additional information for the advertised route. The default value is 0.

-intra_area_ref_advertising_router_id

Specifies the ID of the router that originated the LSA or the designated router. The default value is 0.0.0.0.

For OSPFv2, this argument identifies the part of the routing domain being described by the LSA. Depending on the advertisement’s LS type, the link state ID takes on one of the following values:

Type 1    The originating router's Router ID.
Type 2    The IP interface address of the network's
          Designated Router.
Type 3    The destination network's IP address.
Type 4    The Router ID of the described AS boundary router.
Type 5    The destination network's IP address.
Type 7    The destination network's IP address.

For OSPFv3, this argument specifies a decimal number that is used as an interface index to uniquely identify a link. Possible values range from 0 to 65535. The default value is 0.

Note

Do not specify -link_state_id with Type 3 (summary_pool), Type 5 (ext_pool), or Type 7 (nssa_ext_pool) LSAs.

-lsa_handle

Identifies the LSA handle to modify or delete. You obtain the LSA handle from the sth::emulation_ospf_lsa_config function when you use -mode create.

-ls_age

Specifies the age of the LSA, in seconds. The LS Age field is examined if a router receives two instances of an LSA with identical LS sequence numbers and LS checksums. Possible values range from 0 to 3600. The default is 0.

-ls_checksum

Spirent Extension (for Spirent HLTAPI only).

Specifies whether the LSA will be advertised with a good or bad checksum. Possible values are good and bad. The default value is good.

-ls_seq

Specifies the LS sequence number, which is used to detect old and duplicate LSAs. The larger the sequence number, the more recent the LSA. The sequence number is a two-byte value. Possible values range from 0 to 0xffffffff. The default is 0x80000001.

-ls_route_category

Spirent Extension (for Spirent HLTAPI only).

(OSPFv3 Only) Specifies the route type. This argument is available when the route type is router. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-return_details

Spirent Extension (for Spirent HLTAPI only).

Specifies the value about whether to return the detailed LSA properties to users. Possible values are 0 or 1. The default value is 1.

-mode

Specifies the action to perform. You can create, modify, or delete an LSA, or delete all LSAs (reset). The modes are described below:

create   Creates a new Link State Advertisement. See the
         description of the -type argument for a list of LSAs
         that you can create. Use the -handle argument to
         specify the router under which the LSA is created.

modify   Modifies a Link State Advertisement. Use the
         -lsa_handle argument to specify the LSA to modify.

delete   Deletes a Link State Advertisement. Use the
         -lsa_handle argument to specify the LSA to delete.

reset   Deletes all LSAs under the router specified in the
        -handle argument.
-net_attached_router

Specifies whether to add an attached router to the network, delete an existing attached router from the network, or reset all the attached routers of the network. For create and delete mode, you must specify the -attached_router_id argument. Possible values are create, delete, and reset.

When you specify -mode create, you must also specify “create” for the -net_attached_router argument. However, when you specify -mode modify, then -net_attached_router can be either “delete” or “reset”.

-attached_router_id

Specifies the router ID of the emulated router that this NetworkLsa object is associated with. The value must be in IPv4 format.

-net_prefix_length

Specifies the number of leading bits which form the network part of an IP address. Possible values for IPv4 addresses range from 1 to 32; the default is 24. Possible values for IPv6 addresses range from 1 to 128. The default is 64.

-net_route_category

Spirent Extension (for Spirent HLTAPI only).

(OSPFv2 Only) Specifies the route type. Use this argument only if you specified -type network. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-network_route_category

Spirent Extension (for Spirent HLTAPI only).

(OSPFv3 Only) Specifies the route type. Use this argument only if you specified -type network. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-nssa_prefix_route_category

Spirent Extension (for Spirent HLTAPI only).

(OSPFv3 Only) Specifies the route type. Use this argument only if you specified -type nssa_ext_pool. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-nssa_number_of_prefix

Specifies the number of routes in a Type 7 NSSA area external pool LSA. Use this argument only if you specified -type nssa_ext_pool.

-nssa_prefix_forward_addr

Specifies the forwarding IP address for a Type 7 NSSA external pool LSA. Use this argument only if you specified -type nssa_ext_pool. The default for IPv4 is 0.0.0.0 and the default for IPv6 is 0:0:0:0:0:0:0:0.

-nssa_prefix_length

Specifies the number of leading bits which form the network part of an IP address for a Type 7 NSSA external pool LSA. Use this argument only if you specified “-type nssa_ext_pool”. Possible values for IPv4 addresses range from 1 to 32; the default is 24, Possible values for IPv6 addresses range from 1 to 128; the default is 64.

-nssa_prefix_metric

Specifies a metric value for a Type 7 NSSA external pool LSA. Use this argument only if you specified “-type nssa_ext_pool”. Possible values range from 1 to 16777215.

-nssa_prefix_start

Specifies the starting IP address for a Type 7 NSSA external pool LSA. Use this argument only if you specified -type nssa_ext_pool. The default for IPv4 is 0.0.0.0 and the default for IPv6 is 0:0:0:0:0:0:0:0.

-nssa_prefix_step

Specifies the amount by which to increment the network part of the first IP address to generate subsequent IP addresses belonging to different routes for a Type 7 NSSA external pool LSA. Use this argument only if you specified “-type nssa_ext_pool”.

-nssa_prefix_type

Specifies the type of NSSA external pool LSA metric by setting the E bit in the LSA header. For OSPFv2, possible values are 1 and 2. Specify 1 for type 1 (internal cost is added to external cost) or 2 for type 2 (external cost only). For OSPFv3, possible values are 0 (Metric is expressed in the same units as interface cost.) and 1 (Metric is considered larger than any intra-AS path). The default is 1. Use this argument only if you specified -type nssa_ext_pool.

-options

A bit mask that specifies the Options field settings in the LSAs. The Options field describes the optional OSPF capabilities of the router. Section A.2 in RFC 2328 describes the Options field for OSPFv2. Section A.2 in RFC 2740 describes the Options field for OSPFv3. Use hexadecimal for this value. The default for OSPFv2, 0x02, sets the E-bit (binary 00000010). The default for OSPFv3, 0x13, sets the R-bit, the E-bit, and the V6-bit (binary 000…010011). For OSPFv2, possible values for this argument are:

Value        Description

O: 0x40    This bit describes the router's willingness to
           receive and forward Opaque LSAs.

DC: 0x20   This bit describes the router's handling of demand circuits.

EA: 0x10   This bit describes the router's willingness to
           receive and forward External-Attributes-LSAs.

NP: 0x08  This bit describes the handling of Type-7 LSAs.

MC: 0x04  This bit describes whether IP multicast datagrams
          are forwarded.

E: 0x02   This bit describes the way AS-external-LSAs are
          flooded.  When this bit is set, the area type is
          external_capable; when this bit is cleared, the
          area type is stub.

For OSPFv3, possible values for this argument are:

Value        Description

R: 0x10   This bit indicates if the originator is an active
          router. If this is clear, routes that transit the
          advertising node cannot be computed.

V6: 0x01  If this bit is clear, the router/link should be
          excluded from IPv6 routing calculations.

Note that if you need multiple values for this argument, you can specify a hexadecimal that is equal to the sum of of the target values above. For example, 0x42 will set the E-bit and the O-bit for OSPFv2 at the same time.

-router_abr

Identifies the router as an area boundary router (ABR). Corresponds to the E (external) bit in router LSA. Possible values are 0 and 1. Specify 0 for false or 1 for true. The default is 0 (false). Use this argument only if you specified -type router.

-router_asbr

Identifies the router as an AS boundary router (ASBR). Corresponds to the B (border) bit in router LSA. Possible values are 0 and 1. Specify 0 for false or 1 for true. The default is 0 (false). Use this argument only if you specified -type router.

-router_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. This argument is available when the route type is router. Possible values are described below:

Value           Description

undefined       Undefined. The default category assigned to a
                manually created block

primary         Primary. A preferred route that has
                duplicates (secondary routes)

secondary       Secondary. A less preferred backup route

unique          Unique. Indicates that a single port in the test
                configuration advertises this route

any             Any route

The default value is undefined.

-router_info_adv_router_id

Spirent Extension (for Spirent HLTAPI only).

ID of the simulated router that will advertise this RI LSA. The value is the IP address of the router interface. See the description in -type for more information on the LSA.

-router_info_age

Spirent Extension (for Spirent HLTAPI only).

Age of the RI LSA, in seconds. Possible values range from 0 to 3600. The default value is 0.

-router_info_checksum

Spirent Extension (for Spirent HLTAPI only).

Specifies whether the LSA will be advertised with a good or bad checksum. Possible values are good and bad. The default value is good.

-router_info_seq_num

Spirent Extension (for Spirent HLTAPI only).

Initial value of the LS sequence number in the RI LSA header. It is used to detect old and duplicate LSAs. The larger the sequence number, the more recent the LSA. Possible values range from 0 to 0xffffffff. The default value is 0x80000001.

-router_info_instance

Spirent Extension (for Spirent HLTAPI only).

Specifies the router’s OSPF instance for the RI LSA. Now currently used by OSPFv2. The default value is 1.

-router_info_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. This argument is available when the route type is router_info. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-router_info_opaque_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the opaque type of the RILSA. Possible values are described below:

Value                      Description
traffic_engineering        Opaque Type is traffic_engineering
router_information Opaque Type is router_information
extended_prefix            Opaque Type is extended_prefix
extended_link              Opaque Type is extended_link

The default is traffic_engineering.

-router_info_options

Spirent Extension (for Spirent HLTAPI only).

8-bit field of capabilities advertised with each prefix of the RI LSA. Possible values are described below:

tbit      Type of Service
ebit      Describes the way AS-External LSAs are flooded
mcbit     Specifies whether IP multicast datagrams are forwarded
npbit     Specifies the handling of type 7 LSAs
eabit     Specifies the router's willingness to receive and forward
          External-Attributes LSAs
dcbit     Specifies the router's handling of demand circuits
obit      Specifies the router's willingness to receive and forward
          Opaque LSAs used for OSPF traffic engineering (OSPF-TE)
          extensions
unused7   Not used
-router_info_scope

Spirent Extension (for Spirent HLTAPI only).

Specifies the flooding scope of the RI LSA. Possible values are described below:

link_local          Type-9 Opaque LSA. Not flooded beyond the
                    local (sub)network
area_local          Type-10 Opaque LSA. Not flooded beyond the
                    borders of the associated area
area_system_wide    Type-11 Opaque LSA. The LSA is flooded
                    throughout the AS

The default value is area_local.

Specifies the data for a router link. For OSPFv2, this argument indicates the IP address of the network interface or the subnet mask.The default is 0.0.0.0. For OSPFv3, this argument corresponds to the interface ID of the router, and the value must be numeric. Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

Specifies the ID for a router link. For OSPFv2, the router link ID is a 32-bit value, represented in dot notation. (It is not an IP address.) The default is 0.0.0.0. For OSPFv3, the router link ID corresponds to the Neighbor Router ID. Possible values range from 0 to 4294967295. (Note that Spirent HLTAPI does not support Neighbor Interface ID for OSPFv3 Router LSA links) Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

Specifies the ID increment when multiple router links are created. The default is 0.0.0.1. Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

Specifies the number of router links to create under a router when emulating multiple router links with the step size specified by the -router_link_step option. The default is 1. Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

(OSPFv2 only) Specifies the number of links to create per router. The default is 1. Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

(OSPFv3 only)Specifies the neighbor interface ID. This uniquely identifies the neighboring router’s interface for the same link. The default is 0.

Specifies an index to an added router link. When a link is removed, the remaining links are re-indexed. Use this argument only if you specified -type router. and make sure -router_link_mode has been specified.

Defines the metric value for a router link. The metric value contributes to the overall cost of a route to a destination. (The metric is the cost associated with the output side of a router interface; the lower the cost, the more likely a router will be used to forward traffic.) Possible values range from 1 to 65535. The default is 1. Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

Specifies the action to be performed for a router LSA. Use this argument only if you specified -type router. Possible values are create, delete, or reset. The modes are described below:

create    Creates a router link. When you specify -mode
          create, you must also specify create for the
          -router_link_mode argument. However, when you specify
          -mode modify, -router_link_mode can be create, delete
          or reset. Also, when you specify -router_link_mode
          create, you must also use the -router_link_id,
          -router_link_data, -router_link_type, and
          -router_link_metric arguments.

delete   Deletes a router link. When you specify delete
         mode, you must also specify the -router_link_id
         argument.

reset    Deletes all the links under the router LSA.

Identifies the type of link. Possible values are:

ptop - A ptop (point-to-point) link is a physical or logical
     serial link between two routers. The link can be
     numbered (IP address is configured on the link) or
     unnumbered.

transit - A transit network link connects a router to a
     transit network. A transit network has more than one
     router attached to it, and it is capable of carrying
     data traffic for which the source and destination are
     outside of the local area.

stub - A stub network link connects a router to a stub
     network (not the same as a Stub Area). A stub network,
     or stub segment, has one router attached to it. One
     router attached to an Ethernet or Token Ring network is
     considered a link to a stub network.

virtual - A virtual link is a logical link connecting areas
     with no physical connections to the backbone. Virtual
     links are treated as numbered point-to-point links.

Use this argument only if you specified -type router, and make sure -router_link_mode has been specified.

Sets or unsets the router as a virtual link endpoint. A virtual link is a logical link connecting areas with no physical connections to the backbone. Virtual links are treated as numbered point-to-point links. Possible values are 0 and 1. The default is 0. Use this argument only if you specified -type router.

-session_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the type of OSPF to be emulated. This argument is only required when OSPFv2 LSA and OSPFv3 LSA are created on the same device. Possible values are ospfv2 and ospfv3.

-summary_number_of_prefix

Specifies the number of routes in the summary pool LSA. The default is 0. Use this argument only if you specified -type summary_pool.

-summary_prefix_length

Specifies the number of leading bits which form the network part of an IP address for the summary pool LSA. Possible values for IPv4 addresses range from 1 to 32; the default is 24, Possible values for IPv6 addresses range from 1 to 128; the default is 64, Use this argument only if you specified -type summary_pool.

-summary_prefix_metric

Defines the metric value for the summary pool LSA. The metric value contributes to the overall cost of a route to a destination. (The metric is the cost associated with the output side of a router interface; the lower the cost, the more likely a router will be used to forward traffic.) Possible values range from 1 to 65535. The default is 1. Use this argument only if you specified -type summary_pool.

-summary_prefix_start

Specifies the starting IP address for the summary pool LSA. The default for IPv4 is 0.0.0.0. The default for IPv6 is 0:0:0:0:0:0:0:0. Use this argument only if you specified -type summary_pool.

-summary_prefix_step

Specifies the increment to use to generate the network part of the first IP address as well as to generate subsequent IP addresses belonging to different routes for the summary pool LSA. Use this argument only if you specified -type summary_pool.

-summary_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. Use this argument only if you specified -type summary_pool. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-type

Specifies the type of LSA to create. Possible values and descriptions are as follows:

router

(Type 1) Describes the states and costs of the router’s interfaces. Indicates that the router is either an area border router (ABR) or an autonomous system boundary router (ASBR). The Options field is expanded to 24 bits for OSPFv3 LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-link_state_id  3.3.3.3  \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle $hOspfv2RouterHandle \
-mode create \
-type router \
-router_abr 1 \
-router_asbr 1 \
-router_link_data 5.5.5.5 \
-router_link_id 4.4.4.4 \
-router_link_count 5 \
-router_link_count_per_router 8 \
-router_link_step 0.0.0.1 \
-router_link_idx 2 \
-router_link_metric 300 \
-router_link_mode create \
-router_link_type stub \
-router_virtual_link_endpt  1

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 (interface ID) \
-link_state_id  64 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle $hOspfv3RouterHandle \
-mode create \
-type router \
-router_abr 1 \
-router_asbr 1 \
-router_link_data 4 \
-router_link_id 4.4.4.4 \
-router_link_idx 2 \
-router_link_metric 300 \
-router_link_mode create \
-router_link_type ptop \
-router_virtual_link_endpt  1
network

(Type 2) Originated by the link’s designated router (DR) for every broadcast or non-broadcast multi- access (NBMA) link having two or more attached routers. Lists all routers attached to the link.

OSPFv3 network LSAs have no address information and are network protocol independent. The Options field is expanded to 24 bits for OSPFv3 LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-link_state_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle $hOspfv2RouterHandle \
-mode create \
-type network \
-attached_router_id 2.2.2.2 \
-net_attached_router  create \
-net_prefix_length 24

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-link_state_id 64 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle $hOspfv3RouterHandle \
-mode create \
-type network \
-attached_router_id 2.2.2.2 \
-net_attached_router  create \
-net_prefix_length 24
summary_pool

(Type 3) Summary Pool (OSPFv2) and Inter-Area Prefix LSA (OSPFv3) describe routes to networks outside of the area. (In version 3, the Inter-Area (Prefix LSA replaces the Summary Pool LSA.) Originated by ABRs. Do not specify a link state ID for OSPFv2 summary pool LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-handle $hOspfv2RouterHandle \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-mode create \
-type summary_pool \
-summary_number_of_prefix 10 \
-summary_prefix_length 16 \
-summary_prefix_metric 5000 \
-summary_prefix_start 10.10.10.10 \
-summary_prefix_step 10

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-handle $hOspfv3RouterHandle \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-mode create \
-type summary_pool \
-summary_number_of_prefix 10 \
-summary_prefix_length 64 \
-summary_prefix_metric 5000 \
-summary_prefix_start CAFE::10 \
-summary_prefix_step 10
asbr_summary

(Type 4)For OSPFv2, describes routes to autonomous system boundary routers outside of the area in which the LSA is transmitted (flooded). Originated by area border routers (ABRs).

For OSPFv3, Inter-Area Router LSA, replaces the OSPFv2 AS Boundary Router Summary LSA. The Options field is expanded to 24 bits for OSPFv3 LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv2RouterHandle \
-mode create \
-type asbr_summary

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv3RouterHandle \
-mode create \
-type asbr_summary
ext_pool

(Type 5) Describes routes to destinations external to the AS. A default route for the AS can also be described by this type of LSA. Originated by AS boundary routers (ASBRs). Do not specify a link state ID for OSPFv2 external pool LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv2RouterHandle \
-mode create \
-type ext_pool \
-external_number_of_prefix 30 \
-external_prefix_forward_addr   40.40.40.40 \
-external_prefix_length   16 \
-external_prefix_metric   3000 \
-external_prefix_start  30.30.30.30 \
-external_prefix_step  30 \
-external_prefix_type   1

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-link_state_id 64 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv3RouterHandle \
-mode create \
-type ext_pool \
-external_number_of_prefix 30 \
-external_prefix_forward_addr   CFFF::40 \
-external_prefix_length   64 \
-external_prefix_metric   3000 \
-external_prefix_start  FFEE::30 \
-external_prefix_step  30 \
-external_prefix_type   1
nssa_ext_pool

(Type 7) Describes routes to destinations external to the AS, usually from a different protocol. Originated by AS boundary routers (ASBRs). Do not specify a link state ID for OSPFv2 NSSA external pool LSAs.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv2RouterHandle \
-mode create \
-type nssa_ext_pool \
-nssa_number_of_prefix   100 \
-nssa_prefix_forward_addr   40.40.40.40 \
-nssa_prefix_length   24 \
-nssa_prefix_metric  5000 \
-nssa_prefix_start  20.20.20.20 \
-nssa_prefix_step  20 \
-nssa_prefix_type  1

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-link_state_id 64 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv3RouterHandle \
-mode create \
-type nssa_ext_pool \
-nssa_number_of_prefix   100 \
-nssa_prefix_forward_addr   CFE0::1 \
-nssa_prefix_length   64 \
-nssa_prefix_metric  5000 \
-nssa_prefix_start  FFEE::20 \
-nssa_prefix_step  20 \
-nssa_prefix_type  1
intra_area_prefix

(Type 9 - OSPFv3 only) A router uses Intra-Area Prefix LSA to advertise IPv6 prefixes that are associated with: a) the router itself b) an attached stub network segment c) an attached transit network segment

You must provide the following arguments for this type of LSA in OSPFv3, as shown in this sample code snippet:

-type                               intra_area_prefix\
-intra_area_prefix_start            2002::2\
-intra_area_prefix_step             4\
-intra_area_number_of_prefix        10\
-intra_area_prefix_length           32\
-intra_area_prefix_metric           20\
-intra_area_prefix_options          "NUBIT|LABIT"\
-intra_area_route_category          unique\
-intra_area_ref_ls_type             8\
-intra_area_ref_link_state_id       25\
-intra_area_ref_advertising_router_id   1.1.1.1\
-handle                             $ospf_router0\
-mode                               create
opaque_type_10

(Type 10 - OSPFv2 only) Defined in RFC 2370 and used to convey traffic engineering information in OSPFv2. Traffic Engineering extensions to OSPF are defined in RFC 3630. The Traffic Engineering (TE) LSA (Type 10), describes routers, point-to-point links and multi-access network connections.

You must provide the following arguments for this type of LSA in OSPFv2, as shown in this sample code snippet:

-adv_router_id 1.1.1.1 \
-ls_age 300 \
-ls_checksum 5000 \
-ls_seq 7000 \
-handle  $hOspfv2RouterHandle \
-mode create \
-type opaque_type_10
extended_prefix
(OSPFv2 Only) OSPFv2 Extended Prefix LSA is a new Opaque LSA defined in RFC5250 to advertise additional prefix attributes. Multiple OSPFv2 Extended Prefix Opaque LSAs can be advertised by a single router. Flooding scope of the OSPFv2 Extended Prefix Opaque LSA depends on the content inside the LSA and is in control of the originating router.
extended_link
(OSPFv2 Only) OSPFv2 Extended Link Opaque LSA is a new Opaque LSA defined in RFC5250 to advertise additional prefix attributes. It has an area flooding scope. Multiple OSPFv2 Extended Link Opaque LSAs can be advertised by a single router in an area.
router_info
(OSPFv2 Only) Router Information (RI) LSA is a new Opaque LSA defined in RFC4970 to advertise optional capabilities of the OSPF routers in a link-scoped, area-scoped, or AS-scoped LSA. For existing OSPF capabilities, this advertisement will be used primarily for informational purposes. Future OSPF features could use the RI LSA as the sole mechanism for advertisement and discovery. The RI LSA will be originated initially when an OSPF router instance is created and whenever one of the advertised capabilities is configured or changed.
-te_tlv_type

Spirent Extension (for Spirent HLTAPI only).

Specifies the TLV type to create under the TE LSA (Type 10). This argument is Mandatory if -type opaque_type_10 is specified. Possible values are link or router. If you specify “link” for the TE LSA type, you must also provide values for the -te_link_id and te_link_type arguments. If you specify “router” for the TE LSA type, you must also provide the TE router address (-te_router_addr).

-te_instance_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the OSPF instance of the TE LSA. The instance ID is an arbitrary value used to maintain multiple Traffic Engineering LSAs. This argument is Mandatory whenever you create a new TE LSA.

-te_router_addr

Spirent Extension (for Spirent HLTAPI only).

Specifies the IPv4 address of the router Link Type-Length value (TLV). This argument is Mandatory if you specified “router” for the TE LSA type (-te_tlv_type).

Spirent Extension (for Spirent HLTAPI only).

Specifies the link ID of the Link Type-Length value (TLV). The link ID is a four-octet parameter, identical to the Link ID of the Router LSA. If you specified “ptop” (Point-to- Point) as the link type (-te_link_type), the link ID is the Router ID of the neighbor. If you specified “multiaccess”, then the link ID is the interface address of the designated router. This argument is Mandatory if you specified -te_tlv_type link. The default is 0.0.0.0.

Spirent Extension (for Spirent HLTAPI only).

Defines the type of the link. This argument is Mandatory if you specified -te_tlv_type link. Possible values are:

None - No link
ptop - Point-to-point link
multiaccess - Multi-access link

The default is ptop.

-te_metric

Spirent Extension (for Spirent HLTAPI only).

Defines the four-octet metric for the link TLV, which may be different than the standard OSPF metric for the link. This argument is Mandatory if you specified -te_tlv_type link. Possible values range from 0 to 2147483647. The default is 1.

-te_local_ip

Spirent Extension (for Spirent HLTAPI only).

Specifies the IP address of the interface corresponding to the link. This argument is Mandatory if you specified -te_tlv_type link.

-te_remote_ip

Spirent Extension (for Spirent HLTAPI only).

Specifies the IP address of the neighbor’s interface corresponding to the current link. The remote IP address and the local address are used to discern multiple parallel links between systems. This argument is Mandatory if you specified -te_tlv_type link.

-te_admin_group

Spirent Extension (for Spirent HLTAPI only).

Specifies the 4-octet bit mask assigned by the network administrator. Each bit corresponds to one administrative group assigned to the interface. This value is used to specify the administrative group of the traffic engineering link. This argument is Mandatory if you specified -te_tlv_type link. Possible values range from 1 to 4294967295. The default is 1.

-te_max_bw

Spirent Extension (for Spirent HLTAPI only).

Specifies the maximum bandwidth that can be used on the link from the emulated router. This argument is Mandatory if you specified -te_tlv_type link. Possible values range from 1 to 2147483647. The default is 100000.

-te_max_resv_bw

Spirent Extension (for Spirent HLTAPI only).

Specifies the maximum bandwidth that can be reserved on the link from the emulated router. This argument is Mandatory if you specified -te_tlv_type link. Possible values range from 1 to 2147483647. The default is 100000.

-te_route_category

Spirent Extension (for Spirent HLTAPI only).

Specifies the route type. This argument is available when the route type is opaque_type_10. Possible values are described below:

Value           Description
undefined       Undefined. The default category assigned to a
                manually created block
primary         Primary. A preferred route that has
                duplicates (secondary routes)
secondary       Secondary. A less preferred backup route
unique          Unique. Indicates that a single port in the test
                configuration advertises this route
any             Any route

The default value is undefined.

-te_unresv_bw_priority0

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 0. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority1

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 1. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority2

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 2. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority3

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 3. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority4

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 4. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority5

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 5. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority6

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 6. Possible values range from 1 to 2147483647. The default is 100000.

-te_unresv_bw_priority7

Spirent Extension (for Spirent HLTAPI only).

Specifies the amount of bandwidth not yet reserved at priority level 7. Possible values range from 1 to 2147483647. The default is 100000.

Arguments Unsupported by Save as HLTAPI

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

-extended_link_*  arguments
-extended_prefix_* arguments
-lsa_handle
-net_attached_router
-router_link_idx
-return_detail
-router_info_* arguments

Cisco-specific Arguments

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

-auto_ls_age
-auto_ls_checksum
-auto_ls_seq
-auto_update
-ls_checksum
-ls_type_function_code
-ls_type_s_bits
-ls_type_u_bit

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

lsa_handle     The handle returned by the function when you use -mode
               create to create a new LSA. When you want to modify or
               delete the LSA, you specify the handle as the value to the
               -lsa_handle argument

adv_router_id  <a.b.c.d>
router         The keyword "router" returns a list of links for an LSA of
                type "router".
links
     0.id      <link ID a.b.c.d>
     data      <link data a.b.c.d>
     type      {ptop|transit|stub|virtual}
     1.id      <link ID a.b.c.d>
     data      <link data a.b.c.d>

<idx=n>.id     <link ID a.b.c.d>
     data      <link data a.b.c.d>
     type      {ptop|transit|stub|virtual}

network        The keyword "network" returns a list of attached router IDs
                for a network LSA.

attached_router_ids      <list_of_a.b.c.d>

summary        The keyword "summary" returns a list of prefixes for a
               summary LSA pool.

external       The keyword "external" returns a list of prefixes for an
               external LSA pool.

nssa           The keyword "nssa" returns a list of prefixes for an NSSA
               LSA pool
num_prefix     <number of prefixes>
prefix_start    <a.b.c.d>
prefix_length   <n>
prefix_step     <a.b.c.d>

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

Description

The sth::emulation_ospf_lsa_config function creates, modifies, or deletes a Link State Advertisement (LSA). Use the -mode argument to specify the operation to perform. When you create an LSA, the function returns a handle to the newly created LSA. Use this handle as input for modify and delete mode operations.

The mode that you use determines the set of arguments that you use to configure the LSA.

When you specify -mode create, you must also use the -type argument to specify the type of LSA to create.

To provide prefix information, use the set of arguments that correspond to the type of LSA. For example, when you create an AS external LSA (-type ext_pool), you also specify prefix information by using the -external_prefix_length and -external_prefix_metric arguments. See the examples in the type argument for the Mandatory arguments for each LSA type. You specify the prefix information for the following types of LSAs:

  • summary_pool
  • ext_pool
  • nssa_pool

Every router sends a router LSA. Each router can only originate one router LSA. If your create another router LSA for the same originating router, it overwrites the previous one. That is how the stack works. If you create multiple Router LSAs, the stack does not combine the router links for you under the same originating router. However, you can create multiple router LSA links for the same router LSA. Also you can create multiple router LSAs for different originating routers. In this case, the advertising router’s ID must be different).

AS boundary routers send a single AS-external LSA for each AS external destination. To define routers in external areas, you must specify nssa_ext_pool or ext_pool in the -type argument.

Designated routers send network LSAs for any networks with which it is associated. To identify the routers attached to a network link, you must specify network in the -type argument.

Area border routers send a single summary LSA for each known inter-area destination. To describe routes to networks outside of the local area. you must specify summary_pool in the -type argument. To describe routes to AS boundary routers outside the local area, you must specify asbr_summary in the -type argument.

Examples

#### HLTAPI for Tcl ####

The following sample code snippet creates five LSAs connected to a router:

sth::emulation_ospf_lsa_config \
    -mode create \
    -type router \
    -adv_router_id [lindex $routerIpList $i] \
    -handle $hRouter($i) \
    -link_state_id [lindex $routerIpList $i] \
    -ls_age 0 \
    -ls_seq 80000001 \
    -router_abr 1 \
    -router_asbr 1 \
    -router_link_data 255.255.255.255 \
    -router_link_id [lindex $routerIpList $i] \
    -router_link_idx 1 \
    -router_link_count 5 \
    -router_link_step 0.0.0.1 \
    -router_link_metric 1 \
    -router_link_mode create \
    -router_link_type stub \
    -router_virtual_link_endpt 0

Sample output for the above example:

{status 1} {lsa_handle 362} {adv_router_id 18.18.18.18} {router {{links
{{{0-id 17.17.17.17} {data 255.255.255.255} {type stub}}
{{1-id 17.17.17.18} {data 255.255.255.255} {type stub}}
{{2-id 17.17.17.19} {data 255.255.255.255} {type stub}}
{{3-id 17.17.17.20} {data 255.255.255.255} {type stub}}
{{4-id 17.17.17.21} {data 255.255.255.255} {type stub}}}}}}

The following sample code snippet creates a router LSA link:

sth::emulation_ospf_lsa_config \
     -mode modify \
     -type router \
     -adv_router_id [lindex $routerIpList $i]\
     -lsa_handle $hLsaHandle($i)\
     -link_state_id [lindex $routerIpList $i]\
     -ls_age 0\
     -ls_seq 80000001\
     -router_abr 1\
     -router_asbr 1\
     -router_link_data 0.0.0.2\
     -router_link_id 50.50.50.50\
     -router_link_idx 2\
     -router_link_metric 1\
     -router_link_mode create\
     -router_link_type ptop \
     -router_virtual_link_endpt 0

The following sample code snippet creates a network LSA:

sth::emulation_ospf_lsa_config \
     -adv_router_id 18.18.18.18 \
     -handle Ospfv3RouterConfig1\
     -link_state_id 64 \
     -ls_age 300 \
     -ls_checksum 5000 \
     -ls_seq 7000 \
     -mode create \
     -type network \
     -attached_router_id 17.17.17.17 \
     -net_attached_router create \
     -net_prefix_length 64

Sample output for the above example:

{status 1} {lsa_handle networklsa1} {adv_router_id 18.18.18.18} {network
{{attached_router_ids 17.17.17.17}}}

The following sample code snippet creates an external LSA pool:

sth::emulation_ospf_lsa_config \
    -adv_router_id 1.1.1.1 \
    -handle Ospfv3RouterConfig1\
    -link_state_id 64 \
    -ls_age 300 \
    -ls_checksum 5000 \
    -ls_seq 7000 \
    -mode create \
    -type ext_pool \
    -external_number_of_prefix 30 \
    -external_prefix_forward_addr  CAFF::40 \
    -external_prefix_length   64 \
    -external_prefix_metric   3000 \
    -external_prefix_start  FFEE::30 \
    -external_prefix_step  30 \
    -external_prefix_type   1

Sample output for the above example:

{status 1} {lsa_handle router1} {adv_router_id 1.1.1.1}
{external {{num_prefx 30} {prefix_length 64} {prefix_start ffee::30}
{prefix_step 30}}
The following sample code snippet creates an external LSA pool, but not to

return details:

sth::emulation_ospf_lsa_config \
    -adv_router_id 1.1.1.1 \
    -handle Ospfv3RouterConfig1\
    -link_state_id 64 \
    -ls_age 300 \
    -ls_checksum 5000 \
    -ls_seq 7000 \
    -return_details 0\
    -mode create \
    -type ext_pool \
    -external_number_of_prefix 30 \
    -external_prefix_forward_addr  CAFF::40 \
    -external_prefix_length   64 \
    -external_prefix_metric   3000 \
    -external_prefix_start  FFEE::30 \
    -external_prefix_step  30 \
    -external_prefix_type   1

Sample output for the above example:

{status 1} {lsa_handle router1}

The following sample code snippet creates a type 9 LSA:

set device_ret0_asbr_summary2 [sth::emulation_ospf_lsa_config\
    -type                                   intra_area_prefix\
    -intra_area_prefix_start                2002::2\
    -intra_area_prefix_step                 4\
    -intra_area_number_of_prefix            10\
    -intra_area_prefix_length               32\
    -intra_area_prefix_metric               20\
    -intra_area_prefix_options              "NUBIT|LABIT"\
    -intra_area_route_category              unique\
    -intra_area_ref_ls_type                 8\
    -intra_area_ref_link_state_id           25\
    -intra_area_ref_advertising_router_id   1.1.1.1\
    -intra_area_adv_router_id                 1.1.1.1\
    -intra_area_link_state_id                 444\
    -intra_area_age                         33\
    -intra_area_checksum                     good\
    -intra_area_seq_num                     0x90001\
    -handle                                 $ospf_router0\
    -mode                                   create]

Sample output for the above example:

{status 1} {lsa_handle ospfv3intraareaprefixlsablk1} {adv_router_id 0.0.0.0}
{intraarea {{num_prefx 10} {prefix_length 32} {prefix_start 2002::2}
{prefix_step 4}}}

The following sample code snippet creates a type 10 LSA:

::sth::emulation_ospf_lsa_config
      -mode create \
      -handle $handle1 \
      -adv_router_id 1.1.1.1 \
      -ls_age 300 \
      -ls_checksum 5000 \
      -ls_seq 7000 \
      -type opaque_type_10 \
      -te_tlv_type router \
      -te_router_addr 10.10.10.10 \

Sample output for the above example:

{status 1} {lsa_handle telsa1} {adv_router_id 1.1.1.1}
{opaque_type_10 {{instance_id 1}
{RouterTlv {{te_router_addr 10.10.10.10}}}}

The following sample code snippet creates an OSPF RI LSA:

set device_ret0_router0 [sth::emulation_ospf_lsa_config\
        -type                      router_info\
        -handle                    $ospf_router0\
        -router_info_adv_router_id 192.0.0.1\
        -router_info_age           10\
        -router_info_checksum      good\
        -router_info_seq_num       0x800\
        -router_info_instance       1\
        -router_info_opaque_type    router_information\
        -router_info_route_category  secondary\
        -router_info_scope           area_local\
        -router_info_options         ebit\
        -mode                        create\
 ]

Sample output for the above example:

{status 1} {lsa_handle routerinfolsa1} {adv_router_id 0.0.0.0}

The following sample code creates an OSPF Extended Prefix LSA:

set device_ret0_extended_prefix [sth::emulation_ospf_lsa_config\
     -type                       extended_prefix\
     -handle                     $ospf_router0\
     -extended_prefix_instance       1\
     -extended_prefix_age            20\
     -extended_prefix_checksum       bad\
     -extended_prefix_seq_num        0x801\
     -extended_prefix_opaque_type    extended_prefix\
     -extended_prefix_adv_router_id  192.0.0.1\
     -extended_prefix_route_category unique\
     -extended_prefix_scope          area_local\
     -extended_prefix_options    "tbit|ebit|mcbit|npbit|eabit|dcbit|obit|unused7"\
     -mode                           create\
]

Sample output for the above example:

{status 1} {lsa_handle extendedprefixlsa1} {adv_router_id 0.0.0.0}

#### HLTAPI for Python ####

To create a OSPFv2 router LSA:

device_ret0_router0 = sth.emulation_ospf_lsa_config (
                type                = 'router',
                router_virtual_link_endpt= '0',
                router_asbr         = '0',
                link_state_id       = '0.0.0.0',
                router_abr          = '0',
                handle              = ospf_router0,
                mode                = 'create');

Sample Output:

{'status': '1', 'router': {'links': ''},
             'adv_router_id': '0.0.0.0', 'lsa_handle': 'routerlsa1'}

To create an OSPFv3 external LSA pool:

device_ret0_ext_pool4 = sth.emulation_ospf_lsa_config (
               external_prefix_step= '1',
               external_number_of_prefix= '1',
               external_prefix_start= '2000::1',
               external_prefix_length= '64',
               type                = 'ext_pool',
               external_prefix_type= '0',
               external_prefix_metric= '1',
               handle              = ospf_router0,
               mode                = 'create');

Sample Output:

{'status': '1', 'router': {'links': ''},
             'adv_router_id': '0.0.0.0', 'lsa_handle': 'ospfv3routerlsa1'}

#### HLTAPI for Perl ####

To create a OSPFv2 router LSA:

my %device_ret0_router0 = sth::emulation_ospf_lsa_config (
                type                => 'router',
                router_virtual_link_endpt=> '0',
                router_asbr         => '0',
                link_state_id       => '0.0.0.0',
                router_abr          => '0',
                handle              => "$ospf_router0",
                mode                => 'create');

Sample Output:

$VAR1 = 'lsa_handle';
$VAR2 = 'routerlsa1';
$VAR3 = 'status';
$VAR4 = '1';
$VAR5 = 'adv_router_id';
$VAR6 = '0.0.0.0';
$VAR7 = 'router';
$VAR8 = {
          'links' => '
'
        };

To create an OSPFv3 external LSA pool:

my %device_ret0_ext_pool4 = sth::emulation_ospf_lsa_config (
            external_prefix_step=> '1',
            external_number_of_prefix=> '1',
            external_prefix_start=> '2000::1',
            external_prefix_length=> '64',
            type                => 'ext_pool',
            external_prefix_type=> '0',
            external_prefix_metric=> '1',
            handle              => "$ospf_router0",
            mode                => 'create');

Sample Output:

$VAR1 = 'lsa_handle';
$VAR2 = 'ospfv3asexternallsablock1';
$VAR3 = 'status';
$VAR4 = '1';
$VAR5 = 'adv_router_id';
$VAR6 = '0.0.0.0';
$VAR7 = 'external';
$VAR8 = {
          'prefix_start' => '2000::1',
          'num_prefx' => '1',
          'prefix_step' => '1',
          'prefix_length' => '64'
        };

Note

A metric is a number that is used to specify the cost of the route, so that the best route (potentially among multiple routes to the same destination) can be selected.

End of Procedure Header

sth::emulation_ospf_lsa_generator

Purpose

The sth::emulation_ospf_lsa_generator function is a Spirent Extension created to constructs a topology based on the parameters you configured. The generator processes information and builds the topology in a consistent pattern. The process the LSA Generator uses to generate the configuration can be broken down into two phases. In the first phase, the LSA generator builds a topology of simulated routers attached to the specified emulated routers. After the simulated router topology is constructed, routes of different types are assigned to the specified emulated and/or simulated routers.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_lsa_generator
    [-handle <list of ospf_handles>]
    [-mode {create|delete}]
    [-topo_type {none|tree|grid|full_mesh|ring|hub_spoke}]
    [-session_type {ospfv2|ospfv3}]
    [-tree_num_simulated_routers <1-10000>]
    [-tree_intf_type {point_to_point|broadcast}]
    [-tree_max_intf_per_router <0-10000>]
    [-tree_max_routes_per_transit_network <2-10000>]
    [-grid_rows <1-10000>]
    [-grid_columns <1-10000>]
    [-grid_emulated_router_pos {attached_to_grid|member_of_grid}]
    [-grid_emulated_router_row_index <1-10000>]
    [-grid_emulated_router_col_index <1-10000>]
    [-full_mesh_num_of_routers <1-100>]
    [-full_mesh_emulated_router_pos {attached_to_mesh|member_of_mesh}]
    [-ring_num_of_routers <1-10000>]
    [-ring_emulated_router_pos {attached_to_ring|member_of_ring}]
    [-hub_spoke_num_of_routers <1-100>]
    [-hub_spoke_emulated_router_pos {attached_to_hub|member_hub|
                                   attached_to_spoke|member_spoke}]

OSPFv2 Route Generation Parameters
    [-ospfv2_ip_addr_start <a.b.c.d>]
    [-ospfv2_ip_addr_end <a.b.c.d>]
    [-ospfv2_create_num_point_to_point {true|false}]
    [-ospfv2_area_type {nssa|nssa_no_summary|regular|stub|stub_no_summary}]
    [-ospfv2_intf_addr_start <a.b.c.d>]
    [-ospfv2_intf_prefix_length <1-32>]
    [-ospfv2_enable_loopback_advertise {true|false}]
    [-ospfv2_router_id_start <a.b.c.d>]
    [-ospfv2_router_id_step <a.b.c.d>]
    [-delete_existing_routes {true|false}]
   Traffic Engineering (TE) Parameters
    [-ospfv2_enable_te {true|false}]
    [-ospfv2_te_max_bw  <1-4294967295>]
    [-ospfv2_te_group <1-4294967295>]
    [-ospfv2_te_bw_unit {bits_per_sec|bytes_per_sec|mbytes_per_sec}]
    [-ospfv2_sub_tlv {none|group|max_bw max_rsv_bw|unreserved|local_ip|
                      remote_ip|default_metric}]
    [-ospfv2_te_rsvr_bw  <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority0 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority1 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority2 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority3 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority4 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority5 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority6 <1-4294967295>]
    [-ospfv2_te_unresv_bw_priority7 <1-4294967295>]
   Segment Routing (SR) Parameters
    [-ospfv2_enable_sr {true|false}]
    [-ospfv2_sr_cap_sid_label_type {label|sid}]
    [-ospfv2_sr_cap_sid_label_base <integer>]
    [-ospfv2_sr_cap_sid_label_range <integer>]
    [-ospfv2_sr_prefix_sid_label_index <integer>]
    [-ospfv2_sr_prefix_sid_label_step <integer>]
    [-ospfv2_sr_adj_sid <integer>]
    [-ospfv2_sr_adj_sid_step <integer>]
    [-ospfv2_sr_adj_sid_enable {true|false}]
    [-ospfv2_sr_prefix_sid_enable {true|false}]
    [-ospfv2_sr_simplified_sr_enable  {true|false}]
    [-ospfv2_sr_prefix_sid_algo <0-255>]
    [-ospfv2_sr_use_value {true|false}]

OSPFv2 Stub Route Generation Parameters
    [-ospfv2_stub_emulated_routers {all|none}]
    [-ospfv2_stub_simulated_routers {all|edge|none}]
    [-ospfv2_stub_num_of_routes <integer>]
    [-ospfv2_stub_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv2_stub_dup_percent <0-100>]
    [-ospfv2_stub_ip_addr_start <a.b.c.d>]
    [-ospfv2_stub_ip_addr_end <a.b.c.d>]
    [-ospfv2_stub_enable_ip_addr_override {true|false}]
    [-ospfv2_stub_disable_route_aggr {true|false}]
    [-ospfv2_stub_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv2_stub_prefix_len_start <1-32>]
    [-ospfv2_stub_prefix_len_end <1-32>]
    [-ospfv2_stub_prefix_len_dist <0-100>]
    [-ospfv2_stub_primary_metric <1-65535>]
    [-ospfv2_stub_secondary_metric <1-65535>]

 OSPFv2 Summary Route Generation Parameters
    [-ospfv2_sum_emulated_routers {all|none}]
    [-ospfv2_sum_simulated_routers {all|edge|none}]
    [-ospfv2_sum_num_of_routes <integer>]
    [-ospfv2_sum_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv2_sum_dup_percent <0-100>]
    [-ospfv2_sum_ip_addr_start <a.b.c.d>]
    [-ospfv2_sum_ip_addr_end <a.b.c.d>]
    [-ospfv2_sum_enable_ip_addr_override {true|false}]
    [-ospfv2_sum_disable_route_aggr {true|false}]
    [-ospfv2_sum_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv2_sum_prefix_len_start <1-32>]
    [-ospfv2_sum_prefix_len_end <1-32>]
    [-ospfv2_sum_prefix_len_dist <0-100>]
    [-ospfv2_sum_primary_metric <1-65535>]
    [-ospfv2_sum_secondary_metric <1-65535>]

 OSPFv2 External Route Generation Parameters
    [-ospfv2_ext_emulated_routers {all|none}]
    [-ospfv2_ext_simulated_routers {all|edge|none}]
    [-ospfv2_ext_num_of_routes <ANY>]
    [-ospfv2_ext_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv2_ext_dup_percent <0-100>]
    [-ospfv2_ext_ip_addr_start <a.b.c.d>]
    [-ospfv2_ext_ip_addr_end <a.b.c.d>]
    [-ospfv2_ext_enable_ip_addr_override {true|false}]
    [-ospfv2_ext_disable_route_aggr {true|false}]
    [-ospfv2_ext_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv2_ext_prefix_len_start <1-32>]
    [-ospfv2_ext_prefix_len_end <1-32>]
    [-ospfv2_ext_prefix_len_dist <0-100>]
    [-ospfv2_ext_primary_metric <1-65535>]
    [-ospfv2_ext_secondary_metric <1-65535>]

  OSPFv3 Route Generation Parameters
    [-ospfv3_ip_addr_start <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_ip_addr_end <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_area_type {nssa|nssa_no_summary|regular|stub|stub_no_summary}]
    [-ospfv3_enable_router_id_adv {true|false}]
    [-ospfv3_router_id_start  <a.b.c.d>]
    [-ospfv3_router_id_step <a.b.c.d>]

  OSPFv3 Intra Route Generation Parameters
    [-ospfv3_intra_emulated_routers {all|none}]
    [-ospfv3_intra_simulated_routers {all|edge|none}]
    [-ospfv3_intra_num_of_routes <integer>]
    [-ospfv3_intra_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv3_intra_dup_percent <0-100>]
    [-ospfv3_intra_ip_addr_start <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_intra_ip_addr_end <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_intra_enable_ip_addr_override {true|false}]
    [-ospfv3_intra_disable_route_aggr {true|false}]
    [-ospfv3_intra_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv3_intra_prefix_len_start <1-128>]
    [-ospfv3_intra_prefix_len_end <1-128>]
    [-ospfv3_intra_prefix_len_dist <0-100>]
    [-ospfv3_intra_primary_metric <1-65535>]
    [-ospfv3_intra_secondary_metric <1-65535>]

  OSPFv3 Inter Route Generation Parameters
    [-ospfv3_inter_emulated_routers {all|none}]
    [-ospfv3_inter_simulated_routers {all|edge|none}]
    [-ospfv3_inter_num_of_routes < integer >]
    [-ospfv3_inter_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv3_inter_dup_percent <0-100>]
    [-ospfv3_inter_ip_addr_start <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_inter_ip_addr_end <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_inter_enable_ip_addr_override {true|false}]
    [-ospfv3_inter_disable_route_aggr {true|false}]
    [-ospfv3_inter_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv3_inter_prefix_len_start <1-128>]
    [-ospfv3_inter_prefix_len_end <1-128>]
    [-ospfv3_inter_prefix_len_dist <0-100>]
    [-ospfv3_inter_primary_metric <1-65535>]
    [-ospfv3_inter_secondary_metric <1-65535>]

  OSPFv3 External Route Generation Parameters
    [-ospfv3_ext_emulated_routers {all|none}]
    [-ospfv3_ext_simulated_routers {all|edge|none}]
    [-ospfv3_ext_num_of_routes < integer >]
    [-ospfv3_ext_weight_route_assign {byports|byrouters|byspeed}]
    [-ospfv3_ext_dup_percent <0-100>]
    [-ospfv3_ext_ip_addr_start <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_ext_ip_addr_end <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
    [-ospfv3_ext_enable_ip_addr_override {true|false}]
    [-ospfv3_ext_disable_route_aggr {true|false}]
    [-ospfv3_ext_prefix_len_dist_type {custom|exponential|fixed|internet|linear}]
    [-ospfv3_ext_prefix_len_start <1-128>]
    [-ospfv3_ext_prefix_len_end <1-128>]
    [-ospfv3_ext_prefix_len_dist <0-100>]
    [-ospfv3_ext_primary_metric <1-65535>]
    [-ospfv3_ext_secondary_metric <1-65535>]

Arguments

-handle

A list of handles of OSPF routers returned by the sth::emulation_ospf_config function

-mode

Specifies the action to perform. Possible values are create and delete. The default value is create.

-topo_type

Specifies the topology of the emulated/simulated network. The topology diagram and parameters are based on this selection. Possible values are:

Value          Description
none            No simulated routers are created. Routes can only
                be added to emulated routers

tree            Creates a tree topology which is distributed across
                all selected emulated routers

grid            Creates a grid topology on each selected
                emulated router

full_mesh       Creates a full mesh topology on each selected
                emulated router

ring            Creates a ring topology on each selected
                emulated router

hub_spoke       Creates a hub and spoke topology on each
                selected emulated router

The default value is tree.

-session_type

Specifies the session type. Possible values are:

ospfv2      Configures an OSPFv2 LSA wizard
ospfv3      Configures an OSPFv3 LSA wizard

The default value is ospfv2.

-tree_num_simulated_routers

Specifies the total number of simulated routers that will be created on all emulated routers. Possible values range from 1 to 10000. The default value is 50.

-tree_intf_type

Specifies the type of interface to use to connect simulated routers. Possible values are point_to_point and broadcast. The default value is point_to_point.

-tree_max_intf_per_router

Specifies the maximum number of interfaces for each simulated/emulated router. Possible values range from 1 to 10000. The default value is 4.

-tree_max_routes_per_transit_network

Specifies the maximum number of routers per transit network. This argument is available when -tree_intf_type is set to broadcast. Possible values range from 2 to 10000. The default value is 5.

-grid_rows

Specifies the number of rows in the grid. Possible values range from 1 to 10000. The default value is 4.

-grid_columns

Specifies the number of columns in the grid. Possible values range from 1 to 10000. The default value is 4.

-grid_emulated_router_pos

Specifies the location of the emulated router in the grid. Possible values are attached_to_grid and member_of_grid. The default value is attached_to_grid.

-grid_emulated_router_row_index

When -grid_emulated_router_pos is attached_to_grid, specifies the row index in the grid of the simulated router that the emulated router is attached to. When -grid_emulated_router_pos is member_of_grid, specifies the row index in the grid where the emulated router is located. Possible values range from 1 to 10000. The default value is 1.

-grid_emulated_router_col_index

When -grid_emulated_router_pos is attached_to_grid, specifies the column index in the grid of the simulated router that the emulated router is attached to. When -grid_emulated_router_pos is member_of_grid, specifies the column index in the grid where the emulated router is located Possible values range from 1 to 10000. The default value is 1.

-full_mesh_num_of_routers

Specifies the number of routers in the mesh. Possible values range from 1 to 10000. The default value is 4.

-full_mesh_emulated_router_pos

Specifies the location of the emulated router in the mesh. Possible values are attached_to_mesh and member_of_mesh. The default value is attached_to_mesh.

-ring_num_of_routers

Specifies the number of routers in the ring. Possible values range from 1 to 10000. The default value is 10.

-ring_emulated_router_pos

Specifies the location of the emulated router in the ring. Possible values are attached_to_ring and member_of_ring. The default value is attached_to_ring.

-hub_spoke_num_of_routers

Specifies the number of routers in the hub and spoke topology. Possible values range from 1 to 100. The default value is 10.

-hub_spoke_emulated_router_pos

Specifies the location of the emulated router in the hub and spoke topology. Possible values are attached_to_hub, member_hub, attached_to_spoke, and member_spoke. The default value is attached_to_hub.

OSPFv2 Route Generation Parameters (you must set -session_type to ospfv2)

-ospfv2_ip_addr_start

Specifies the starting IPv4 prefix value used for routes and interface addresses. The value must be in IPv4 format. The default value is 1.0.0.0.

-ospfv2_ip_addr_end

Specifies the ending IPv4 prefix value used for routes and interface addresses. The value must be in IPv4 format. The default value is 223.255.255.255.

-ospfv2_create_num_point_to_point

Once enabled, Spirent HLTAPI will generate numbered point-to-point links. For each link, the link ID is set to the connected router ID and the link data is set to the simulated interface’s IP address. The numbered link is coupled with the Stub network, with the link ID set to the link’s IP address and link data set to the link’s netmask. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_area_type

Determines the type of LSAs that are flooded within the area and the options that are set on the LSAs. Possible values are:

regular                 Regular areas support all LSA types
stub                    Stub areas do not flood external routes
                        into the area
stub_no_summary         Stub areas with no summary inter-area LSAs
nssa                    Not-So-Stubby-Areas (NSSA)
nssa_no_summary         Totally Not-So-Stubby-Areas

The default value is regular.

-ospfv2_intf_addr_start

Specifies the starting interface IP address for numbered point-to-point links. The default value is 1.0.0.1.

-ospfv2_intf_prefix_length

Specifies the interface prefix length for numbered point-to-point links. Possible values range from 1 to 32. The default value is 24.

-ospfv2_enable_loopback_advertise

Once enabled, Spirent HLTAPI will generate router LSAs that each contains a 32-bit Stub Network equal to the LSA’s Advertising Router ID field. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_router_id_start

Specifies the router ID used on the first emulated/simulated router. The value must be in IPv4 format. The default value is 1.0.0.1.

-ospfv2_router_id_step

Specifies the step value by which to generate subsequent router IDs. The value must be in IPv4 format. The default value is 0.0.0.1.

-delete_existing_routes

Specifies how to handle pre-existing routes when route/topology generator parameters are applied. Possible values are:

true       Delete pre-existing routes
false      Keep pre-existing routes

The default value is false

TE Parameters: (you must set -ospfv2_enable_te to true.)

-ospfv2_enable_te

Enable this argument to configure TE parameters. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_te_max_bw

Specifies the maximum bandwidth that can be used on the link from the emulated router. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_group

Specifies the TE group. Possible values range from 1 to 4294967295. The default value is 1.

-ospfv2_te_bw_unit

Specifies the bandwidth’s unit of measurement. Possible values are described below:

Value               Description
BITS_PER_SEC        Bits per second
BYTES_PER_SEC       Bytes per second
MBYTES_PER_SEC      Megabytes per second

The default value is bytes_per_sec.

-ospfv2_sub_tlv

Specifies the OSPFv2 sub-TLVs that carry the information about resources of routed links. Possible values are:

Value               Description
none                No sub-TLV
group               4-octet bit mask assigned by the network
                    administrator. Each bit corresponds to
                    one administrative group assigned to the
                    interface

max_bw              Maximum bandwidth that can be used on the
                    link from the emulated router max_rsv_bw
                    Maximum bandwidth that can be reserved on the link

unreserved          Amount of bandwidth not yet reserved at
                    each of the eight priority levels
                    local_ip IP address of the interface
                    corresponding to the current link

remote_ip           IP address of the neighbor's interface
                    corresponding to the current link

default_metric      Default metric

The default is none. Use “|” to combine multiple types.

-ospfv2_te_rsvr_bw

Specifies the maximum bandwidth that can be reserved on the link from the emulated router. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority0

Amount of bandwidth not yet reserved at priority level 0. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority1

Amount of bandwidth not yet reserved at priority level 1. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority2

Amount of bandwidth not yet reserved at priority level 2. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority3

Amount of bandwidth not yet reserved at priority level 3. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority4

Amount of bandwidth not yet reserved at priority level 4. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority5

Amount of bandwidth not yet reserved at priority level 5. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority6

Amount of bandwidth not yet reserved at priority level 6. Possible values range from 1 to 4294967295. The default value is 100000.

-ospfv2_te_unresv_bw_priority7

Amount of bandwidth not yet reserved at priority level 7. Possible values range from 1 to 4294967295. The default value is 100000.

SR Parameters (you must set -ospfv2_enable_sr to true.)

-ospfv2_enable_sr

Enables/disables SR on OSPF routes. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_sr_cap_sid_label_type

Specifies the format of the label. Possible values are:

label   20-bit label
sid     32-bit segment ID (SID)

The default value is label.

-ospfv2_sr_cap_sid_label_base

Specifies the value of the first label number. The default value is 100.

-ospfv2_sr_cap_sid_label_range

Specifies the number of labels/SIDs to create. The default value is 100.

-ospfv2_sr_prefix_sid_label_index

Specifies the value of the first SID or index. The default value is 0.

-ospfv2_sr_prefix_sid_label_step

Specifies the step value by which to generate subsequent SIDs The default value is 1.

-ospfv2_sr_adj_sid

Specifies the first adjacency SID. The default value is 9001.

-ospfv2_sr_adj_sid_step

Specifies the step value by which to generate subsequent adjacency SIDs. The default value is 1.

-ospfv2_sr_adj_sid_enable

Enables or disables segment routing adjacent SIDs. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_sr_prefix_sid_enable

Enables or disables segment routing prefix SIDs. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_sr_simplified_sr_enable

Enables or disables simplified segment routing. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_sr_prefix_sid_algo

Specifies the segment routing prefix SID algorithm. Possible values range from 0 to 255. The default is 0.

-ospfv2_sr_use_value

Determines whether to use the index or the absolute value. Possible values are true (absolute value) and false (index). The default value is false.

OSPFv2 Stub Route Generation Parameters

-ospfv2_stub_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv2_stub_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv2_stub_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv2_stub_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv2_stub_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv2_stub_ip_addr_start

Specifies the starting IPv4 address to use for generating the routes. The default value is 1.0.0.0.

-ospfv2_stub_ip_addr_end

Specifies the ending IPv4 address to use for generating the routes. The default value is 223.255.255.255.

-ospfv2_stub_enable_ip_addr_override

Once enabled, the starting/ending IPv4 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_stub_disable_route_aggr

Enables/disables IPv4 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv2_stub_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv2_stub_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_stub_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_stub_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv2_stub_primary_metric

Specifies the OSPF metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv2_stub_secondary_metric

Specifies the OSPF metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

OSPFv2 Summary Route Generation Parameters

-ospfv2_sum_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv2_sum_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv2_sum_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv2_sum_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv2_sum_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv2_sum_ip_addr_start

Specifies the starting IPv4 address to use for generating the routes. The default value is 1.0.0.0.

-ospfv2_sum_ip_addr_end

Specifies the ending IPv4 address to use for generating the routes. The default value is 223.255.255.255.

-ospfv2_sum_enable_ip_addr_override

Once enabled, the starting/ending IPv4 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_sum_disable_route_aggr

Enables/disables IPv4 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv2_sum_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv2_sum_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_sum_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_sum_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv2_sum_primary_metric

Specifies the OSPF metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv2_sum_secondary_metric
Specifies the OSPF metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

OSPFv2 External Route Generation Parameters

-ospfv2_ext_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv2_ext_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv2_ext_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv2_ext_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv2_ext_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv2_ext_ip_addr_start

Specifies the starting IPv4 address to use for generating the routes. The default value is 1.0.0.0.

-ospfv2_ext_ip_addr_end

Specifies the ending IPv4 address to use for generating the routes. The default value is 223.255.255.255.

-ospfv2_ext_enable_ip_addr_override

Once enabled, the starting/ending IPv4 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv2_ext_disable_route_aggr

Enables/disables IPv4 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv2_ext_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv2_ext_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_ext_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 32. The default value is 24.

-ospfv2_ext_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv2_ext_primary_metric

Specifies the OSPF metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv2_ext_secondary_metric

Specifies the OSPF metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

OSPFv3 Route Generation Parameters (you must set -session_type to ospfv3)

-ospfv3_ip_addr_start

Specifies the starting IPv6 address to use for generating OSPFv3 routes. The default value is 2000::.

-ospfv3_ip_addr_end

Specifies the ending IPv6 address to use for generating OSPFv3 routes. The default value is 3ffe::.

-ospfv3_area_type

Determines the type of LSAs that are flooded within the area and the options that are set on the LSAs. Possible values are:

regular                 Regular areas support all LSA types
stub                    Stub areas do not flood external routes
                        into the area
stub_no_summary         Stub areas with no summary inter-area LSAs
nssa                    Not-So-Stubby-Areas (NSSA)
nssa_no_summary         Totally Not-So-Stubby-Areas

The default value is regular.

-ospfv3_enable_router_id_adv

Enables/disables IPv6 router ID advertisement. Possible values are true (enable) and false (disable). The default value is false.

-ospfv3_router_id_start

Specifies the router ID used on the first emulated/simulated router. The value must be in IPv4 format. The default value is 1.0.0.1.

-ospfv3_router_id_step

Specifies the step value by which to generate subsequent router IDs. The value must be in IPv4 format. The default value is 0.0.0.1.

OSPFv3 Intra Route Generation Parameters

-ospfv3_intra_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv3_intra_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv3_intra_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv3_intra_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv3_intra_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv3_intra_ip_addr_start

Specifies the starting IPv6 address to use for generating the routes. The default value is 2000::.

-ospfv3_intra_ip_addr_end

Specifies the ending IPv6 address to use for generating the routes. The default value is 3ffe::.

-ospfv3_intra_enable_ip_addr_override

Once enabled, the starting/ending IPv6 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv3_intra_disable_route_aggr

Enables/disables IPv6 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv3_intra_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv3_intra_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_intra_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_intra_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv3_intra_primary_metric

Specifies the OSPFv3 metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv3_intra_secondary_metric

Specifies the OSPFv3 metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

OSPFv3 Inter Route Generation Parameters

-ospfv3_inter_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv3_inter_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv3_inter_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv3_inter_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv3_inter_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv3_inter_ip_addr_start

Specifies the starting IPv6 address to use for generating the routes. The default value is 2000::.

-ospfv3_inter_ip_addr_end

Specifies the ending IPv6 address to use for generating the routes. The default value is 3ffe::.

-ospfv3_inter_enable_ip_addr_override

Once enabled, the starting/ending IPv6 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv3_inter_disable_route_aggr

Enables/disables IPv6 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv3_inter_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv3_inter_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_inter_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_inter_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv3_inter_primary_metric

Specifies the OSPFv3 metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv3_inter_secondary_metric

Specifies the OSPFv3 metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

OSPFv3 External Route Generation Parameters

-ospfv3_ext_emulated_routers

Specifies which emulated routers will advertise routes. Possible values are:

all     Add routes on all emulated routers
none    No route will be added on the emulated routers

The default value is none.

-ospfv3_ext_simulated_routers

Specifies which simulated routers will advertise routes. Possible values are:

all         Add routes on all emulated routers
edge        Add routes to only the simulated routers that are on
            the edge of the topology
none        No route will be added on the emulated routers

The default value is all.

-ospfv3_ext_num_of_routes

Specifies the number of emulated routes that will be created based on the configuration. The default value is 0.

-ospfv3_ext_weight_route_assign

Determines how the total number of routes will be distributed. Possible values are:

BYPORTS     Equal number of routes are assigned to each port

BYSPEED     Number of routes assigned to each port is
            proportional to the speed (line rate) of the port.
            For example, a port with a speed of 100 Mbps will
            receive 10 times more routes than a port with a speed
            of 10 Mbps

BYROUTERS   Equal number of routes are assigned to each router

The default value is BYROUTERS.

-ospfv3_ext_dup_percent

Specifies the percentage of routes of this type that will be duplicated. Possible values range from 0 to 100. The default value is 0.

-ospfv3_ext_ip_addr_start

Specifies the starting IPv6 address to use for generating the routes. The default value is 2000::.

-ospfv3_ext_ip_addr_end

Specifies the ending IPv6 address to use for generating the routes. The default value is 3ffe::.

-ospfv3_ext_enable_ip_addr_override

Once enabled, the starting/ending IPv6 address values or default values will be used. Possible values are true (enable) and false (disable). The default value is false.

-ospfv3_ext_disable_route_aggr

Enables/disables IPv6 routes aggregation. Possible values are true (enable) and false (disable). The default value is false. This argument is available in the modify mode.

-ospfv3_ext_prefix_len_dist_type

Specifies how the number of routes will be distributed across the prefix lengths. Possible values are:

custom        Defines a custom percentage of routes for
              each prefix length

exponential   Routes are distributed across prefix lengths
              using an exponential algorithm

fixed         All routes have the same user-specified
              prefix length

internet      Routes are distributed across prefix lengths in
              a manner typical of the Internet's default-free
              router prefix distribution

linear        Routes are distributed equally across prefix
              lengths from the starting prefix length to
              the ending prefix length

The default value is fixed.

-ospfv3_ext_prefix_len_start

Specifies the starting prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_ext_prefix_len_end

Specifies the ending prefix for routes of this type. Possible values range from 1 to 128. The default value is 64.

-ospfv3_ext_prefix_len_dist

Specifies the percentage of routes to create for each prefix length. Possible values range from 0 to 100. The default value is 0.

-ospfv3_ext_primary_metric

Specifies the OSPFv3 metric used for primary and unique LSAs. Possible values range from 1 to 65535. The default value is 1.

-ospfv3_ext_secondary_metric

Specifies the OSPFv3 metric used for duplicate routes. This argument is valid when duplicate routes are present. Possible values range from 1 to 65535. The default value is 2.

Arguments Unsupported by Save as HLTAPI

This function is currently not supported by Save to HLTAPI.

Return Values

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

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

For OSPFv2:

handle                    Handle that identifies OSPFv2 route generator
                          parameters. Can be used in -mode delete as the input
                          handle

summary_lsa_block         List of handles of IPv4 Summary LSA blocks under a
                          specific OSPF router. Can be used to create traffic

external_lsa_block        List of handles of IPv4 External LSA blocks under a
                          specific OSPF router. Can be used to create traffic

stub_lsa_block            List of handles of IPv4 Stub LSA blocks under a
                          specific OSPF router. Can be used to create traffic
nssa_lsa_block            List of handles of IPv4 NSSA LSA blocks under a
                          specific OSPF router. Can be used to create traffic

For OSPFv3:

handle                     Handle that identifies OSPFv3 route generator parameters.
                          Can be used in -mode delete as the input handle

inter_lsa_block            List of handles of IPv6 Inter LSA blocks
                           under a specific OSPFv3 router. Can be used to
                           create traffic

intra_lsa_block            List of handles of IPv6 Intra LSA blocks under a
                           specific OSPFv3 router. Can be used to create traffic

external_lsa_block         List of handles of IPv6 External LSA blocks under a
                           specific OSPFv3 router. Can be used to create traffic

nssa_lsa_block             List of handles of IPv6 NSSA LSA blocks under a
                           specific OSPFv3 router. Can be used to create traffic

Description

The sth::emulation_ospf_lsa_generator function creates or deletes OSPF/OSPFv3 topologies and the LSAs, mapping the operations of the OSPF LSA Generator wizard in the Spirent TestCenter GUI.

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

Examples

The following example creates the specified LSAs:

set ospfLsaGenv6 [sth::emulation_ospf_lsa_generator\
        -handle $ospf_router0\
        -mode                             create\
        -topo_type                        grid\
        -session_type                     ospfv3\
        -grid_rows                        2\
        -grid_columns                     2\
        -grid_emulated_router_pos         member_of_grid\
        -grid_emulated_router_row_index   2\
        -grid_emulated_router_col_index   2\
        -ospfv3_ip_addr_start             2000::1\
        -ospfv3_ip_addr_end               3ffe::1\
        -ospfv3_area_type                 nssa\
        -ospfv3_enable_router_id_adv      true\
        -ospfv3_router_id_start           1.0.0.2\
        -ospfv3_router_id_step            0.0.0.1\
        -ospfv3_intra_emulated_routers    all\
        -ospfv3_intra_simulated_routers   edge\
        -ospfv3_intra_num_of_routes       2\
        -ospfv3_intra_weight_route_assign byports\
        -ospfv3_intra_dup_percent         30\
        -ospfv3_intra_ip_addr_start       2000::1\
        -ospfv3_intra_ip_addr_end         3ffe::1\
        -ospfv3_intra_enable_ip_addr_override true\
        -ospfv3_intra_disable_route_aggr  false\
        -ospfv3_intra_prefix_len_dist_type internet\
        -ospfv3_intra_prefix_len_start    10\
        -ospfv3_intra_prefix_len_end      10\
        -ospfv3_intra_prefix_len_dist     10\
        -ospfv3_intra_primary_metric      10\
        -ospfv3_intra_secondary_metric    10\
        -ospfv3_inter_emulated_routers    all\
        -ospfv3_inter_simulated_routers   edge\
        -ospfv3_inter_num_of_routes       2\
        -ospfv3_inter_weight_route_assign byports\
        -ospfv3_inter_dup_percent         30\
        -ospfv3_inter_ip_addr_start       2000::1\
        -ospfv3_inter_ip_addr_end         3ffe::1\
        -ospfv3_inter_enable_ip_addr_override true\
        -ospfv3_inter_disable_route_aggr    false\
        -ospfv3_inter_prefix_len_dist_type  internet\
        -ospfv3_inter_prefix_len_start      10\
        -ospfv3_inter_prefix_len_end        10\
        -ospfv3_inter_prefix_len_dist       10\
        -ospfv3_inter_primary_metric        10\
        -ospfv3_inter_secondary_metric      10\
        -ospfv3_ext_emulated_routers        all\
        -ospfv3_ext_simulated_routers       edge\
        -ospfv3_ext_num_of_routes           2\
        -ospfv3_ext_weight_route_assign     byports\
        -ospfv3_ext_dup_percent             30\
        -ospfv3_ext_ip_addr_start           2000::1\
        -ospfv3_ext_ip_addr_end             3ffe::1\
        -ospfv3_ext_enable_ip_addr_override true\
        -ospfv3_ext_disable_route_aggr      false\
        -ospfv3_ext_prefix_len_dist_type    internet\
        -ospfv3_ext_prefix_len_start        10\
        -ospfv3_ext_prefix_len_end          10\
        -ospfv3_ext_prefix_len_dist         10\
        -ospfv3_ext_primary_metric          10\
        -ospfv3_ext_secondary_metric       10\ ]

set Ospfv3Genhandle [keylget ospfLsaGenv6 handle]

Sample Output:

{status 1} {inter_lsa_block {ipv6networkblock1 #ipv6networkblock2}}
{intra_lsa_block {ipv6networkblock3 ipv6networkblock4 ipv6networkblock5}}
{nssa_lsa_block {ipv6networkblock6 ipv6networkblock7}}
{handle ospfv3lsagenparams1}

Sample input for Scaling mode:

puts "emulation_ospfv2_config: $rtn"

set hnd [keylget rtn handle_list]

set ospfLsaGenv4 [sth::emulation_ospf_lsa_generator\
    -handle $hnd\
    -mode create\
    -topo_type full_mesh\
    -session_type ospfv2\
    -full_mesh_num_of_routers 2\
    -full_mesh_emulated_router_pos member_of_mesh\
    -ospfv2_ip_addr_start 1.1.1.1\
    -ospfv2_ip_addr_end   224.255.255.255\
    -ospfv2_create_num_point_to_point  true\
    -ospfv2_area_type nssa\
    -ospfv2_intf_addr_start 1.1.1.2\
    -ospfv2_intf_prefix_length 28\
    -ospfv2_enable_loopback_advertise true\
    -ospfv2_router_id_start 1.1.1.1\
    -ospfv2_router_id_step  0.0.0.2\
    -ospfv2_stub_emulated_routers all\
    -ospfv2_stub_simulated_routers edge\
    -ospfv2_stub_num_of_routes 2\
    -ospfv2_sum_emulated_routers all\
    -ospfv2_sum_simulated_routers edge\
    -ospfv2_sum_num_of_routes 2\
    -ospfv2_ext_emulated_routers all\
    -ospfv2_ext_simulated_routers edge\
    -ospfv2_ext_num_of_routes 2]

puts "emulation_ospf_lsa_generator: $ospfLsaGenv4"

set status [keylget ospfLsaGenv4 status]

Sample Output:

{status 1} {summary_lsa_block {ipv4networkblock3 ipv4networkblock4}}
{stub_lsa_block {ipv4networkblock5 ipv4networkblock6 ipv4networkblock7
ipv4networkblock8 ipv4networkblock9 ipv4networkblock10 ipv4networkblock11
ipv4networkblock12 ipv4networkblock13 ipv4networkblock14 ipv4networkblock15
ipv4networkblock16 ipv4networkblock17 ipv4networkblock18 ipv4networkblock19
ipv4networkblock20 ipv4networkblock21 ipv4networkblock22}} {nssa_lsa_block
{ipv4networkblock1 ipv4networkblock2}}

End of Procedure Header

sth::emulation_ospf_tlv_config

Purpose

This function is a Spirent Extension created to configure, modify, or delete OSPF Type-Length-Values (TLVs)

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_tlv_config
    [-mode {create|modify|delete}   M]
    [-handle <handle>   M]
    [-type algorithm_tlv]
        [-handle <router_info_lsa_handle>]
        [-algorithms ]
    [-type sid_label_range_tlv]
        [-handle <router_info_lsa_handle>]
        [-sid_label_range_size <1 - 16777215>]
        [-sid_label_value <integer>]
        [-sid_label_value_type <label | sid>]
    [-type extended_prefix_tlv]
        -handle <extended_prefix_lsa_handle>
        [-extended_prefix_addr_family {ipv4_unicast}]
        [-extended_prefix_addr_prefix <a.b.c.d>]
        [-extended_prefix_prefix_length <0-32>]
        [-extended_prefix_route_type {unspecified|intra_area|inter_area
                                    |external|nssa_external}]
     [-type prefix_sid_tlv]
        [-handle <extended_prefix_tlv_handle>]
        [-prefix_sid_algorithm_value <integer>]
        [-prefix_sid_flags {nbit | npbit | mbit | ebit | vbit | lbit}]
        [-prefix_sid_index <integer>]
        [-prefix_sid_multi_topo_id <integer>]
        [-prefix_sid_range_size <1-65535>]
    [-type sid_label_binding_tlv]
        [-handle <extended_prefix_tlv_handle>]
        [-sid_label_binding_flags <MBIT>]
        [-sid_label_binding_multi_topo_id <integer>]
        [-sid_label_binding_range_size <1-65535>]
        [-sid_label_binding_weight <integer>]
        [-sid_label_binding_value <integer>]
        [-sid_label_binding_value_type {LABEL | SID}]
    [-type ero_tlv]
        [-handle <sid_label_binding_tlv_handle> ]
    [-type ipv4_ero_tlv]
        [-handle <ero_tlv_handle>]
        [-ipv4_ero_flags <lbit>]
        [-ipv4_ero_addr <a.b.c.d>]
    [-type extended_link_tlv]
        -handle <extended_link_lsa_handle>]
        [-extended_link_data <a.b.c.d>]
        [-extended_link_id <a.b.c.d>]
        [-extended_link_type {point_to_point|transit_network|stub_network|virtual_link}]

    [-type adj_sid_tlv]
        [-handle <extended_link_tlv_handle>   M]
        [-adj_sid_flags {bbit|vbit|lbit|sbit}]
        [-adj_sid_multi_topo_id <integer>]
        [-adj_sid_weight <integer>]
        [-adj_sid_value <integer>]
        [-adj_sid_value_type {label | sid}]
    [-type lan_adj_sid_tlv]
        [-handle <extended_link_tlv_handle>   M]
        [-lan_adj_sid_flags {bbit | vbit | lbit | sbit}]
        [-lan_adj_sid_multi_topo_id <integer>]
        [-lan_adj_sid_neighbor_id <a.b.c.d>]
        [-lan_adj_sid_weight <integer>]
        [-lan_adj_sid_value <integer>]
        [-lan_adj_sid_value_type {label | sid}]

Arguments

-mode

Specifies the action to perform. You can create, modify, or delete a TLV. This argument is Mandatory . The modes are described below:

create      Creates a new OSPF TLV. See the
            description of the -type argument for a list of TLVs
            that you can create. Use the -handle argument to
            specify the router or TLV handles under which the
            specified TLV must be created.

modify      Modifies an existing TLV. Use the
            -handle argument to specify the TLV to modify.

delete      Deletes a TLV. Use the -handle argument to specify
            the TLV to delete.
-handle

OSPF LSA handles received from the sth::emulation_ospf_lsa_config function, or TLV handles received from the current function, depending on the TLVs to be configured. This argument is Mandatory .

-type

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

adj_sid_tlv
Adjacency Segment Identifier (Adj-SID) is an optional sub-TLV of the Extended Link TLV. It may appear multiple times in the Extended Link TLV.
algorithm_tlv
Segment Routing (SR) Algorithm TLV. It is a TLV of the RI Opaque LSA, which allows a router to advertise algorithms that the router is currently using to other routers in an area.
ero_tlv
ERO Metric sub-TLV. It is a sub-TLV of the SID/Label Binding TLV. The ERO Metric sub-TLV carries the cost of an ERO path. It is used to compare the cost of a given source/destination path.
extended_prefix_tlv
OSPF Extended Prefix TLV, used to advertise additional attributes associated with the prefix. Multiple OSPF Extended Prefix TLVs may be carried in each OSPFv2 Extended Prefix Opaque LSA.
extended_link_tlv
OSPFv2 Extended Link TLV, used to advertise various attributes of the link. It describes a single link and is constructed of a set of sub-TLVs.
ipv4_ero_tlv
IPv4 ERO TLV, a sub-TLV of the SID/Label Binding sub-TLV.
lan_adj_sid_tlv
LAN Adj-SID TLV, an optional sub-TLV of the Extended Link TLV.
prefix_sid_tlv
Prefix SID TLV, a sub-TLV of the OSPF Extended Prefix TLV
sid_label_binding_tlv
SID/Label Binding TLV, a sub-TLV of the OSPF Extended Prefix TLV, used to advertise SID/Label mapping for a path to the prefix.
sid_label_range_tlv
SID/Label Range TLV, a TLV of RI Opaque LSA.
-algorithms

Specifies the algorithm for the SR-Algorithm TLV to calculate reachability. The available option is METRIC_BASED_SPF. The default value is METRIC_BASED_SPF. You must specify -type algorithm_tlv.

-sid_label_range_size

Size of the SID/Label range. Possible values range from 1 to 16777215. The default value is 100. You must specify -type sid_label_range_tlv.

-sid_label_value

Segment identifier of the SID/Label TLV. The value must be an integer. The default value is 16. You must specify -type sid_label_range_tlv.

-sid_label_value_type

Type of segment identifier of the SID/Label TLV. You must specify -type sid_label_range_tlv. Possible values are:

label   20-bit label
sid     32-bit SID

The default value is label.

-extended_prefix_addr_family

Specifies the address family for the OSPF Extended Prefix TLV. The available value is ipv4_unicast. You must specify -type extended_prefix_tlv. The default value is ipv4_unicast.

-extended_prefix_addr_prefix

Specifies the network address for the OSPF Extended Prefix TLV. You must specify -type extended_prefix_tlv. The value must be in IPv4 format. The default value is 192.0.1.0.

-extended_prefix_prefix_length

Specifies the prefix length for the OSPF Extended Prefix TLV. You must specify -type extended_prefix_tlv. Possible values range from 0 to 32. The default value is 24.

-extended_prefix_route_type

Specifies the router type for the OSPF Extended Prefix TLV. You must specify -type extended_prefix_tlv. Possible values are unspecified, intra_area, inter_area, external, and nssa_external. The default value is unspecified.

-prefix_sid_algorithm_value

Specifies the algorithm the Prefix-SID TLV is associated with. You must specify -type extended_prefix_tlv. The available value is 0 (IGP metric based SPT). The default value is 0.

-prefix_sid_flags

Specifies the required octet fields defined in the Prefix-SID TLV. You must specify -type extended_prefix_tlv. Possible values are described below:

nbit    Node-SID flag
npbit   No-PHP flag
mbit    Mapping Server flag
ebit    Explicit-Null flag
vbit    Value/Index flag
lbit    Local/Global flag

Use “|” to specify multiple flags.

-prefix_sid_index

Specifies the offset to the advertised SID/Label range. The value must be an integer. You must specify -type extended_prefix_tlv. The default value is 0.

-prefix_sid_multi_topo_id

Specifies the Multi-Topology ID for the Prefix-SID TLV. You must specify -type extended_prefix_tlv. Possible values range from 0 to 255. The default value is 0. The values are described below:

Values          Description

0           Reserved for advertising the metric associated with
            the default topology
1           Reserved for advertising the metric associated with
            the default multicast topology
2           Reserved for IPv4 in-band management purposes
3-31        Reserved for assignments by IANA
32-127      Reserved for development, experimental, and proprietary
            features
128-255     Invalid and should be ignored
-prefix_sid_range_size

Size of the SID/Label range. You must specify -type extended_prefix_tlv. Possible values range from 0 to 65535. The default value is 1.

-sid_label_binding_flags

Specified the required octet fields defined in the SID Label Binding TLV. You must specify -type sid_label_binding_tlv. The available value is described below:

mbit    Mapping Server bit. If set, the SID is advertised from the
        Segment Routing Mapping Server functionality.
-sid_label_binding_multi_topo_id

Specifies the Multi-Topology ID for the SID Label Binding TLV. You must specify -type sid_label_binding_tlv. Possible values range from 0 to 255. The default value is 0. The values are described below:

Values          Description

0           Reserved for advertising the metric associated with
            the default topology
1           Reserved for advertising the metric associated with
            the default multicast topology
2           Reserved for IPv4 in-band management purposes
3-31        Reserved for assignments by IANA
32-127      Reserved for development, experimental, and proprietary
            features
128-255     Invalid and should be ignored
-sid_label_binding_range_size

Number of addresses to be mapped into a Prefix-SID. You must specify -type sid_label_binding_tlv. Possible values range from 1 to 65535. The default value is 1.

-sid_label_binding_weight

Specifies the weight used for load balancing in the SID Label Binding TLV. You must specify -type sid_label_binding_tlv. Possible values range from 0 to 255. The default value is 1.

-sid_label_binding_value

Specifies the segment identifier for the SID Label Binding TLV. You must specify -type sid_label_binding_tlv. The value must be an integer. The default value is 16.

-sid_label_binding_value_type

Specifies the type of segment identifier for the SID Label Binding TLV. You must specify -type sid_label_binding_tlv. Possible values are:

label   20-bit label
sid     32-bit SID

The default value is label.

-ipv4_ero_flags

Specifies the required octet fields. You must specify -type ipv4_ero_tlv. The available value is lbit (L bit). If set, the value of the attribute is loose. If not set, the value of the attribute is strict. The default value is lbit.

-ipv4_ero_addr

Specifies the IP address of the explicit route hop. You must specify -type ipv4_ero_tlv. The default value is 192.0.1.0

Identifies the object to which this router link is connected. The value depends on the link type specified by -extended_link_type. You must specify -type extended_link_tlv. The mapping relations are described below:

Link Type              Link ID
Point-to-point      Neighbor router ID link
Link to transit     Interface address of network designated router
Link to stub        IP network/subnet number
Virtual link        Neighbor router ID

The value must be in IPv4 format. The default value is 0.0.0.0.

Specifies the link type. You must specify -type extended_link_tlv. Possible values are described below:

point_to_point         Point-to-Point
transit_network        Transit network
stub_network           Stub network
virtual_link           Virtual link

The default value point_to_point.

Specifies the link address. You must specify -type extended_link_tlv. The value depends on the link type specified by -extended_link_type. The values are described below:

transit/numbered point-to-point/virtual
       IP interface address of the associated router interface

stub
       Stub network's IP address mask

Unnumbered point-to-point
       Unnumbered interface's MIB-II ifIndex value

The default value is 0.0.0.0.

-adj_sid_flags

Specifies the required octet fields for the Adj-SID sub-TLV. You must specify -type adj_sid_tlv. Possible values are:

bbit    Backup flag. Set if the Adj-SID refers to an adjacency
        being protected.

vbit    Value/Index flag. If set, the Prefix-SID carries an absolute
        value. If not set, the Prefix-SID carries an index.

lbit    Local/Global flag. If set, the value/index carried
        by the Prefix-SID has local significance. If not set,
        the value/index carried by this sub-TLV has global
        significance.

sbit    Set Flag. If set, it indicates that the Adj-SID refers to
        a set of adjacencies

Use “|” to specify multiple flags. The default value is vbit|lbit.

-adj_sid_multi_topo_id

Specifies the multi-topology ID for the Adj-SID sub-TLV. You must specify -type adj_sid_tlv. Possible values range from 0 to 255. The default value is 0. The values are described below:

Values          Description

0           Reserved for advertising the metric associated with
            the default topology
1           Reserved for advertising the metric associated with
            the default multicast topology
2           Reserved for IPv4 in-band management purposes
3-31        Reserved for assignments by IANA
32-127      Reserved for development, experimental, and proprietary
            features
128-255     Invalid and should be ignored
-adj_sid_weight

Specifies the weight to be used for load balancing purposes. You must specify -type adj_sid_tlv. Possible values range from 1 to 255. The default value is 1.

-adj_sid_value

Specifies the segment identifier for the Adj-SID sub-TLV. You must specify -type adj_sid_tlv. The value must be an integer. The default value is 16.

-adj_sid_value_type

Specifies the type of segment identifier for the Adj-SID sub-TLV. You must specify -type adj_sid_tlv. Possible values are:

label   20-bit label
sid     32-bit SID

The default value is label.

-lan_adj_sid_flags

Specifies the required octet fields for the LAN Adj-SID sub-TLV. You must specify -type lan_adj_sid_tlv. Possible values are described below:

bbit    Backup flag. Set if the Adj-SID refers to an adjacency
        being protected.

vbit    Value/Index flag. If set, the Prefix-SID carries an absolute
        value. If not set, the Prefix-SID carries an index.

lbit    Local/Global flag. If set, the value/index carried
        by the Prefix-SID has local significance. If not set,
        the value/index carried by this sub-TLV has global
        significance.

sbit    Set Flag. If set, it indicates that the Adj-SID refers to
        a set of adjacencies

Use “|” to specify multiple flags. The default value is vbit|lbit.

-lan_adj_sid_multi_topo_id

Specifies the multi-topology ID for the LAN Adj-SID sub-TLV. You must specify -type lan_adj_sid_tlv. Possible values range from 0 to 255. The default value is 0. The values are described below:

Values          Description

0           Reserved for advertising the metric associated with
            the default topology
1           Reserved for advertising the metric associated with
            the default multicast topology
2           Reserved for IPv4 in-band management purposes
3-31        Reserved for assignments by IANA
32-127      Reserved for development, experimental, and proprietary
            features
128-255     Invalid and should be ignored
-lan_adj_sid_neighbor_id

Specifies the neighbor ID for the LAN Adj-SID sub-TLV. You must specify -type lan_adj_sid_tlv. The value must be in IPv4 format. The default value is 0.0.0.0.

-lan_adj_sid_weight

Specifies the weight to be used for load balancing purposes. You must specify -type lan_adj_sid_tlv. Possible values range from 1 to 255. The default value is 1.

-lan_adj_sid_value

Specifies the segment identifier for the LAN Adj-SID sub-TLV. You must specify -type lan_adj_sid_tlv. The value must be an integer. The default value is 16.

-lan_adj_sid_value_type

Specifies the type of segment identifier for the LAN Adj-SID sub-TLV. You must specify -type lan_adj_sid_tlv. Possible values are:

label   20-bit label
sid     32-bit SID

The default value is label.

Arguments Unsupported by Save as HLTAPI

This function is currently not supported by Save to HLTAPI. To test with this function, you must configure it manually in the generated Spirent HLTAPI scripts.

Return Values

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

handle    The handle returned by the function when you use -mode
          create to create a new TLV. When you want to modify or
          delete the TLV, you specify the handle as the value to the
          -handle argument and the corresponding TLV type under the -type argument.
                status    Success (1) or failure (0) of the operation.

log       An error message (if the operation failed).

Description

The sth::emulation_ospf_tlv_config function creates, modifies, or deletes a TLV. Use the -mode argument to specify the operation to perform. When you create an TLV, the function returns a handle to the newly created TLV. Use this handle as input for modify and delete mode operations.

The mode you use determines the set of arguments you use to configure the TLV. When you specify -mode create or modify, you must also use the -type argument to specify the type of TLV to create or modify.

Refer to Examples and Arguments for detailed information.

Examples

To add an OSPF RI LSA:

set device_ret0_router0 [sth::emulation_ospf_lsa_config\
       -type                       router_info\
       -handle                     $ospf_router0\
       -router_info_adv_router_id  192.0.0.1\
       -router_info_age            10\
       -router_info_checksum       good\
       -router_info_seq_num        0x800\
       -router_info_instance       1\
       -router_info_opaque_type        router_information\
       -router_info_route_category     secondary\
       -router_info_scope              area_local\
       -router_info_options            ebit\
       -mode                           create\
    ]

Sample Output:

{status 1} {lsa_handle routerinfolsa1} {adv_router_id 0.0.0.0}

To add an OSPF Algorithm TLV under the RI LSA:

set device_ret0_algorithm_tlv [sth::emulation_ospf_tlv_config\
      -type           algorithm_tlv\
      -algorithms     0\
      -handle         $routerInfoHnd\
      -mode           create\
          ]

# $routerInfoHnd is retrieved from the ``sth::emulation_ospf_lsa_config`` function
# with -type router_info

Sample Output:

{status 1} {handle sralgorithmtlv1}

To add an OSPF SID/Label TLV under the RI LSA:

set device_ret0_sid_label_range_tlv [sth::emulation_ospf_tlv_config\
      -type                                sid_label_range_tlv\
      -handle                              $routerInfoHnd\
      -mode                                create\
      -sid_label_range_size                100\
      -sid_label_value                     100\
      -sid_label_value_type                label\
   ]

Sample Output:

{status 1} {handle sidlabelrangetlv1}

To add an OSPF SID Label Binding TLV under the specified Extended Prefix LSA:

set device_ret0_sid_label_binding_tlv [sth::emulation_ospf_tlv_config\
        -type                               sid_label_binding_tlv\
        -handle                             $extended_prefix_tlv_Hnd\
        -mode                               create\
        -sid_label_binding_flags            mbit\
        -sid_label_binding_multi_topo_id    192\
        -sid_label_binding_range_size       32\
        -sid_label_binding_weight           20\
        -sid_label_binding_value            10\
        -sid_label_binding_value_type       label\
    ]

Sample Output:

{status 1} {handle prefixsidsubtlv1}

To add an OSPF ERO TLV under the existing SID Label Binding TLV:

set device_ret0_ero_tlv [sth::emulation_ospf_tlv_config\
       -type           ero_tlv\
       -handle         $sid_label_binding_tlv_Hnd\
       -mode            create\
 ]

Sample Output:

{status 1} {handle erosubtlv1}

To add an OSPF IPv4 ERO TLV under the existing ERO TLV:

set device_ret0_ipv4_ero_tlv [sth::emulation_ospf_tlv_config\
    -type            ipv4_ero_tlv\
    -handle          $ero_tlv_Hnd\
    -mode           create\
    -ipv4_ero_flags    lbit\
    -ipv4_ero_addr   10.0.0.1\
 ]

Sample Output:

{status 1} {handle ipv4erosubtlv1}

End of Procedure Header

sth::emulation_ospf_topology_route_config

Purpose

Creates, modifies, or deletes a set of OSPFv2 and/or OSPFv3 routers or a single routers behind an OSPF router. You can attach routes to or delete routes from different kinds of routers, such as Summary, External, and NSSA.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_topology_route_config
    [-mode  {create|modify|delete}  M]
    [-type {router|grid|network|summary_routes|ext_routes|nssa_routes}  M]
    [-elem_handle <topology_elem_handle>]
    [-handle <ospf_handle>|<device_handle>|<session_router_handle>]
    [-external_connect <1-65535> <1-65535>]
    [-external_number_of_prefix <1-65535> ]
    [-external_prefix_forward_addr  <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-external_prefix_length  <1-32> |<1-128> ]
    [-external_prefix_metric <1-16777215>]
    [-external_prefix_start <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-external_prefix_step <0-65535>]
    [-external_prefix_type {{1|2} | {0|1} }]
    [-grid_col <1-65535>]
    [-grid_connect <1-65535> <1-65535>]
    [-grid_connect_session <ospf_session_handle>]
    [-grid_disconnect <ospf_session_handle>]
    [-grid_link_type {ptop_numbered|ptop_unnumbered}]
    [-grid_prefix_length <1-32> |<1-128> ]
    [-grid_prefix_start <a.b.c.d> |
            <a:b:c:d:e:f:g:h> ]
    [-grid_prefix_step
         ospfv2 <a.b.c.d> | ospfv3 <1-65535>]
    [-grid_router_id <a.b.c.d>]
    [-grid_router_id_step <a.b.c.d>]
    [-grid_row <1-65535>]
    [-grid_stub_per_router <0-65535>]
    [-link_enable {0|1}]
    [-link_intf_addr <a.b.c.d>]
    [-net_count <1-65535>]
    [-net_dr <ospf_lsa_handle>]
    [-net_ip {a.b.c.d}]
    [-net_ip_step {a.b.c.d}]
    [-net_prefix <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-net_prefix_length <1-128>]
    [-nssa_connect <1-65535>]
    [-nssa_number_of_prefix <1-128>]
    [-nssa_prefix_forward_addr <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-nssa_prefix_length <1-128>]
    [-nssa_prefix_metric <1-16777215>]
    [-nssa_prefix_start <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-nssa_prefix_step {1-65535}]
    [-nssa_prefix_type {{1|2} | {0|1} }]
    [-router_abr <0|1>]
    [-router_asbr <0|1>]
    [-router_connect <ospf_lsa_handle>]
    [-router_disconnect <ospf_lsa_handle>]
    [-router_id <a.b.c.d>]
    [-summary_connect <1-65535> <1-65535>]
    [-summary_number_of_prefix <1-14294967295>]
    [-summary_prefix_length <1-128>]
    [-summary_prefix_metric <1-16777215>]
    [-summary_prefix_start <a.b.c.d> |
            <a:b:c:d:e:f:g:h>]
    [-summary_prefix_step {1-65535]

Arguments

-elem_handle

Specifies the topology element to modify or delete. Returns the topology element type that you specified with the -type argument. This argument is Mandatory for modify and delete modes.

-external_connect

Specifies the position (row and column) of the router in the router grid associated with the OSPF session to which an OSPF external route pool will be connected. The default position is “1 1”. This argument is applicable when a grid of simulated OSPF routers are created. See example for creating a grid of routers.

-external_number_of_prefix

Specifies the number of routes in an OSPF external route pool element. Possible values range from 1 to 66535. The default is 24.

-external_prefix_forward_addr

Specifies the forwarding IP address for an OSPF external route pool element. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-external_prefix_length

Specifies the prefix length for an OSPF external route pool element. For IPv4, possible values range from 0 to 32, and the default is 24. For IPv6, possible values range from 1 to 128; the default is 64.

-external_prefix_metric

Specifies a metric value for an OSPF external route pool element. Possible values range from 1 to 16777215. The default is 1.

-external_prefix_start

Specifies the first of a sequence of IP addresses belonging to the same OSPF external route pool element. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0. .

-external_prefix_step

Specifies the modifier by which to increment the network part of the first IP address, to generate subsequent IP addresses belonging to different routes for an OSPF external route pool element. Possible values range from 0 to 66535. The default is 1.

-external_prefix_type

Specifies the type of metric to use for an OSPF external route pool. Possible values are 1 or 2. Specify 1 for type 1 (internal cost is added to external cost) or 2 for type 2 (external cost only). The default is 1.

-grid_col

Defines the number of columns in a grid. Use this argument to add a grid of routers behind an emulated router. You must also specify -grid_row to configure the size of the grid. Possible values range from 0 to 65535. The default is 1.

-grid_connect

Connects a router in the grid, as specified by the row and column, to the emulated router of the specified OSPF session handle (-handle). By default, the first row and first column router is connected to the emulated router. Spirent TestCenter allows you to connect only one grid of routers to one emulated router. Use this argument to add a grid of routers behind an emulated router:

-grid_connect_session

Use this argument to reconnect a grid of routers to an emulated router after the grid has been disconnected by -grid_disconnect. To reconnect a grid of routers to an emulated router, use -grid_connect_session with “-mode modify”, -type grid, “-elem_handle <grid_handle>”, and “-grid_connect <row col>”, .. note:: You can retrieve the “connected_session” handle after the grid of routers has been created.

-grid_disconnect

Use this argument to disconnect a grid of routers from an emulated router. To disconnect a grid of routers from an emulated router, use -grid_disconnect with “-mode modify”, -type grid, “-elem_handle <grid_handle>”, and “-grid_connect <row col>”, .. note:: You can retrieve the “connected_session” handle after the grid of routers has been created.

Specifies the type of link that connects the routers in a grid. This argument is available only for OSPFv2. Possible values are ptop_numbered and ptop_unnumbered. The default is “ptop_unnumbered”. A point-to-point (ptop) link is a physical or logical serial link between two routers. The link can be numbered (IP address is configured on the link) or unnumbered.

-grid_prefix_length

Specifies the prefix length of a ptop_numbered link on an OSPFv2 grid and on a stub network if you also used the -grid_stub_per_network argument. The default for OSPFv2 is 24, and the default for OSPFv3 is 64.

-grid_prefix_start

Defines the first prefix used in a grid. Use this argument only if -grid_link_type is set to “ptop_numbered” on an OSPFv2 grid or if you also used -grid_stub_per_router. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-grid_prefix_step

Increments network prefixes in a grid. The value rounds to the prefix length. Use this argument if either -grid_link_type is set to “ptop_numbered” or if you also set -grid_stub_per_router. Possible values range from 1 to 32 for OSPFv2 and 1 to 128 for OSPFv3.

-grid_router_id

Sets the first router ID in an OSPF router grid.

-grid_router_id_step

Sets the step value for incrementing subsequent router IDs in an OSPF router grid.

-grid_row

Defines the number of rows in a grid. Use this argument to add a grid of routers behind an emulated router. You must also specify -grid_col to configure the size of the grid. Possible values range from 0 to 65535. The default is 1.

-grid_stub_per_router

Defines the number of stub networks per router in a grid. Use this argument to add a grid of routers behind a grid router.

-handle

Identifies the OSPF router on which to create the OSPF element. This argument is Mandatory . For the dual stack device routers use the returned session_router handle as input to this option.

Enables a link to another element. Use this argument to add a single router behind a session router: If true (1), enables link to another element. The default is 1. This argument is available when -type is set to router.

Sets the link interface address. Use this argument to add a single router behind a session router.

-mode

Specifies the action to be performed. Possible values are create, modify, and delete. This argument is Mandatory . The modes are described below:

create - Creates a topology element. You must use the
         -handle argument to identify the associated element and
         the -type argument to specify the type of topology
         element to create. Both the -handle and -type arguments
         are :mandatory:`Mandatory` with -mode create.

modify - Changes the configuration for the topology
         specified in the -handle argument. The -handle, -type,
         and -elem_handle arguments are :mandatory:`Mandatory`  with "-mode
         modify".

delete - Deletes the element specified in the -handle
         argument. The -handle, -type, and -elem_handle
         arguments are :mandatory:`Mandatory` with -mode delete.
-net_count

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of routers per transit network. Possible values range from 1 to 65535. The default is 1.

-net_dr

Sets the designated router of an OSPF network element.

-net_ip

Sets the IP address of an OSPF network element.

-net_prefix

Spirent Extension (for Spirent HLTAPI only).

Use this argument to add a network (transit link) behind a session router: The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-net_prefix_length

Specifies the prefix length on the network interface. Possible values for OSPFv2 range from 1 to 32; the default is 24. Possible values for OSPFv3 range from 1 to 128; the default is 64.

-net_ip_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the step value for incrementing subsequent IP addresses of an OSPF network element on the same transit network.

-nssa_connect

Specifies the position (row and column) of the router in the router grid associated with the OSPF session to which an OSPF NSSA route pool will be connected. The default position is “1 1”. This argument is applicable when a grid of simulated OSPF routers are created. See example for creating a grid of routers.

-nssa_number_of_prefix

Specifies the number of NSSA routes added to a grid router.

-nssa_prefix_forward_addr

Specifies the forwarding address for an OSPF NSSA route pool. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-nssa_prefix_length

Specifies the prefix length for an OSPF NSSA route pool. Possible values for OSPFv2 range from 1 to 32; the default is 32. Possible values for OSPFv3 range from 1 to 128; the default is 64.

-nssa_prefix_metric

Specifies a metric value for an OSPF NSSA route pool element. Use this argument when adding nssa routes (that is, you specified “-type as nssa_routes”). Possible values range from 1 to 16777215. The default is 1.

-nssa_prefix_start

Specifies the first IP network prefix in an OSPF NSSA route pool element. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-nssa_prefix_step

Specifies the amount by which to increment the network part of the first IP address to generate subsequent IP addresses belonging to different routes for an OSPF NSSA route pool element. Possible values range from 1 to 65535.

-nssa_prefix_type

Specifies the type of metric to use for an OSPF NSSA route pool. Possible values are 1 and 2. Specify 1 for type 1 (when calculating the cost of the path to an NSSA route, the costs of the internal links are included) or 2 for type 2 (costs of internal links are not included in the total cost calculation. Type 2 routes have a lower priority and are considered in the path selection after type 1 costs have been evaluated. The default is 1.

-router_abr

Specifies whether the emulated router is an area border router. This argument is equivalent to “Router Type” in the Spirent TestCenter GUI, with a choice of ABR, ASBR, or Virtual Link. Possible values are 0 (false) or 1 (true). If set to 1, the emulated router is an area border router (that is, it corresponds to the B (Border) bit in a router LSA). If set to 0, it is not.

-router_asbr

Specifies whether the emulated router is an AS border router. This argument is equivalent to “Router Type” in the Spirent TestCenter GUI, with a choice of ABR, ASBR, or Virtual Link. Possible values are 0 (false) or 1 (true). If set to 1, the emulated router is an AS border router (that is, it corresponds to the E (External) bit in a router LSA).. If set to 0, it is not.

-router_connect

Connects a single router behind a session router: connects to an emulated router or a router grid. If you do not specify -router_connect, a router is automatically connected to an emulated router by default. To connect a router, use “-router_connect with “-mode create”, and -type router.

-router_disconnect

Disconnects the router from a session router. To disconnect a router, use “-router_disconnect with -mode modify, -type router, and “-elem_handle <topology_elem_handle>”.

-router_id

Sets the router ID for the OSPF router element.

-summary_connect

Specifies the position (row and column) of the router in the router grid associated with the OSPF session to which an OSPF summary route pool will be connected. The default position is “1 1”. This argument is applicable when a grid of simulated OSPF routers are created. See example for creating a grid of routers.

-summary_number_of_prefix

Specifies the number of summary routes added to a grid router. Possible values range from 1 to 14294967295. The default is 1.

-summary_prefix_length

Specifies the prefix length for an OSPF summary route pool element. For IPv4, possible values range from 0 to 32, and the default is 24. For IPv6, possible values range from 1 to 128; the default is 64.

-summary_prefix_metric

Specifies a metric value for an OSPF summary route pool element. Use this argument when adding summary routes (that is, you specified -type summary_routes). Possible values range from 1 to 16777215. The default is 1.

-summary_prefix_start

Specifies the first of a sequence of IP addresses belonging to the same OSPF summary route pool element. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0. Use this argument only if you specified -type ext_pool. The default for OSPFv2 (IPv4) is 0.0.0.0, and the default for OSPFv3 (IPv6) is 0:0:0:0:0:0:0:0.

-summary_prefix_step

Specifies the modifier by which to increment the network part of the first IP address, to generate subsequent IP addresses belonging to different routes for an OSPF summary route pool element. Possible values range from 0 to 66535. The default is 1.

-type

Specifies the type of topology element to create. Possible values are described below:

router           An individual OSPF router
grid:            A rectangular grid of routers
network          A subnet/link behind the selected session router
summary_routes   A pool of summary route addresses
ext_routes       A pool of external route addresses
nssa_routes      A pool of NSSA route addresses

This argument is Mandatory .

Arguments Unsupported by Save as HLTAPI

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

Cisco-specific Arguments

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

-grid_start_gmpls_link_id
-grid_start_te_ip
-grid_te
-link_metric
-link_te
-link_te_instance
-link_te_link_id
-link_te_local_ip_addr
-link_te_max_bw
-link_te_max_resv_bw
-link_te_metric
-link_te_remote_ip_addr
-link_te_type
-link_te_unresv_bw_priority0
-link_te_unresv_bw_priority1
-link_te_unresv_bw_priority2
-link_te_unresv_bw_priority3
-link_te_unresv_bw_priority4
-link_te_unresv_bw_priority5
-link_te_unresv_bw_priority6
-link_te_unresv_bw_priority7
-nssa_connect
-router_te
-router_virtual_link_endpt

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

elem_handle    A different element handle is returned based on
               the user configuration

router (elem_handle - router_lsa_handle)

     version             - ospfv2 or ospfv3

     connected_handles   - router_lsa_handle that is connected
                           to the created router

     router_lsa          - router_lsa_handle (same as elem_handle)

grid (elem_handle - grid_handle)

connected_session.$session.row <row>.col <col>
                          - $session is router_lsa_handle
                            <row> is the row that
                            the router connects to
                            the grid.
                            <col> is the column that
                            the router connects to
                            the grid.

router                   - the router_lsa_handle of each router
                            on the grid

network (elem_handle - network_blk_handle)
      network_lsa         - network_blk_handle
      connected_routers   - a list of router lsa handles
      version             - ospfv2 or ospfv3

summary (elem_handle - summary_blk_handle)

      summary_lsas        - summary_blk_handle
      connected_routers   - a list of router lsa handles
      version             - ospfv2 or ospfv3

external (elem_handle - external_blk_handle)

     external_lsas       - summary_blk_handle
     connected_routers   - a list of router lsa handles
     version             - ospfv2 or ospfv3

nssa (elem_handle - nssa_blk_handle)

     nssa_lsas           - nssa_blk_handle
     connected_routers   - a list of router lsa handles
     version             - ospfv2 or ospfv3

To get the router_lsa handle of the created router, specify one of the following:

set router_lsa [keylget cmdReturn elem_handle]

set router_lsa [keylget cmdReturn router.router_lsa]

To get the router_lsa handle of the router that it is connected with, specify the following:

set connected_router [keylget cmdReturn router. connected_handles]

To get the grid_handle:

set grid_handle [keylget cmdReturn elem_handle]

To get the connected_session handle:

set connected_sesion [keylkeys cmdReturn grid.connected_session]

To get the router_lsa of a grid router at row 2, col 2:

set router_lsa [keylget cmdReturn grid.router.2.2]

Description

The sth::emulation_ospf_topology_route_config function creates, enables, disables, modifies, or deletes a set of OSPFv2 and/or OSPFv3 routers or a single routers behind an OSPF router. Use this function to attach routes to or delete routes from Summary, External, and NSSA routers.

To configure the OSPF topology, you create emulated routers and links associated with the routers. To define the routers and links, use a combination of router, LSA, and link elements.

Use the -mode argument to specify the operation to perform. When you create a topology element, the function returns a handle to the newly created element. Use this handle as input for modify and delete mode operations.

The mode that you use determines the set of arguments that you use to configure the OSPF topology elements. When you specify -mode create, you must also use the -handle argument to identify the OSPF session on which to create the OSPF element and the -type argument to specify the type of topology element to create.

Examples

The following example creates an OSPF router behind an emulated router:

[sth::emulation_ospf_topology_route_config -mode create \
     -handle $router \
     -type router \
     -router_id 1.0.0.1]

router_handle [keylget cmdReturn elem_handle]

Output for above example:

{status 1} {elem_handle routerlsa2} {router {{connected_handles routerlsa1}
{router_lsa routerlsa2} {link_lsa routerlsalink1}}}

The following example creates an OSPF router behind a grid router:

[sth::emulation_ospf_topology_route_config -mode create \
       -handle $router \
       -type  router \
       -router_id  1.0.0.1 \
       -router_connect $lsa_handle]

  router_handle [keylget cmdReturn elem_handle]

Output for above example:

{status 1} {elem_handle routerlsa6} {router {{connected_handles routerlsa1}
{router_lsa routerlsa6} {link_lsa routerlsalink11}}}

Note

The lsa_handle is retrieved once the grid router has been created.

The following example creates an OSPFv2 grid route on an OSPFv2 emulated router:

[sth::emulation_ospf_topology_route_config -mode create \
      -handle $router \
      -type grid \
      -grid_connect  "2 5" \
      -grid_col 5 \
      -grid_row  5 \
      -grid_link_type ptop_unnumbered \
      -grid_router_id 1.0.0.1 \
      -grid_router_id_step  0.0.0.1\
      -grid_prefix_length 16\
      -grid_prefix_start 10.10.10.6\
      -grid_prefix_step 0.0.0.1]

 grid_handle [keylget cmdReturn elem_handle]
 connected_handle [keylkeys cmdReturn grid.connected_session]

Output for above example:

{status 1} {elem_handle ospfGrid1} {grid {{connected_session {{routerlsa5
{{row 1} {col 1}}}}} {router {{1 {{1 routerlsa1} {2 routerlsa2}}} {2 {{1
routerlsa3} {2 routerlsa4}}}}}}}

The following example creates an OSPFv3 grid route on an OSPFv3 emulated router:

set Topo [sth::emulation_ospf_topology_route_config \
        -mode create\
        -type grid\
        -handle $Router_Handle\
        -grid_col 2\
        -grid_connect 2 2\
        -grid_link_type ptop_numbered\
        -grid_prefix_length 16\
        -grid_prefix_start 2002::10\
        -grid_prefix_step 1\
        -grid_router_id 12.12.12.12\
        -grid_router_id_step 0.0.0.1\
        -grid_row 2\
        -grid_stub_per_router 2\
        -link_enable 0\
        -link_intf_addr 1.1.1.10]

Sample output for example shown above:

{status 1} {elem_handle ospfGrid1} {grid {{connected_session {{ospfv3routerlsa5
{{row 2} {col 2}}}}} {router {{1 {{1 ospfv3routerlsa1} {2 ospfv3routerlsa2}}}
{2 {{1 ospfv3routerlsa3} {2 ospfv3routerlsa4}}}}}}}

The following example disconnects an OSPF grid from emulated router:

[sth::emulation_ospf_topology_route_config -mode modify \
     -handle  $router \
     -type  grid \
     -elem_handle $grid_handle \
     -grid_disconnect $connected_handle]

grid_handle [keylget cmdReturn elem_handle]

Output for above example:

{status 1} {elem_handle ospfGrid1} {grid {{router {{1 {{1 routerlsa1}
{2 routerlsa2}}} {2 {{1 routerlsa3} {2 routerlsa4}}}}}}}

The following example creates an OSPF summary:

[sth::emulation_ospf_topology_route_config -mode create \
     -handle $router \
     -type  summary_routes \
     -summary_connect "1 1" \
     -summary_prefix_start  91.0.1.0 \
     -summary_prefix_step  2 \
     -summary_number_of_prefix  5 \
     -summary_prefix_length  27 \
     -summary_prefix_metric  10]

summary_handle [keylget cmdReturn elem_handle]

Output for above example:

{summary {{summary_lsas summarylsablock1} {version ospfv2}
{connected_routers routerlsa1}}} {status 1} {elem_handle summarylsablock1}

The following example modifies an OSPF summary:

[sth::emulation_ospf_topology_route_config -mode modify \
     -handle  $router \
     -type  summary_routes \
     -elem_handle $summary_handle \
     -summary_prefix_start 191.0.1.0 \
     -summary_prefix_step  4 \
     -summary_number_of_prefix  2 \
     -summary_prefix_length  24]

summary_handle [keylget cmdReturn elem_handle]

The following example creates 30 OSPF external routes:

set ret [::sth::emulation_ospf_topology_route_config  -mode create\
                      -type ext_routes \
                      -handle $router \
                      -external_connect "1 1" \
                      -external_number_of_prefix 30 \
                      -external_prefix_start 91.0.0.1 \
                      -external_prefix_step 2  \
                      -external_prefix_length 32 \
                      -external_prefix_type 2]

Sample output for example shown above:

{external {{external_lsas externallsablock1} {version ospfv2}
{connected_routers routerlsa1}}} {status 1} {elem_handle externallsablock1}

The following example creates 20 OSPF NSSA routes:

[::sth::emulation_ospf_topology_route_config  -mode create\
                   -type nssa_routes \
                   -handle $router \
                   -nssa_number_of_prefix 20 \
                   -nssa_prefix_forward_addr 10.0.0.1 \
                   -nssa_prefix_start 90.0.0.1 \
                   -nssa_prefix_step 2  \
                   -nssa_prefix_length 32 \
                   -nssa_prefix_metric 5 \
                   -nssa_prefix_type 2]

Sample output for example shown above:

{nssa {{nssa_lsas externallsablock4} {version ospfv2}
{connected_routers routerlsa1}}} {status 1} {elem_handle externallsablock4}

Note

The Cisco HLTAPI specification documentation states that to use the emulation_ospf_topology_route_config function, you must use session_router that is returned from the emulation_ospf_config function: [keylget cmdReturn session_router]. However, the current implementation of the Spirent HLTAPI for sth::emulation_ospf_config is as follows:

[keylget cmdReturn handle]  -> return session_router handle
[keylget cmdReturn session_router] -> return router handle

To ensure that these handles do not cause other functions to work improperly, the Spirent HLTAPI uses the handle that is returned from [keylget cmdReturn handle] to create objects in sth::emulation_ospf_topology_route_config. You MUST use the handle that is returned from emulation_ospf_config [keylget cmdReturn handle] when configuring topology elements with sth::emulation_ospf_topology_route_config.

End of Procedure Header

sth::emulation_ospfv2_info

Purpose

This function is a Spirent Extension created to return statistical information about the OSPFv2 configuration.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospfv2_info
      [-handle {port_handle|device_handle|all}]
      [-mode {stats|clear_stats}]

Arguments

-handle

Specifies the port or emulated device from which to gather transmitted (tx) and received (rx) statistics. Use “all” to specify all devices under all ports. If not specified, results from all devices under all ports will be returned.

-mode

Specifies the action to perform on the statistics. Possible values are:

stats           Retrieves the specified statistics
clear_stats     Clears the statistics

The default value is stats.

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

adjacency_status
                  OSPFv2 Adjacency State

router_state
               Reports the state of adjacency on the current port

rx_ack
                Received Acks - Number of Link State Acknowledgment
                packets received by the emulated router

rx_router_asbr
                Received ASBR-Summary-LSAs - Number of ASBR-Summary-
                LSAs received by the emulated router

rx_asexternal_lsa
               Received External-LSAs - Number of External LSAs
               received by the emulated router

rx_dd
               Received DD - Number of Database Description packets
               (containing LSA headers) received by the emulated
               router

rx_hello
               Received Hellos - Number of Hello packets received by
               the emulated router

rx_network_lsa
               Received Network-LSAs - Number of Network LSAs received
               by the emulated router

rx_nssa_lsa
               Received NSSA-LSAs - Number of NSSA LSAs received by
               the emulated router

rx_request
               Received Requests - Number of LS Request packets
               received by the emulated router

rx_router_lsa
               Received Router-LSAs - Number of Router LSAs received
               by the emulated router

rx_summary_lsa
               Received Summary-LSAs - Number of Summary LSAs received
               by the emulated router

rx_te_lsa
               Received TE-LSAs - Number of TE-LSAs received by the
               emulated router
           tx_ack
               Sent Acks - Number of Link State Acknowledgment packets
               sent by the emulated router

tx_asbr_summry_lsa
               Sent ASBR-Summary-LSAs - Number of ASBR-Summary LSAs
               sent by the emulated router

tx_as_external_lsa
               Sent External-LSAs - Number of External LSAs sent by
               the emulated router

tx_dd
               Sent DD - Number of Database Description packets sent
               by the emulated router

tx_hello
               Sent Hellos - Number of Hello packets sent by the
               emulated router

tx_network_lsa
               Sent Network-LSAs - Number of Network LSAs sent by the
               emulated router

tx_nssa_lsa
               Sent NSSA-LSAs - Number of NSSA LSAs sent by the
               emulated router

tx_request
               Sent Requests - Number of LS Request packets sent by
               the emulated router

tx_router_lsa
               Sent Router-LSAs - Number of Router LSAs sent by the
               emulated router

tx_summary_lsa
               Sent Summary-LSAs - Number of Summary LSAs sent by the
               emulated router

tx_te_lsa
               Sent TE-LSAs - Number of TE-LSAs sent by the emulated
               router

rx_external_link_lsa
               Rx Opaque/SR extended link LSA count

rx_external_prefix_lsa
               Rx Opaque/SR extended prefix LSA count

rx_router_info_lsa
               Rx Opaque/SR router info LSA count

tx_external_link_lsa
               Tx Opaque/SR extended link LSA count

tx_external_prefix_lsa
                Tx Opaque/SR extended prefix LSA count

tx_router_info_lsa
                 Tx Opaque/SR router info LSA count

Description

The sth::emulation_ospfv2_info function provides information about the statistics returned by the OSPFv2 configuration. The default return value for each statistic is 0.

This function returns the statistics for the specified handle 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 ####

Sample Input:

sth::emulation_ospfv2_info -handle $ospfv2Router(1)

Sample Output:

{tx_summary_lsa 2.000000}  {status 1}

#### HLTAPI for Python ####

Sample Input:

results_ret1 = sth.emulation_ospfv2_info (
             handle              = device_list);

Sample Output:

{'tx_request': '0', 'tx_dd': '0', 'rx_summary_lsa': '0', 'rx_request': '0',
'tx_te_lsa': '0', 'tx_as_external_lsa': '0', 'tx_summary_lsa': '0',
'rx_dd': '0', 'rx_hello': '0', 'status': '1', 'tx_network_lsa': '0',
'rx_ack': '0', 'rx_te_lsa': '0', 'tx_ack': '0', 'rx_nssa_lsa': '0',
'rx_router_lsa': '0', 'tx_router_lsa': '0', 'tx_nssa_lsa': '0',
'router_state': 'NONE', 'tx_asbr_summry_lsa': '0', 'rx_network_lsa': '0',
'tx_hello': '0', 'rx_asexternal_lsa': '0', 'rx_router_asbr': '0',
'adjacency_status': 'DOWN'}

#### HLTAPI for Perl ####

Sample Input:

my %results_ret1 = sth::emulation_ospfv2_info (
            handle              => "$device_list",

Sample Output:

$VAR1 = 'rx_te_lsa';
$VAR2 = '0';
$VAR3 = 'adjacency_status';
$VAR4 = 'DOWN';
$VAR5 = 'rx_asexternal_lsa';
$VAR6 = '0';
$VAR7 = 'rx_router_asbr';
$VAR8 = '0';
$VAR9 = 'status';
$VAR10 = '1';
$VAR11 = 'tx_as_external_lsa';
$VAR12 = '0';
$VAR13 = 'tx_dd';
$VAR14 = '0';
...

End of Procedure Header

sth::emulation_ospfv3_info

Purpose

This function is a Spirent Extension created to return statistical information about the OSPFv3 configuration.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospfv3_info
     [-handle <port_handle|all>]
     [-mode {stats|clear_stats}]

Arguments

-handle

Specifies the port from which to gather transmitted (tx) and received (rx) statistics. Use “all” to specify all ports. If not specified, all statistics from all ports will be returned.

-mode

Specifies the action to perform on the statistics. Possible values are:

stats           Retrieves the specified statistics
clear_stats     Clears the statistics

The default value is stats.

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

adjacency_status
              OSPFv3 Adjacency State

router_state
              Reports the state of adjacency on the current port

rx_ack
               Received acks - Number of Link State Acknowledgment
               packets received by the emulated router

rx_asexternal_lsa
               Received external-LSAs - Number of external LSAs
               received by the emulated router

rx_dd
               Received DD - Number of Database Description
               packets (containing LSA headers) received by the
               emulated router

rx_hello
               Received Hellos - Number of Hello packets received by
               the emulated router

rx_inter_area_prefix_lsa
               Received inter-area-prefix LSAs - Number of inter-
               area-prefix LSAs received by the emulated router

rx_inter_area_router_lsa
               Received inter-area-router LSAs - Number of inter-
               area-router LSAs received by the emulated router

rx_intra_area_prefix_lsa
               Received Intra-Area-Prefix-LSAs - Number of Intra-Area-
               Prefix LSAs received by the emulated router

rx_link_lsa
               Received link-LSAs - Number of link LSAs received by
               the emulated router.

rx_network_lsa
               Received Network-LSAs - Number of Network LSAs received
               by the emulated router

rx_nssa_lsa
               Received Link-LSAs - Number of Link LSAs received by
               the emulated router

rx_router_lsa
               Received Router-LSAs - Number of Router LSAs received
               by the emulated router

tx_ack
               Sent Acks - Number of Link State Acknowledgment
               packets sent by the emulated router

tx_as_external_lsa
               Sent external-LSAs - Number of external LSAs sent by
               the emulated router

tx_dd
               Sent DD - Number of Database Description packets sent
               by the emulated router

tx_hello
               Sent Hellos - Number of Hello packets sent by the
               emulated router

tx_inter_area_prefix_lsa
               Sent inter-area-prefix LSAs - Number of inter-area-
               prefix LSAs sent by the emulated router

tx_inter_area_prefix_lsa
               Sent inter-area-router LSAs - Number of inter-area-
               router LSAs sent by the emulated router

tx_intra_area_prefix_lsa
               Sent Intra-Area-Prefix-LSAs - Number of Intra-Area-
               Prefix LSAs sent by the emulated router

tx_link_lsa
               Sent link-LSAs - Number of link LSAs sent by the
               emulated router.

tx_network_lsa
               Sent Network-LSAs - Number of Network LSAs sent by the
               emulated router

tx_nssa_lsa
               Sent NSSA-LSAs - Number of NSSA LSAs sent by the
               emulated router

tx_request
               Sent requests - Number of LS request packets sent by
               the emulated router

tx_router_lsa
               Sent Router-LSAs - Number of Router LSAs sent by the
               emulated router

Description

The sth::emulation_ospfv3_info function provides information about the statistics returned by the OSPFv3 configuration.

This function returns the statistics for the specified handle 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 ####

Sample Input:

::sth::emulation_ospfv3_info -handle $ospfv3Router(1)

Sample Output:

{ tx_hello 59.000000}  {status 1}

#### HLTAPI for Python ####

Sample Input:

results_ret1 = sth.emulation_ospfv3_info (
            handle    = device_list);

Sample Output:

{'tx_request': '0', 'rx_intra_area_prefix_lsa': '0',
'rx_inter_area_prefix_lsa': '0', 'tx_dd': '0', 'tx_as_external_lsa': '0',
'rx_link_lsa': '0', 'rx_dd': '0', 'tx_inter_area_prefix_lsa': '0',
'rx_hello': '0', 'status': '1', 'tx_network_lsa': '0', 'rx_ack': '0',
'tx_intra_area_prefix_lsa': '0', 'tx_ack': '0', 'rx_nssa_lsa': '0',
'rx_router_lsa': '0', 'tx_router_lsa': '0', 'tx_nssa_lsa': '0',
'router_state': 'NONE', 'rx_inter_area_router_lsa': '0',
'rx_network_lsa': '0', 'tx_hello': '0', 'rx_asexternal_lsa': '0',
'tx_link_lsa': '0', 'adjacency_status': 'DOWN'}

#### HLTAPI for Perl ####

Sample Input:

my %results_ret1 = sth::emulation_ospfv3_info (
            handle              => "$device_list");

Sample Output:

$VAR1 = 'adjacency_status';
$VAR2 = 'DOWN';
$VAR3 = 'rx_asexternal_lsa';
$VAR4 = '0';
$VAR5 = 'rx_link_lsa';
$VAR6 = '0';
$VAR7 = 'status';
$VAR8 = '1';
...

End of Procedure Header

sth::emulation_ospf_route_info

Purpose

Returns detailed OSPF route information of OSPF router.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ospf_route_info
  [-handle {<ospf_device_handle>|all}]

Arguments

-handle

Specifies the OSPF router from which you get the information. Use “all” to specify all devices. If not specified, results from all OSPF devices will be returned.

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

OSPFv2

    Router LSA Information

         router.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         router.lsa_handle.<lsa>.link_state_id
                   IPv4 address that identifies the LSA

         router.lsa_handle.<lsa>.links.<Index>.id
                   Link ID

         router.lsa_handle.<lsa>.links.<Index>.data
                   Link Data

         router.lsa_handle.<lsa>.links.<Index>.type
                   Type of link to be advertised in the LSA

    Network LSA Information

         network.lsa_handle.<lsa>.adv_router_id
                   Router ID of the designated router (DR) of the emulated network

         network.lsa_handle.<lsa>.link_state_id
                   IPv4 address of the emulated network's DR

         network.lsa_handle.<lsa>.attached_router_ids
                   List of routers on the network

    Summary LSA Information

         summary.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         summary.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv4 addresses on the network

         summary.lsa_handle.<lsa>.link_state_id.prefix_start
                   The starting IPv4 address

         summary.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length for the IPv4 address

         summary.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of link state IDs

    Autonomous System Boundary Router (ASBR) LSA Information

         asbr_summary.lsa_handle.<lsa>.adv_router_id
                   Router ID of the Router that sends the LSA.

         asbr_summary.lsa_handle.<lsa>.link_state_id
                   Router ID of the ASBR whose location is being advertised.

    External LSA information

         external.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         external.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv4 addresses

         external.lsa_handle.<lsa>.link_state_id.prefix_start
                   The starting IPv4 address

         external.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length for the IPv4 addresses

         external.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of link state IDs

    "not-so-stubby" area (NSSA) LSA Information

         nssa.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         nssa.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IP addresses

         nssa.lsa_handle.<lsa.link_state_id>.prefix_start
                   The starting IP address

         nssa.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length of the IPv4 address

         nssa.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of link state IDs

    Traffic Engineering (TE) Router LSA Information

         te_router.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         te_router.lsa_handle.<lsa>.link_state_id
                   IPv4 address that identifies the LSA

    TE Link LSA Information
               te_link.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA.

         te_link.lsa_handle.<lsa>.link_state_id
                   IPv4 address that identifies the LSA

OSPF V3
               Router LSA Information

         router.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         router.lsa_handle.<lsa>.link_state_id
                   IP address that identifies the LSA

         router.lsa_handle.<lsa>.links.<Index>.id
                   Link ID

         router.lsa_handle.<lsa>.links.<Index>.data
                   Link Data

         router.lsa_handle.<lsa>.links.<Index>.type
                   Type of link to be advertised in the LSA

    Network LSA Information

         network.lsa_handle.<lsa>.adv_router_id
                   Router ID of the emulated network's DR

         network.lsa_handle.<lsa>.link_state_id
                   IPv6 address of the emulated network's DR

         network.lsa_handle.<lsa>.attached_router_ids
                   List of routers on the network

    External LSA Information

         external.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         external.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv6 addresses

         external.lsa_handle.<lsa>.link_state_id.prefix_start
                   The starting IPv6 address

         external.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length

         external.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of link state IDs

    NSSA LSA Information

         nssa.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         nssa.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv6 addresses on the same sub-network

         nssa.lsa_handle.<lsa.link_state_id>.prefix_start
                   The starting IPv6 address

         nssa.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length

         nssa.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size between two link state IDs

    Link LSA Information

         link.lsa_handle.<lsa>.adv_router_id
                   Router ID of the router that sends the LSA

         link.lsa_handle.<lsa>.link_state_id
                   Router ID of the link whose location is being advertised

    Intra-Area Prefix LSA Information

         intra_area_prefix.lsa_handle.<lsa>.adv_router_id
                   Router ID of the intra-area prefix LSA

         intra_area_prefix.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv6 addresses on the network

         intra_area_prefix.lsa_handle.<lsa>.link_state_id.prefix_start
                   The starting IPv6 address

         intra_area_prefix.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length

         intra_area_prefix.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of Link state IDs

         intra_area_prefix.lsa_handle.<lsa>.link_state_id
                   Link state ID of the intra-area prefix LSA

    Inter-Area Prefix LSA Information

         inter_area_prefix.lsa_handle.<lsa>.adv_router_id
                   Router ID of the inter-area prefix LSA

         inter_area_prefix.lsa_handle.<lsa>.link_state_id.num_prefix
                   Number of IPv6 addresses on the network

         inter_area_prefix.lsa_handle.<lsa.link_state_id>.prefix_start
                   The starting IPv6 address

         inter_area_prefix.lsa_handle.<lsa>.link_state_id.prefix_length
                   Prefix length
               inter_area_prefix.lsa_handle.<lsa>.link_state_id.prefix_step
                   Step size of Link state ID

         inter_area_router.lsa_handle.<lsa>.adv_router_id
                   Router ID of the inter-area router

         inter_area_router.lsa_handle.<lsa>.link_state_id
                   Link state ID of the inter-area router

Description

The sth::emulation_ospf_route_info function provides information about the statistics returned by the OSPF session configuration.

This function returns the statistics for the specified handle (-handle) 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 ####

Sample Input:

sth::emulation_ospf_route_info -handle ospfrouter1

Sample Output:

Sample SUCCESS output (a 2*2 grid network LSA Info output)
{router {{lsa_handle {{routerlsa1 {{links {{1 {{id 16.1.1.3}
{type POINT_TO_POINT} {data 0.0.0.1}}} {2 {{id 16.1.1.5}
{type POINT_TO_POINT} {data 0.0.0.2}}} {3 {{id 10.1.1.1}
{type POINT_TO_POINT} {data 0.0.0.3}}}}} {link_state_id 0.0.0.0}
{adv_router_id 16.1.1.1}}} {routerlsa2 {{links {{1 {{id 16.1.1.1}
{type POINT_TO_POINT} {data 0.0.0.1}}} {2 {{id 16.1.1.7}
{type POINT_TO_POINT} {data 0.0.0.2}}}}} {link_state_id 0.0.0.0}
{adv_router_id 16.1.1.3}}} {routerlsa3 {{links {{1 {{id 16.1.1.1}
{type POINT_TO_POINT} {data 0.0.0.1}}} {2 {{id 16.1.1.7}
{type POINT_TO_POINT} {data 0.0.0.2}}}}} {link_state_id 0.0.0.0}
{adv_router_id 16.1.1.5}}} {routerlsa4 {{links {{1 {{id 16.1.1.3}
{type POINT_TO_POINT} {data 0.0.0.1}}} {2 {{id 16.1.1.5}
{type POINT_TO_POINT} {data 0.0.0.2}}}}} {link_state_id 0.0.0.0}
{adv_router_id 16.1.1.7}}} {routerlsa5 {{links {{1 {{id 16.1.1.1}
{type POINT_TO_POINT} {data 0.0.0.1}}}}} {link_state_id 0.0.0.0}
{adv_router_id 10.1.1.1}}}}}}} {status 1}

#### HLTAPI for Python ####

Sample Input:

route_results_ret1 = sth.emulation_ospf_route_info (
                   handle              = device_list);

Sample Output:

{'status': '1'}

#### HLTAPI for Perl ####

Sample Input:

my %route_results_ret1 = sth::emulation_ospf_route_info (
                   handle              => "$device_list");

Sample Output:

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

End of Procedure Header