BFD Functions

emulation bfd config

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

Purpose:

Creates, enables, modifies, disables, or deletes an emulated Bidirectional Forwarding Detection (BFD) router on a Spirent HLTAPI chassis.

BFD is a simple hello protocol. A pair of systems transmits BFD packets periodically over each path between the systems. If a system stops receiving BFD packets for long enough, some component in that particular bidirectional path to the neighboring system is assumed to have failed. Under some conditions, systems may negotiate to not send periodic BFD packets to reduce overhead. Each system estimates how quickly it can send and receive BFD packets to come to an agreement with its neighbor about how rapidly detection of failure will take place.

Synopsis:

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

    emulation bfd config
        mode= {create|enable|modify|disable|activate|delete} M
        port_handle= <port_handle>
        handle= <bfd_router_handle>
        active_mode= {active|passive}
        count= <integer>
        detect_multiplier= <2-100>
        echo_rx_interval= <0-10000>
        gateway_ip_addr= <a.b.c.d>
        gateway_ip_addr_step= <a.b.c.d>
        gateway_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        gateway_ipv6_addr_step= <a:b:c:d::e>
        intf_ip_addr= <a.b.c.d>
        intf_ip_addr_step= <a.b.c.d>
        intf_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        intf_ipv6_addr_step= <a:b:c:d::e>
        ip_version= {IPv4|IPv6|IPv46}
        local_mac_addr= <aa:bb:cc:dd:ee:ff>
        local_mac_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        remote_ip_addr= <a.b.c.d>
        remote_ip_addr_step= <a.b.c.d>
        remote_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        remote_ipv6_addr_step= <a:b:c:d::e>
        enable_discriminator= {true|false}
        session_discriminator= <integer>
        session_discriminator_step= <integer>
        ipv6_enable_discriminator= {true|false}
        ipv6_session_discriminator= <integer>
        ipv6_session_discriminator_step= <integer>
        vci= <0-65535>
        vci_step= <0-65535>
        vlan_id1= <0-4096>
        vlan_id2= <0-4096>
        vlan_id_mode1= {fixed|increment}
        vlan_id_mode2= {fixed|increment}
        vlan_id_step1= <0-4096>
        vlan_id_step2= <0-4096>
        vpi= <0-255>
        vpi_step= <0-255>
        vlan_ether_type1= {vlan_tag_0x8100|vlan_tag_0x88a8|vlan_tag_0x9100}
        vlan_ether_type2= {vlan_tag_0x8100|vlan_tag_0x88a8|vlan_tag_0x9100}
        expand= {true|false} S
        ipv4_session_addr= <IPV4>
        ipv4_session_addr_step= <IPV4>
        ipv4_session_incr= <IPV4>
        ipv4_session_count= <NUMERIC>
        ipv6_mask= <1-128>
        ipv6_session_count= <NUMERIC>
        ipv6_session_addr_step= <IPV6>
        ipv6_session_addr= <IPV6>
        ipv6_session_incr= <NUMERIC>
        authentication= {md5|none|simple}
        password= <ANY>
        md5_key_id= <NUMERIC>

Arguments:

active_mode
                Define whether this BFD session should actively attempt to
                establish a connection. Possible values are::


                 active -  Send BFD control packets for the BFD session,
                          regardless of whether the system has received any
                          BFD packets.

                 passive - Do not send BFD control packets for the BFD
                          session until the system has received a BFD
                          packet.

count
                Defines the number of BFD routers to create. Possible values
                are 1 to <max_int>. The default is 1.

detect_multiplier
                The negotiated transmit interval multiplied by this value is
                the detection time for this session. Possible values range from
                2 to 100. The negotiated transmit interval, which is created by
                STC BLL automatically, is set to 50.

echo_rx_interval
                Specifies the minimum interval, in microseconds, between
                received BFD Echo packets. Possible values ranges from 0 to
                10000. If this value is zero, the transmitting system does
                not support the receipt of BFD Echo packets.

gateway_ip_addr
                Configures the IPv4 gateway address of the BFD router. The
                default is 192.85.1.1. This is the default gateway for
                routing the IPv4 address you specified in the intf_ip_addr
                argument. The default gateway is the router that Spirent
                HLTAPI will use to reach hosts not on its local network.

gateway_ip_addr_step
                Configures the IPv4 gateway address for multiple routers.
                This argument is used with the gateway_ip_addr argument.
                The default is 0.0.1.0.

gateway_ipv6_addr
                Configures the IPv6 gateway address of the BFD router.
                The default is 2000::1. This is the default gateway for
                routing the IPv6 address you specified in the
                intf_ipv6_addr argument. The default gateway is the router
                that Spirent HLTAPI will use to reach hosts not on its local
                network.

gateway_ipv6_addr_step
                Configures the IPv6 gateway address for multiple routers.
                This argument is used with the gateway_ipv6_addr argument.
                The default is 0:0:0:1::0.

handle
                Specifies the BFD router handle, a string value, to use when
                mode is set to "modify", "disable", or "delete".
                This argument is `Mandatory` for every mode except
                "create" and "enable". See port_handle.

intf_ip_addr
                Specifies the first IPv4 address in the group. The default
                for IPv4 is 192.85.1.3.

intf_ip_addr_step
                Specifies the difference between the interface IP addresses of
                consecutive hosts when multiple BFD hosts are created. The
                default increment is 1 (for example, 0.0.0.1). This
                argument is only applicable in create mode.

intf_ipv6_addr
                Specifies the IPv6 address of the interface for the
                emulated router that will establish an adjacency with the
                DUT. The default is 2000::2.

intf_ipv6_addr_step
                Defines the increment used to generate IP addresses for
                emulated routers. Spirent HLTAPI increments the
                intf_ipv6_addr value. You must specify the interface
                IP address step when the count argument is greater than 1.
                The range of possible values is 0 to <max_int>. The default
                is 0:0:0:1::0.

ip_version
                Specifies the IP version of the BFD emulated router.
                Possible values are IPv4 (for IPv4 address format) or IPv6
                (for IPv6 address format) or IPv46 (for both IPv4 and IPv6 address
                format specification).

local_mac_addr
                Specifies the first MAC address to use when emulating
                multiple clients. The default is 00:10:94:00:00:01.

local_mac_addr_step
                Specifies the increment to use to generate additional MAC
                addresses for multiple clients. Possible values range from
                00.00.00.00.00.01 to 00.00.7f.ff.ff.ff. The default is
                00.00.00.00.00.01.

mode
                Specifies the action to perform on the specified test port.
                The modes are described below::


                 create - Creates one or more BFD routers on the port
                         specified with the port_handle argument. You must
                         specify the port_handle argument.

                 enable - Same as create mode.

                 modify - Changes the configuration for the BFD router
                         identified by the handle argument. You must
                         specify the handle argument.

                 activate - Used for `scaling` scenarios.
                          1. Enables BFD devices and configures BFD parameters
                             for the devices created via the emulation device config
                             function. This mode requires the value of param_handle
                             as the input to the handle option. Use this mode for
                             `scaling` scenarios. Refer to count and -expand options
                             under the ``emulation bfd config`` function for more
                             information. For this mode, only the following set of
                             options are valid::


                               detect_multiplier
                               echo_rx_interval
                               control_plane_independent
                               active_mode
                               rx_interval
                               tx_interval
                               ipv4_session_addr
                               ipv4_session_addr_step
                               ipv4_session_count
                               ipv4_session_addr_incr
                               ipv6_session_addr
                               ipv6_session_addr_step
                               ipv6_session_count
                               ipv6_session_addr_incr
                               ipv6_mask
                               md5_enable
                               md5_key
                               md5_key_id

                        2. Creates devices and enables BFD protocol.
                           Requires port_handle and -block_mode options.
                           For this mode, the following options are required/supported
                           along with the options specified above::


                             count
                             block_mode
                             block_name_index
                             name
                             vlan_id
                             vlan_outer_id
                             vlan_user_pri
                             vlan_id_count
                             vlan_id_repeatmode
                             vlan_outer_id_count
                             vlan_outer_user_pri
                             vlan_outer_id_repeatmode
                             router_id
                             router_id_step
                             router_id_ipv6
                             router_id_ipv6_step
                             intf_ip_addr
                             intf_ip_addr_step
                             intf_prefix_len
                             gateway_ip_addr
                             gateway_ip_addr_step
                             mac_addr
                             mac_addr_step
                             link_local_ipv6_addr
                             link_local_ipv6_addr_step
                             intf_ipv6_addr
                             intf_ipv6_addr_step
                             intf_ipv6_prefix_len
                             link_local_ipv6_prefix_len
                             gateway_ipv6_addr
                             gateway_ipv6_addr_step
                             mac_addr_step_per_port
                             mac_addr_step_per_vlan
                             ip_step_per_port
                             ip_step_per_vlan
                             ipv6_step_per_vlan
                             ipv6_step_per_port
                             link_local_ipv6_step_per_port
                             link_local_ipv6_step_per_vlan

                           Note: Please refer to the emulation_device_config documentation.

                 delete - Deletes all of the BFD routers specified in the
                         handle argument. You must specify the handle
                         argument.

                 disable - Same as delete mode.

port_handle
                Specifies the port on which to create the BFD router when
                mode is set to "create." This argument is `Mandatory` only for
                create and enable modes.

remote_ip_addr
                Specifies the SUT IP address for the BFD IPv4 session pool.

remote_ip_addr_step
                Specifies the step size in which the SUT IP address is
                incremented.

remote_ipv6_addr
                Specifies the SUT IP address for the BFD IPv6 session pool.

remote_ipv6_addr_step
                Specifies the step size in which the SUT IP address is
                incremented.

enable_discriminator
                Specifies to enable or disable session discriminator values
                under control plane independent session. Possible values are
                true and false.
                The default is true.

session_discriminator
                Specifies the BFD remote discriminator value.

session_discriminator_step
                Specifies the BFD session discriminator step value.

ipv6_enable_discriminator
                Specifies to enable or disable session discriminator values
                under control plane independent session. Possible values are
                true and false. This argument is valid only when ip_version
                is set to IPv46.
                The default is true.

ipv6_session_discriminator
                Specifies the BFD remote discriminator value. This argument is
                valid only when ip_version is set to IPv46.

ipv6_session_discriminator_step
                Specifies the BFD session discriminator step value. This argument is
                valid only when ip_version is set to IPv46.

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_id1
                The VLAN ID of the first VLAN subinterface (that is, the
                Inner VLAN ID). Possible values range from 0 to 4096. The
                default is 1.

vlan_id2
                The VLAN ID of the second VLAN subinterface (that is, the
                Outer VLAN ID). Possible values range from 0 to 4096. The
                default is 1.

vlan_id_mode1
                Specifies VLAN ID assignment for multiple router
                configurations when count is greater than 1. Valid values
                are "fixed" or "increment". If you configure more than one
                interface on Spirent HLTAPI with VLAN, you can choose to
                either automatically increment the VLAN tag (mode "increment")
                or leave it idle for each interface (mode "fixed"),
                in which case the VLAN ID is the same for all packets.
                If you set this argument to "increment", then you must also
                specify the vlan_id_step1 argument to indicate the step size.

vlan_id_mode2
                Specifies VLAN ID assignment for multiple router
                configurations when count is greater than 1. Valid values
                are "fixed" or "increment". If you configure more than one
                interface on Spirent HLTAPI with VLAN, you can choose to
                either automatically increment the VLAN tag (mode "increment")
                or leave it idle for each interface (mode "fixed"),
                in which case the VLAN ID is the same for all packets.
                If you set this argument to "increment", then you must also
                specify the vlan_id_step2 argument to indicate the step size.

vlan_id_step1
                The value that Spirent HLTAPI uses to increment the VLAN
                ID. You must specify this step when you use specify
                "increment" for the vlan_id_mode1 argument and the router
                count (count) is greater than 1. Possible step values range
                from 0 to 4096.

vlan_id_step2
                The value that Spirent HLTAPI uses to increment the VLAN
                ID. You must specify this step when you use specify
                "increment" for the vlan_id_mode2 argument and the router
                count (count) is greater than 1. Possible step values range
                from 0 to 4096.

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.

vlan_ether_type1
                Specifies the inner VLAN EtherType. Possible values are
                vlan_tag_0x8100, vlan_tag_0x88a8 and vlan_tag_0x9100.
                You can use this argument when you specify the vlan_id1
                argument. The types are described below::


                 vlan_tag_0x8100 - Specifies EtherType value 0x8100, a value
                        of 8100 in hexadecimal. When a frame has the VLAN
                        EtherType equal to 8100, this frame carries the tag
                        IEEE 802.1Q.

                 vlan_tag_0x88a8 - Specifies EtherType value 0x88a8, a value
                        of 88a8 in hexadecimal. When a frame has the VLAN
                        EtherType equal to 88A8, this frame carries the tag
                        EEE 802.1ad.

                 vlan_tag_0x9100 - Specifies EtherType value 0x9100, a value
                        of 9100 in hexadecimal. When a frame has the VLAN
                        EtherType equal to 9100, this frame carries the tag
                        IEEE standard IEEE 802.1Q-1998.

vlan_ether_type2
                Specifies the outer VLAN EtherType. Possible values are
                vlan_tag_0x8100, vlan_tag_0x88a8 and vlan_tag_0x9100. You
                can use this argument when you specify the vlan_id2
                argument. The types are described below::


                 vlan_tag_0x8100 - Specifies EtherType value 0x8100, a value
                                  of 8100 in hexadecimal. When a frame has the
                                  VLAN EtherType equal to 8100, this frame
                                  carries the tag IEEE 802.1Q.

                 vlan_tag_0x88a8 - Specifies EtherType value 0x88a8, a value
                                  of 88a8 in hexadecimal. When a frame has the
                                  VLAN EtherType equal to 88A8, this frame
                                  carries the tag IEEE 802.1ad.

                 vlan_tag_0x9100 - Specifies EtherType value 0x9100, a value
                                  of 9100 in hexadecimal. When a frame has the
                                  VLAN EtherType equal to 9100, this frame
                                  carries the tag IEEE standard IEEE 802.1Q-1998.

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

                Determines whether to expand the specified BFD device
                parameters into emulated BFD device objects. It is
                used in `scaling` test scenarios.

                When set to true, a list of emulated device handles (handle_list)
                with enabled BFD device configurations is created.

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

ipv4_session_addr
                Specifies the starting IPv4 session destination address.
                The default is 192.0.0.1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv4_session_incr
                Specifies the IPv4 destination increment.
                The default is 0.0.0.1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv4_session_addr_step
                Specifies the address increment for IPv4 control plane independent sessions.
                The default is 0.0.0.0
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv4_session_count
                Specifies the number of IPv4 control plane independent sessions.
                The default is 1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv6_session_addr
                Specifies the starting IPv6 session destination address.
                The default is 2001::1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv6_session_incr
                Specifies the IPv6 destination increment.
                The default is 1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv6_session_addr_step
                Specifies the address increment for IPv6 control plane independent sessions.
                The default is ::0
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv6_session_count
                Specifies the number of IPv6 control plane independent sessions.
                The default is 1
                Applicable only in mode activate when -block_mode or -expand is specified.

ipv6_mask
                Specifies the mask used to increment the IPv6 address.
                The default is 128
                Applicable only in mode activate when -block_mode or -expand is specified.

authentication
                Specifies the type of authentication to use.
                The default is none
                Applicable only in mode activate when -block_mode or -expand is specified.

password
                Specifies the password for the session. Set Authentication to simple.
                The default is spirent
                Applicable only in mode activate when -block_mode or -expand is specified.

md5_key_id
                Specifies the MD5 key ID for the session. Set Authentication to md5.
                The default is 1
                Applicable only in mode activate when -block_mode or -expand is specified.

Arguments Unsupported by Save as HLTAPI:

None
Ciscospecific Arguments:

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

control_interval
control_plane_independent
pkts_per_control_interval
hop_mode
poll_interval
reset
encap_type
remote_mac_addr
remote_mac_addr_step
dlci
remote_discriminator
remote_discriminator_step
echo_bit
echo_timeout
echo_tx_interval
flap_tx_interval
performance_mode
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):

handles       A list of handles that identify the routers created by the
              ``emulation bfd config`` function.

handle_list   The emulated device handles list with enabled BFD device
              configurations is created when expand is set true.

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

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

The emulation bfd config function creates, enables, modifies, disables, or deletes an emulated BFD router. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

Use create or enable mode to create one or more routers with the BFD protocol. The handle of each BFD router is returned. Use the count argument to specify how many routers to create. The routers can be further configured with modify mode, as well as removed with either delete or disable mode.

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

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

  • The IP address for the emulated router (the intf_ip_addr or intf_ipv6_addr argument)
  • The IP address for the BFD router (DUT) to communicate with (the gate_way_addr or gateway_ipv6_addr argument)
  • The first MAC address to use when emulating multiple clients (the local_mac_addr argument)
  • The SUT IP address for BFD IPv4 session pool (the remote_ip_addr or remote_ipv6_addr argument)

After you create a router, use the “emulation_bfd_control mode start” command for Spirent HLTAPI to start the router communication.

Once you start sessions, Spirent HLTAPI handles all of the message traffic for the emulated routers. During the test, use the emulation bfd control start=individual routers. To stop and start all of the routers associated with a particular port, use the restart mode with the emulation bfd control function.

Examples:

The following example creates a BFD router:

emulation bfd config
     mode= create
     port_handle= port1
     count= 1
     ip_version= IPv4
     local_mac_addr=  00:10:94:00:00:01
     local_mac_addr_step= 00:00:00:00:00:01
     intf_ip_addr= 192.85.1.3
     intf_ip_addr_step= 0.0.1.0
     remote_ip_addr= 10.1.1.1
     gateway_ip_addr= 192.85.1.1
     gateway_ip_addr_step= 0.0.1.0
     vlan_id1= 100
     vlan_id_mode1= increment
     vlan_id_step1= 10
     vlan_id2= 300
     vlan_id_mode2= fixed
     session_discriminator= 12
     session_discriminator_step= 1
     detect_multiplier= 2
     echo_rx_interval= 50
     active_mode= active

Sample output for example shown above:

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

The following example stops the created BFD router at the router level instead of at the port level:

emulation bfd config mode=disable handle bfdRtrHandle1

Sample output for example shown above:

{status 1}

The following example modifies handle router1:

emulation bfd config
     mode= modify
     handle= bfdRtrHandle1
     active_mode= passive

Sample output for example shown above:

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

The following example creates five BFD routers:

emulation bfd config mode=create
    port_handle= port1
    count= 5
    ip_version= IPv4
    local_mac_addr=  00:10:94:00:00:01
    local_mac_addr_step= 00:00:00:00:00:01
    intf_ip_addr= 192.85.1.3
    inft_ip_addr_step= 0.0.1.0
    remote_ip_addr= 10.1.1.1
    gateway_ip_addr= 192.85.1.1
    gateway_ip_addr_step= 0.0.1.0
    vlan_id1= 100
    vlan_id_mode1= increment
    vlan_id_step1= 10
    session_discriminator= 12
    session_discriminator_step= 1
    detect_multiplier= 2
    echo_rx_interval= 50
    active_mode= active

Sample output for example shown above:

{handle router1 router2 router3 router4 router5}

The following example creates dual stack BFD router:

emulation bfd config mode=create
   ip_version=                                       IPv46
   vlan_id_mode1=                                    increment
   enable_discriminator=                             false
   ipv6_enable_discriminator=                        false
   session_discriminator=                            14
   session_discriminator_step=                       1
   ipv6_session_discriminator=                       13
   ipv6_session_discriminator_step=                  1
   remote_ipv6_addr=                                 3001::1
   remote_ipv6_addr_step=                            ::0001
   port_handle=                                      port1
   intf_ipv6_addr=                                   cafe:1890:c00:5402::2
   intf_ipv6_addr_step=                              ::1
   gateway_ipv6_addr_step=                           ::1
   gateway_ipv6_addr=                                cafe:1890:c00:5402::1
   vlan_ether_type1=                                 vlan_tag_0x8100
   vlan_id1=                                         141
   vlan_id_step1=                                    0
   router_id_step=                                   0.0.0.1
   ipv6_router_id=                                   2000::1
   router_id=                                        192.0.0.1
   ipv6_router_id_step=                              ::1
   intf_ip_addr=                                     21.1.1.3
   gateway_ip_addr=                                  21.1.1.1
   gateway_ip_addr_step=                             0.0.0.0
   intf_ip_addr_step=                                0.0.0.1
   local_mac_addr_step=                              00:00:00:00:00:01
   local_mac_addr=                                   00:10:94:01:00:09
   scale_mode=                                       normal
   use_partial_block_state=                          0
   tx_interval=                                      50
   echo_rx_interval=                                 0
   active_mode=                                      active
   detect_multiplier=                                3
   interval_time_unit=                               msec
   rx_interval=                                      50

Sample output for example shown above:

{handle router1} {status 1}

The following example uses the function in scaling mode (mode= activate) with port_handle= and block_mode:

set bfd_ret [emulation bfd config
            mode=                                            activate
            port_handle=                                     $port1
            count=                                           2
            block_mode=                                      ONE_DEVICE_PER_BLOCK
            block_name_index=                                1
            detect_multiplier=                               4
            echo_rx_interval=                                1
            control_plane_independent=                       1
            active_mode=                                     passive
            rx_interval=                                     51
            tx_interval=                                     51
            ipv4_session_addr=                               10.1.1.1
            ipv4_session_addr_step=                          0.0.0.1
            ipv4_session_count=                              1
            ipv4_session_addr_incr=                          0.0.0.1
            ipv6_session_addr=                               2002::1
            ipv6_session_addr_step=                          ::1
            ipv6_session_count=                              1
            ipv6_session_addr_incr=                          1
            ipv6_mask=                                       64
            vlan_id=                                         444
            vlan_outer_id=                                   333
            router_id=                                       11.111.11.11
            router_id_step=                                  0.0.0.2
            mac_addr=                                        00:11:11:11:11:11
            mac_addr_step=                                   00:00:00:00:00:02
            mac_addr_step_per_port=                          00:00:00:00:01:01
            mac_addr_step_per_vlan=                          {"" 00:00:00:00:00:01}
            ip_step_per_port=                                0.0.0.5
            ip_step_per_vlan=                                {"" 0.0.1.1}
            intf_ipv6_prefix_len=                            65
            ipv6_step_per_vlan=                              {"" ::2}
            ipv6_step_per_port=                              ::1
            intf_prefix_len=                                 22
            link_local_ipv6_step_per_port=                   ::4
            link_local_ipv6_step_per_vlan=                   {::4 ::5}
            name=                                            DEVICE_BLOCK_BFD_ROUTER
            vlan_user_pri=                                   3
            vlan_id_count=                                   2
            vlan_id_repeatmode=                              REPEAT_ACROSS_PORT
            vlan_outer_id_count=                             2
            vlan_outer_user_pri=                             4
            vlan_outer_id_repeatmode=                        REPEAT_ACROSS_PORT
            router_id_ipv6=                                  0101::011
            router_id_ipv6_step=                             ::11
            intf_ip_addr=                                    11.111.11.11
            gateway_ip_addr=                                 11.111.11.1
            link_local_ipv6_addr=                            fe80::2
            link_local_ipv6_addr_step=                        ::1
            intf_ipv6_addr=                                  1111::3e9
            intf_ipv6_addr_step=                             ::1
            link_local_ipv6_prefix_len=                      64
            gateway_ipv6_addr=                               1111::1
            gateway_ipv6_addr_step=                          ::1
            expand=                                          true

Sample Output:

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

The following example deletes the specified BFD router:

emulation bfd config
     mode= delete
     handle= bfdRtrHandle1

Sample output for example shown above:

{status 1}

emulation bfd control

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

Purpose:
Starts, flaps, or stops a BFD router from routing traffic for the specified port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

    emulation bfd control
       mode= {admin_up|admin_down|disable_demand|enable_demand|flap|initiate_poll|
              start|stop|resume_pdus|stop_pdus} M]
       handle= <bfd_router_handle_list>
       port_handle= <port_handle_list>
       flap_count= <integer>
       flap_interval= <integer>

Arguments:

handle
                Identifies a list of router handles or session handles on which
                to stop or start the router. It is `Mandatory` that you specify
                either handle or -port_handle but not both.

mode
                Specifies the action to be taken on the specified handle or
                port handle. This argument is `Mandatory`. Possible values are:

                admin_up
                                Administratively starts a BFD session for one or
                                more routers running BFD

                admin_down
                                Administratively stops a BFD session for one or
                                more routers running BFD

                enable_demand
                               Enables Demand mode on one or more BFD sessions

                disable_demand
                               Disables Demand mode on one or more BFD sessions

                initiate_poll
                                Initiates polling on one or more BFD sessions
                                with Demand mode enabled

                stop
                                Stops the router for the specified port

                start
                                Starts the router for the specified port

                flap
                                Disconnects and then reconnects the link to the
                                router based on the settings for flap_count
                                and flap_interval.

                resume_pdus
                                Resumes sending BFD PDUs for one or more BFD sessions

                stop_pdus
                                 Stops sending BFD PDUs for one or more BFD sessions


flap_count
                Specifies the number of flaps. Each flap includes one
                suspend and one resume. The default is 5. This argument is
                valid only when mode is set to "flap".

flap_interval
                Specifies the time, in seconds, between flap cycles.
                This argument is valid only when mode is set to "flap".
port_handle
                Specifies a list of ports on which BFD emulation will
                start, stop, flap, suspend or resume. It is
                `Mandatory` that you specify either handle or -port_handle
                but not both.
Ciscospecific Arguments:
None
Return Values:

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

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

The emulation bfd control function controls the routing of traffic through the specified ports. You can use the function to perform several actions: starting routers, stopping routers, suspending routers, resuming routers, and controlling route flapping.

When the mode is set to “flap”, Spirent HLTAPI stops the PDU that caused the BFD session to flap. Mode flap stops sending or responding for the specified flap interval. Each flap includes one suspend and one resume.

Spirent HLTAPI enables you to use flapping in your network environment. You can use flapping to control various kind of events in your test environment, including routing. When you use the emulation bfd control function to define flapping for your test, you must:

  • Define the flapping mode with “mode flap”.
  • Set flap_count and flap_interval to define the flapping cycle.
  • Specify where flapping will take place using handle or port_handle.

When you call the emulation bfd control function, you specify a port handle. Spirent HLTAPI applies the specified action to all of the emulated BFD routers associated with the specified port.

Examples:

To start the specified BFD router:

emulation bfd control mode=start handle $bfdRouterHandle

To start all BFD routers on the specified port:

emulation bfd control mode=start port_handle $port1

To control route flapping:

emulation bfd control mode=flap
    handle= bfdRouterHandle
    flap_count= 10
    flap_interval= 10

To stop a BFD router:

emulation bfd control mode=stop handle $bfdRouterHandle

To stop all BFD routers on the specified port:

emulation bfd control mode=stop port_handle $port1

Sample Output:

{status 1}

emulation bfd info

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

Purpose:
Returns information about the BFD configuration

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation bfd info
        mode= {aggregate_stats|learned_info|clear_stats|bfd_stats|mpls_stats} M
        handle= <bfd_router_handle>
        port_handle= <port_handle>

Arguments:

handle
                Specifies the router from which to extract BFD session
                data. It is `Mandatory` that either handle or -port_handle,
                but not both, be specified

mode
                Specifies the kind of information you want to see. This
                argument is `Mandatory`. Possible values are::

                aggregate_stats
                             Returns transmitted and received
                             statistics for each port

                learned_info
                             Retrieves learned information by the BFD protocol

                bfd_stats
                             BFD results for the router

                mpls_stats
                             BFD MPLS session results

                clear_stats - Not supported.

port_handle
                Specifies the ports from which to extract BFD session data.
                It is `Mandatory` that either handle or -port_handle, but not
                both, be specified
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 when you specify mode aggregate_stats:

<port_handle>.aggregate.routers_configured
<port_handle>.aggregate.routers_running
<port_handle>.aggregate.control_pkts_tx
<port_handle>.aggregate.control_pkts_tx
<port_handle>.aggregate.echo_self_pkts_tx
<port_handle>.aggregate.echo_self_pkts_rx
<port_handle>.aggregate.echo_dut_pkts_tx
<port_handle>.aggregate.echo_dut_pkts_rx
<port_handle>.aggregate.sessions_configured
<port_handle>.aggregate.sessions_auto_created
<port_handle>.aggregate.sessions_configured_up
<port_handle>.aggregate.sessions_auto_created_up

The following keys are returned when you specify mode learned_info:

Statistics list info will be returned per session basis.
Example: learned_info.<handle>.statistics

packet_rx                 BFD packets received
packet_dr                 BFD packets received but dropped due to
                          mismatch or error
poll_rx                   BFD packets received with Poll bit set
final_rx                  BFD packets received with Final bit set
echo_rx                   Echo packets received and reflected
avg_intr_arriv            Average interarrival time of received BFD
                          packets. This value is not updated when
                          session is not in Up state.
min_intr_arriv            Minimum interarrival time of received
                          BFD packets. This value is not updated
                          when session is not in Up state.
max_intr_arriv            Maximum interarrival time of received
                          BFD packets. This value is not updated when
                          session is not in Up state.
packet_tx                 BFD packets transmitted
poll_tx                   BFD packets transmitted with Poll bit set
final_tx                  BFD packets transmitted with Final bit set
echo_tx                   Number of packets echoed
avg_intr_dept             Average interdeparture time of
                          transmitted BFD packets. This value is not
                          updated when session is not in Up state
min_intr_dept             Minimum interdeparture time of transmitted
                          BFD packets. This value is not updated when
                          session is not in Up state
max_intr_dept             Maximum interdeparture time of
                          transmitted BFD packets. This value is not
                          updated when session is not in Up state
to_down_state             State changes to Down state
to_admin_down_state       State changes to AdminDown state
to_init_state             State changes to Init state
to_up_state               State changes to Up state

The following keys are returned when you specify mode bfd_stats:

flap_count
                   Number of times a flap event was detected by BFD
rx_count
                   Number of BFD packets received on this router
timeout_count
                   Number of timeout conditions detected by BFD
tx_count
                   Number of BFD packets sent on this router
session_up_count
                   Number of BFD sessions in UP state
session_down_count
                   Number of BFD sessions in DOWN and ADMINDOWN states

The following keys are returned when you specify mode mpls_stats:

bfd_control_bits
                       Value of the Poll, Final, Control
                       Plane Independent, Authentication Present,
                       Demand, Detect Mult (PFCADM) bits
bfd_diagnostic_code
                       Reason for the session's last state change::


                       NO_DIAGNOSTIC               No diagnostic code available
                       CD_TIME_EXPIRE              Control detection time expired
                       ECHO_FUNCTION_FAILED        Echo function failed
                       NBOR_SIG_SESSION_DOWN       Neighbor signaled session down
                       FOR_PLANE_RESET             Forwarding plane reset
                       PATH_DOWN                   Path down
                       CONCAT_PATH_DOWN            Concatenated path down
                       ADMIN_DOWN                  Administratively down
                       REVERSE_CONCAT_PATH_DOWN    Reverse concatenated path down
                       NOT_APPLICABLE              Result is not applicable for
bfd_session_state
                        State of the BFD session

                        ADMINDOWN   Session is administratively down
                        DOWN        Session is down
                        INIT        Session is initializing
                        UP          Session is up
fec_info
                        Forwarding equivalency class information
flap_count
                        Number of flaps (state transitions) detected
last_bfd_diagnostic_error_rx
                        Last BFD diagnostic error received

                        NO_DIAGNOSTIC               No diagnostic code available
                        CD_TIME_EXPIRE              Control detection time expired
                        ECHO_FUNCTION_FAILED        Echo function failed
                        NBOR_SIG_SESSION_DOWN       Neighbor signaled session down
                        FOR_PLANE_RESET             Forwarding plane reset
                        PATH_DOWN                   Path down
                        CONCAT_PATH_DOWN            Concatenated path down
                        ADMIN_DOWN                  Administratively down
                        REVERSE_CONCAT_PATH_DOWN    Reverse concatenated path down
                        NOT_APPLICABLE              Result is not applicable for
                                                   current mode
my_discriminator
                        Value of the My Discriminator field
rx_avg_rate
                        Average rate (packets per second) at which BFD packets
                        were received
rx_count
                        Number of BFD control packets received
rx_desired_min_rx_interval
                        Minimum interval, in microseconds, between
                        received BFD control packets that this system is
                        capable of supporting
rx_max_rate
                        Maximum rate (packets per second) at which BFD packets
                        were received
rx_min_rate
                        Minimum rate (packets per second) at which BFD packets
                        were received
rx_req_min_echo_rx_interval
                       Minimum interval, in microseconds, between
                       received BFD Echo packets
timeout_count
                       Count of the number of timeout states detected
tx_avg_rate
                       Average rate (packets per second) at which
                       BFD packets were transmitted
tx_count
                       Number of BFD control packets sent

tx_interval
                       Minimum interval, in microseconds, that the local system
                       will use when transmitting BFD control packets
tx_max_rate
                        Maximum rate (packets per second) at which BFD packets
                       were transmitted.
tx_min_rate
                        Minimum rate (packets per second) at which BFD packets
                        were transmitted
your_discriminator
                        Value of the Your Discriminator field
Description:

The emulation bfd info function provides information about either the routers or ports specified for the BFD configuration.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list. (See Return Values for a description of each key.)

Examples:

Sample Input:

emulation bfd info
      mode= learned_info
      handle= $bfdRouterHandle

Sample Output:

{bfd_session_state DOWN} {learned_info {{router1 {{packet_rx 0}
{to_down_state 1} {min_intr_arriv 1000} {packet_tx 473} {to_up_state 0}}}}}
{status 1}

Sample Input:

emulation bfd info \
      mode= learned_info
      port_handle= port1

Sample Output:

{bfd_session_state DOWN} {learned_info {{router1 {{packet_rx 0}
{to_down_state 1} {min_intr_arriv 1000} {packet_tx 83} {to_up_state 0}}}
{router2 {{packet_rx 0} {to_down_state 1} {min_intr_arriv 1000}
{packet_tx 0} {to_up_state 0}}}}} {status 1}

To retrieve BFD statistics from the specified router:

set bfdRouterHandle "router1"
set stats [emulation bfd info
            mode= bfd_stats
            handle= $bfdRouterHandle]

Sample Output:

{router1 {{session_up_count 0} {tx_count 6} {rx_count 0} {session_down_count
1} {timeout_count 0} {flap_count 0}}} {status 1}

To retrieve BFD statistics from the specified port:

set bfdRouterHandle "router1"
set stats [emulation bfd info
        mode= bfd_stats
        port_handle= port3]

Sample Output:

{router1 {{session_up_count 0} {tx_count 14} {rx_count 0} {session_down_count
1} {timeout_count 0} {flap_count 0}}} {router2 {{session_up_count 0}
{tx_count 121} {rx_count 0} {session_down_count 10} {timeout_count 0}
{flap_count 0}}} {status 1}

To retrieve BFD MPLS session statistics from the specified router:

set bfdRouterHandle "router1"
set stats [emulation bfd info
    mode= mpls_stats
    handle= $bfdRouterHandle]

Sample Output:

{router1 {{0 {{tx_interval 1000} {rx_min_rate 0} {rx_desired_min_rx_interval
1000} {tx_min_rate 1} {rx_avg_rate 0} {rx_count 0} {rx_max_rate 0}
{flap_count 0} {tx_max_rate 1.333} {tx_count 18} {tx_avg_rate 1.009}
{bfd_control_bits 8} {last_bfd_diagnostic_error_rx NO_DIAGNOSTIC}
{timeout_count 0} {bfd_session_state DOWN} {fec_info {Static LSP: 100}}
{bfd_diagnostic_code NO_DIAGNOSTIC} {my_discriminator 49152}
{your_discriminator 0} {rx_req_min_echo_rx_interval 0}}}}} {status 1}

To retrieve BFD MPLS session statistics from the specified port:

set stats [emulation bfd info
    mode= mpls_stats
    port_handle= port3]

Sample Output:

{router1 {{0 {{tx_interval 1000} {rx_min_rate 0} {rx_desired_min_rx_interval
1000} {tx_min_rate 0.854} {rx_avg_rate 0} {rx_count 0} {rx_max_rate 0}
{flap_count 0} {tx_max_rate 1.333} {tx_count 27} {tx_avg_rate 1.043}
{bfd_control_bits 8} {last_bfd_diagnostic_error_rx NO_DIAGNOSTIC} {timeout_count
0} {bfd_session_state DOWN} {fec_info {Static LSP: 100}} {bfd_diagnostic_code
NO_DIAGNOSTIC} {my_discriminator 49152} {your_discriminator 0}
{rx_req_min_echo_rx_interval 0}}}}} {router2 {{0 {{tx_interval 1000} {rx_min_rate
0} {rx_desired_min_rx_interval 1000} {tx_min_rate 0.854} {rx_avg_rate 0}
{rx_count 0} {rx_max_rate 0} {flap_count 0} {tx_max_rate 1.333} {tx_count 25}
{tx_avg_rate 0.967} {bfd_control_bits 8} {last_bfd_diagnostic_error_rx
NO_DIAGNOSTIC} {timeout_count 0} {bfd_session_state DOWN} {fec_info {Static PW::

1000/0.0.3.232 (global) 167772162/10.0.0.2 (node) 1000/0.0.3.232 (ac)}}
{bfd_diagnostic_code NO_DIAGNOSTIC} {my_discriminator 49153} {your_discriminator
0} {rx_req_min_echo_rx_interval 0}}} {1 {{tx_interval 1000} {rx_min_rate 0}
{rx_desired_min_rx_interval 1000} {tx_min_rate 0.854} {rx_avg_rate 0} {rx_count
0} {rx_max_rate 0} {flap_count 0} {tx_max_rate 1.333} {tx_count 27} {tx_avg_rate
1.044} {bfd_control_bits 8} {last_bfd_diagnostic_error_rx NO_DIAGNOSTIC}
{timeout_count 0} {bfd_session_state DOWN} {fec_info {Static PW: 1000/0.0.3.232
(global) 167772162/10.0.0.2 (node) 1001/0.0.3.233 (ac)}} {bfd_diagnostic_code
NO_DIAGNOSTIC} {my_discriminator 49154} {your_discriminator 0}
{rx_req_min_echo_rx_interval 0}}}}} {status 1}

End of Procedure Header