PIM Functions

emulation pim config

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

Purpose:
Creates, modifies, or deletes one or more emulated Protocol Independent Multicast (PIM) routers on a Spirent HLTAPI chassis. PIM is a multicast routing protocol that uses the underlying unicast routing information base to make multicast routing decisions. PIM is not dependent on any unicast routing protocol.

Synopsis:

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

   emulation pim config
        mode= {create|modify|delete|disable|disable_all|enable|activate|
               enable_all|active|inactive}  M]
        handle= device_handle>|<pim_session_handle>
        port_handle= <port_handle>
        bidir_capable= {1|0}
        bs_period= <1-3600>
        c_bsr_priority= <0-255>
        c_bsr_rp_addr= <a.b.c.d>
        c_bsr_rp_holdtime= <1-65535>
        c_bsr_rp_priority= <0-255>
        c_rp_addr= <a.b.c.d>
        c_rp_priority= <0-255>
        count= <1-65535>
        dr_priority= <1-4294967295>
        hello_holdtime= <1-65535>
        hello_interval= <1-65535>
        hello_max_delay= <1-65535>
        intf_ip_addr= <a.b.c.d>
        intf_ip_addr_step= <a.b.c.d>
        intf_ip_prefix_len= <1-128>
        ip_version= {4|6}
        join_prune_holdtime= <1-65535>
        join_prune_interval= <1-65535>
        link_local_intf_ip_addr= <a:b:c:d:e:f:g:h>
        link_local_intf_ip_addr_step= <a:b:c:d:e:f:g:h>
        link_local_intf_prefix_len= <1-128>
        mac_address_start= <aa:bb:cc:dd:ee:ff>
        neighbor_intf_ip_addr= <a.b.c.d>
        override_interval= <100-32767>
        pim_mode= {sm|ssm}
        port_handle= <a.b.c.d>
        prune_delay= <100-32767>
        prune_delay_enable= {1|0}
        router_id= <a.b.c.d>
        router_id_step= <a.b.c.d>
        source_group_mapping= {fully_meshed|one_to_one}
        type= {remote_rp | c_bsr}
        vlan_cfi= {1|0}
        vlan_id= <0-4095>
        vlan_id_mode= {fixed|increment}
        vlan_id_step= <1-4094>
        vlan_user_priority= <0-7>
        vlan_outer_id= <0-4095>
             vlan_outer_cfi= {1|0}
             vlan_outer_id_mode= {fixed|increment}
             vlan_outer_id_step= <1-4094>
             vlan_outer_user_priority= <0-7>
        tunnel_handle= <gre_tunnel_handle>
        expand= {true|false} S

Arguments:

bidir_capable
                Determines whether to send the BIDIR option in Hello
                messages. Valid values are 0 (disabled) and 1 (enabled). The
                default is 0. If enabled, the BIDIR option is included in
                the Hello messages. Spirent HLTAPI does not support the BI-
                DIR specification. However, Spirent HLTAPI does allow this
                option to be sent in the Hello message.

bs_period
                Specifies the frequency in seconds with which bootstrap
                messages are transmitted. This option is applicable only if
                the PIM session is configured as a candidatebootstrap
                router (CBSR). Possible values range from 1 to 3600. The
                default is 60.

c_bsr_priority
                Specifies the 8bit priority of the emulated bootstrap
                router (BSR). Possible values range from 0 (lowest) to 255
                (highest). The default is 192 for "mode create". This
                option is applicable only if the PIM session is configured
                as a candidatebootstrap router (C-BSR).

c_bsr_rp_addr
                Defines a list of the Rendezvous Point (RP) addresses to use
                in Bootstrap messages of a simulated CBSR. You must also
                specify the c_bsr_rp_handle when using this argument. RP
                lists must be of the same length.

c_bsr_rp_holdtime
                Defines a list of the hold times specified by the candidate
                Rendezvous Point (RP) router to use in the Bootstrap
                messages of a simulated CBSR. Possible values range from 1
                to 65535. The default is 150. RP lists must be of the same
                length. You must specify the c_bsr_rp_handle to use this
                option.

c_bsr_rp_priority
                The priority specified by the candidate Rendezvous Point
                (RP) router. Possible values range from 0 to 255. The
                default is 0. RP lists must be of the same length. You
                must specify the c_bsr_rp_handle to use this option.

c_rp_addr
                Specifies the IP address of the Rendezvous Point (RP) being
                used in CRP-Advertisement. This option is applicable only
                if the PIM session is configured as a candidate Rendezvous
                Point router (CRP).

c_rp_bsr_addr
                Specifies the IP address of the BSR to which the CRP-
                Advertisement is sent. This option is applicable only
                if the PIM session is configured as a candidate Rendezvous
                Point router (CRP).

c_rp_group_addr
                Defines multicast group address to advertise in CRP-Adv
                messages of a simulated CRP. This represents a multicast
                group for which the CRP can serve as RP. No default. This
                argument is `Mandatory` for create mode (mode create). If it
                is a list, the size must be the same as
                c_rp_group_prefix_len for create mode and the same as
                c_rp_group_handle for modify mode. You must also specify
                the c_rp_group_mode argument.

c_rp_priority
                The priority specified by the candidate Rendezvous
                Point (RP) router. This value is sent as an option in the
                Hello message. Possible values range from 0 to 255. The
                default is 192 for create mode. This option is applicable
                only if the PIM session is configured as a candidate
                Rendezvous Point router (CRP).

count
                Defines the number of PIM routers to create on the
                interface. Possible values range from 1 to 65535. The
                default is 1.

dr_priority
                The Designated Router (DR) priority of this router. This
                value is sent as an option in the Hello message. Possible
                values range from 1 to 4294967295. The default is 0.

handle
                Specifies the PIM session of the router to create, modify,
                delete, enable or disable. For modify mode, specify only one
                handle. For delete, enable, disable,active or inactive, you can
                specify a list of handles. This argument is `Mandatory` for
                modify,delete, disable, disable_all, active and inactive modes.
                (Please refer to the description of the mode argument for more
                information)

hello_holdtime
                Defines the session expiration interval in seconds. The
                expiration interval determines how long to wait for a
                KEEPALIVE message before ending a PIM session for an
                emulated router. Spirent HLTAPI also uses the
                hello_holdtime value to determine the interval between
                transmitted KEEPALIVE messages. The transmission interval is
                onethird of the session expiration interval. Possible
                values range from 1 to 65535. The default is 3.5 times the
                hello_interval.

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

hello_max_delay
                Randomized interval, in seconds, for initial Hello message
                on boot up or triggered Hello message to a rebooting
                neighbor. Possible values range from 1 to 65535. The default
                is 5.

intf_ip_addr
                Specifies the IP address of the emulated PIM router on the
                test port. The default is the (first) tester IP address
                configured for the link between the test port and SUT
                interface.

intf_ip_addr_step
                Specifies the amount by which to increment the first
                interface IP address to generate each subsequent addresses
                for consecutive routers. The default (for "mode create"
                only) is 0.0.0.1 for IPv4 addresses and 0::0100 for IPv6
                addresses.

intf_prefix_length
                Specifies the length of the network prefix, which is the
                network part of the IP address. For example, 24 indicates
                that the first 24 bits of the IP address are shared by all
                devices in the network. 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.


ip_version
                Specifies the IP version of the multicast traffic to be sent
                through the emulated PIM router. Possible values are 4 (for
                IPv4 address format) or 6 (for IPv6 address format). The
                default is 4.

join_prune_holdtime
                Specifies the hold time, in seconds, a receiving router must
                keep the Join state alive to advertise Join/Prune messages.
                Possible values range from 1 to 65535. The default is 3.5
                times the join_prune_interval.

join_prune_interval
                Specifies the frequency, in seconds, at which Join/Prune
                messages (also called "t_periodic" in RFCs) are sent.
                Possible values range from 1 to 65535. The default is 60.

link_local_intf_ip_addr
                Specifies the link local address for the first session.
                The default is FE80::0.

link_local_intf_ip_addr_step
                Specifies the link local address step value. The default is
                0000::1

link_local_intf_prefix_len
                Specifies the length of the link local address prefix.
                Possible values for IPv6 addresses range from 1 to 128; the
                default is 64.

mac_address_start
                Specifies the MAC address for the first session created for
                the PIM configuration. The default is 00:10:94:00:00:02.

mode
                Specifies the action to perform. Possible values are create,
                delete, disable, disable_all, enable, enable_all or active,
                inactive. There is no default, you must specify a mode.
                The modes are described below::


                 create - When port_handle is provided, Spirent HLTAPI
                          creates one or more emulated routers and starts router
                          communication for those routers, or starts router
                          traffic for existing routers associated with the
                          specified port. To create routers, specify the
                          port_handle argument and additional arguments to
                          supply address information for the emulated routers. To
                          start existing routers, specify only the port_handle
                          and mode arguments; in this case, Spirent HLTAPI
                          starts communication for all PIM routers that are
                          associated with the specified port. When handle is
                          provided, PIM session will be enabled over the
                          specified device.

                 modify - Changes the configuration for the emulated router
                          identified by the handle argument. You must specify a
                          valid PIM session handle. See the description for handle.

                 delete - Deletes the PIM router specified in the handle
                          argument. You must specify a valid PIM session handle.
                          (See the handle argument description for more
                          information.)

                 active - Enables the PIM router specified by the handle
                          argument. You must specify a valid PIM session handle.
                          (See the handle argument description for more
                          information.)

                 inactive - Disables the PIM router specified by the handle
                          argument. You must specify a valid PIM session handle.
                          (See the handle argument description for more information.)
                          The configuration for the router is retained when it is
                          inactive and is available as configured if the router is
                          active.

                 activate - Used for `scaling` scenarios.
                          1. Enables PIM devices and configures PIM 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 pim config`` function for more
                             information. For this mode, only the following set of
                             options are valid::


                               dr_priority
                               ip_version
                               pim_mode

                        2. Creates devices and enables PIM 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.

                Note:
                 1. Most options are generally configured in create or
                    modify mode. Specifying "mode disable" or "mode
                    disable_all"is the same as specifying "mode delete".
                    Likewise, specifying "mode enable" or "mode enable_all" is
                    the same as specifying "mode create".

                 2. For mode create, When -handle is provided, the following
                    options will be obsoleted::

                     count
                     mac_address_start
                     intf_ip_addr
                     intf_ip_addr_step
                     intf_prefix_length
                     link_local_intf_ip_addr
                     link_local_intf_ip_addr_step
                     link_local_intf_prefix_len
                     gateway_ip_addr
                     gateway_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

neighbor_intf_ip_addr
                A list of interface IP addresses of the PIM peer on the
                connected SUT interface. The default is the (first) SUT IP
                address configured for the link between the test port and
                SUT interface.

override_interval
                The delay interval (Join/Prune override interval), in
                milliseconds, for randomizing the transmission time of
                override messages. Possible values range from 100 to 0x7FFF.
                The default is 2500.

pim_mode
                Specifies the emulated router's PIM mode, which determines
                whether the PIM global router is running PIMSparse Mode
                (PIMSM) or PIMSource Specific Mode (PIMSSM) and
                whether the group configuration is (S,G) or (*,G)+RP.
                Possible values are::


                 sm - The PIMSM protocol exists exclusively between routers.
                    Hosts (sources or receivers) do not participate in
                    the protocol. PIMSM shares many of the common
                    characteristics of a routing protocol, such as
                    discovery messages, topology information, and error
                    detection and notification. PIMSM also differs from
                    traditional protocols since it does not participate in
                    any kind of exchange of databases.

                    In PIMSM mode, the router supports all three group
                    types: (S,G), (*,*,RP), and (*,G). The default is sm.

                 ssm - PIM Source Specific Mode is a method to augment PIMSM
                    multicast routing. PIMSSM requires the first hop
                    router to build shortest path trees to all possible
                    destinations. This proposal bypasses the requirement
                    for any rendezvous points. This is a way to simplify
                    communications for smaller multicast groups. PIMSSM is
                    described in RFC 3569, "An Overview of SourceSpecific
                    Multicast (SSM)".

                    In PIMSSM mode, the router will not send Join/Prune
                    messages for groups that are not (S,G). You cannot add
                    (*,*,RP) or (*,G) groups.

port_handle
                The port on which to create the emulated PIM router. This
                handle is returned by the ``connect`` function.
                (Please refer to the description of the mode argument for more
                information)

prune_delay
                Expected message propagation delay (LAN prune delay) in
                milliseconds. Possible values range from 100 to 0x7FFF.
                The default is 500.

prune_delay_enable
                Enables or disables the LAN prune delay. Valid values are 0
                (disabled) and 1 (enable). The default is 0. Set this value
                to 1 to include the LAN Prune Delay option in PIM Hello
                messages.

router_id
                Identifies the emulated PIM router. The router ID is a 32-
                bit value, represented in dot notation. 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 PIM routers on the
                interface. You must specify a step value when the count
                value is greater than 1. The default is 0.0.0.1.

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

                Specifies the distribution option from multicast groups to
                sources when adding PIM register groups. Possible values are::


                 fully_meshed - Each source is messed with all multicast
                               group addresses

                 one_to_one - One source is paired with one multicast group

                The default value is one_to_one.

type
                Configures a PIM session router on a test port to simulate
                one of the following::


                  remote_rp   Designated Router using a remote rendezvous
                              point router. This is the default value.

                  c_rp       CRP (Candidate RP) that sends CRP-Adv messages
                             to be elected RP. This option is not supported.

                  c_bsr     CBSR (Candidate BootStrap Router) that sends
                            Bootstrap messages to be elected BSR.

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
                Token Ring and packets are dropped by Ethernet ports. If set
                to 0, it indicates the network is Ethernet.

vlan_id
                The VLAN ID of the emulated router node. Possible values
                range from 0 to 4095. The default is 1.

vlan_id_mode
                Specifies VLAN ID assignment for multiple router
                configurations when count is greater than 1. Valid values
                are "fixed" or "increment". If you specify "fixed", all of
                the routers will be assigned the same VLAN ID (the value of
                the vlan_id argument). If you specify "increment", then
                Spirent HLTAPI assigns unique VLAN IDs. When you use
                increment mode, you must also specify the vlan_id_step
                argument to define the increment value.

vlan_id_step
                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_mode argument and the router
                count (count) is greater than 1. Possible step values range
                from 1 to 4094.

vlan_user_priority
                VLAN priority assigned to emulated router nodes on this
                port. Possible values range from 0 to 7. The default is 0.

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

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

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

                Specifies whether the Canonical Format Indicator (CFI)
                value is set for the VLAN outer header. Possible values
                are 0 or 1. The default is 0.

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

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


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

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

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

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

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

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

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

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

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

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

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

Arguments Unsupported by Save as HLTAPI:

None

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:

intf_ip_prefix_length
The prefix length on the interface. The default is 24.
gateway_intf_ip_addr
The gateway IP address of the port interface

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:

     reset

Note: For more information about Spirent HLTAPI Wrapper, refer to Chapter 4
          Spirent HLTAPI Wrapper in Spirent HLTAPI Programmer's Reference.
Ciscospecific Arguments:

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

c_bsr_addr
c_bsr_adv
c_bsr_group_addr
c_bsr_group_admin
c_bsr_group_bidir
c_bsr_group_prefix_len
c_bsr_rp_handle
c_bsr_rp_mode
c_rp_adv
c_rp_adv_holdtime
c_rp_adv_interval
c_rp_group_admin
c_rp_group_bidir
c_rp_group_handle
c_rp_group_mod
c_rp_group_prefix_len
gre_checksum_enable
gre_key_enable
gre_key_in
gre_key_out
keepalive_period
register_probe_time
register_suppression_time
mvpn_enable
mvpn_pe_count
mvpn_pe_ip
mvpn_pe_ip_incr
mvrf_count
default_mdt_ip
default_mdt_ip_incr
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    A handle or a list of handles that identify the routers created
          by the ``emulation pim config`` function.

handle_list
          A list of emulated devices with enabled PIM configuratin created by
          ``emulation pim 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 emulation pim config function creates, modifies, or deletes an emulated PIM 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 emulated router, use the port_handle argument to specify the Spirent HLTAPI port that the emulated router will use for PIM 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 specify one or more of the following attributes which determine the protocols (routing and multicast traffic) and characteristics of the PIM communication:

  • The PIM mode (sm or ssm) (the pim_mode argument)
  • The designated router priority (the dr_priority argument)
  • The ID for the emulated router on the network (the router_id argument)
  • The IP address for the PIM router (SUT) to communicate with (the intf_ip_addr argument)
  • The IP version (IP_V4 or IP_V6) of the multicast traffic to be sent through the router (the ip_version argument)
Note: For IPv4 traffic, you also set the testerIp and ipv4PrefixLen
attributes. For IPv6 traffic, you also set the ipv6TesterIp, ipv6TesterLinkLocal, and ipv6PrefixLen attributes.
  • Support for subinterface access to VLANs (see the vlan* arguments)
  • Hello message settings (the hello_holdtime, hello_interval, and hello_max_delay.arguments)
  • Prune/Join characteristics (the prune_delay, prune_delay_enable, join_prune_holdtime, override_interval, and -join_prune_interval arguments)
  • Neighbor configuration (the neighbor_intf_ip_addr argument).
  • Bootstrap routing (the enableBSR, c_bsr_priority, c_bsr_rp_addr, and bs_period, and -c_bsr_rp_holdtime arguments).
  • Additional arguments such as bidirectional transmission (the bidir_capable argument)

When you create a router, Spirent HLTAPI starts the router communication.

Once you start sessions by creating routers, Spirent HLTAPI handles all of the message traffic for the emulated routers. During the test, use the emulation pim control start=individual routers. To stop and start all of the routers associated with a particular port, use the disable and enable modes with the emulation pim config function. After you have created the routers for your test, use the emulation pim group config function to set up routes.

Examples:

The following example creates a PIM router:

set returnedString [::emulation pim config
     port_handle= $port1Handle
     mode "create" pim_mode= "sm"
     port_handle= $port1Handle
     count 1 ip_version 4 type= "remote_rp"
     router_id 41.1.0.2 router_id_step= 0.0.1.0
     intf_ip_addr 41.1.0.2 intf_ip_addr_step= 0.0.1.0
     intf_ip_prefix_len= 24
     mac_address_start= 00:00:00:00:00:05
     neighbor_intf_ip_addr= {41.1.0.1}
     c_bsr_rp_addr 220.1.1.1 c_bsr_priority= 1
     bidir_capable= 0
     bs_period 60 dr_priority= 1
     hello_holdtime 105 hello_interval 30 hello_max_delay= 30
     join_prune_holdtime 210 join_prune_interval= 60
     override_interval= 100
     prune_delay 100  prune_delay_enable= 1]

The following example starts a PIM router:

keylget returnedString handle upStreamRtrList
::emulation pim control
     mode= start
     port_handle= $port1Handle
     handle= $upStreamRtrList

Sample output for example shown above:

{router_id 41.1.0.2} {router_state NEIGHBOR} {upstream_neighbor_addr
41.1.0.1} {j_p_pdu_rx 0.000000} {bsm_rx 1.000000} {j_p_pdu_tx 4.000000}
{bsm_tx 0.000000} {hello_rx 2.000000} {crp_rx 0.000000} {hello_tx 3.000000}
{group_assert_rx 0.000000} {s_g_join_rx 0.000000} {s_g_join_tx 0.000000}
{handle router1} {reg_stop_rx 0.000000} {group_join_rx 0.000000}
{duration 45.136785984} {group_join_tx 20.000000} {reg_rx 0.000000} {status
1}

The following example creates a PIM session over a provided device:

puts "Config LDP--------------------"
set routerStatus [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
                                   PIM_registration=         1
                                   ]
puts "LDP:  $routerStatus"
keylget routerStatus handle router

puts "Config PIM--------------------"
set routerStatus [emulation pim config mode=create
                                 handle=               $router
                                 type=                remote_rp
                                 ip_version=           4
                                 dr_priority=           5
                                     ]
puts "PIM:  $routerStatus"

Sample output for example shown above:

Config LDP--------------------
LDP:  {handle router1} {handles router1} {status 1}
Config PIM--------------------
PIM:  {handle router1} {handles router1} {status 1}

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

set pim_ret [emulation pim config
            mode=                                            activate
            port_handle=                                     $port1
            count=                                           2
            block_mode=                                      ONE_DEVICE_PER_BLOCK
            block_name_index=                                1
            dr_priority=                                     1
            ip_version=                                      6
            pim_mode=                                        sm
            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=                              {::7 ::3}
            ipv6_step_per_port=                              ::5
            intf_prefix_len=                                 22
            link_local_ipv6_step_per_port=                   ::9
            link_local_ipv6_step_per_vlan=                   {::7 ::3}
            name=                                            DEVICE_BLOCK_PIM_ROUTER
            vlan_user_pri=                                   3
            vlan_id_count=                                   2
            vlan_outer_id_count=                             1
            vlan_outer_user_pri=                             4
            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}} {handles {emulateddevice1
emulateddevice2 emulateddevice3 emulateddevice4}} {handle {}}

emulation pim control

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

Purpose:
Starts or restarts a PIM router for the specified port, or stops a PIM router from routing traffic for the specified ports or groups.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation pim control
        mode= {stop|start|restart|join|prune} M
        port_handle= <port_handle_list> M
        group_member_handle= <handle>
        handle= <PIM_session_handle_list>

Arguments:

group_member_handle
                Sets one or more group member pool handles.

handle
                Specifies a list of sessions on which to take the specified
                action: stop the router, start or restart the router, and
                join or prune groups.

mode
                Specifies the action to be taken.  This argument is `Mandatory`.
                Possible values are::


                 stop     Stops the router on the specified port

                 start    Starts the router on the specified port.

                 restart  Stops and then starts the router on the
                          specified port.

                 join    If handle <PIM_session_handle> is specified, joins
                         all groups on this session. If group_member_handle
                         <group_handle> is specified, joins only the specified
                         groups. If no handle is provided, joins all of the
                         session groups on this port.

                 prune   If "handle <PIM_session_handle>" is specified,
                         prunes all groups on this session. If
                         "group_member_handle <handle>" is specified, prunes
                         only the specified groups. If no handle is provided,
                         prunes all of the session groups on this port.

port_handle
                Specifies a list of ports on which to take the specified action to
                stop the router, start or restart the router, and join or
                prune groups. This argument is `Mandatory`. If you did not
                specify a handle (handle), the specified action (-mode) is
                applied to all session routers on this port. The port handle
                is returned by the ``connect`` function.
Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:
None

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:

    flap_interval
    flap

Note: For more information about Spirent HLTAPI Wrapper, refer to Chapter 4
          Spirent HLTAPI Wrapper in Spirent HLTAPI Programmer's Reference.
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):

stopped   Stopped (1) or Running (0)
status    Success (1) or failure (0) of the operation.
log       An error message (if the operation failed).
Description:
The emulation pim control function controls the routing of traffic through the specified ports. You can use the function to perform three actions: starting routers, stopping routers, and restarting routers. When you call the emulation pim control function, you specify a port handle. Spirent HLTAPI applies the specified action to all of the sessions associated with the specified port.

Examples:

To start the PIM router on the specified port:

::emulation pim control
     mode= start
     handle= router1
     port= $port1Handle

To stop the PIM router on the specified port:

::emulation pim control
     mode= stop
     port= $port1Handle

To restart the PIM router on the specified port:

::emulation pim control
     mode= restart
     port= $port1Handle

To join the PIM router on the specified port:

::emulation pim control
     mode= join
     port_handle= $port1Handle
     handle= $router
     group_member_handle= $groupMemberHandle(1)

To prune the PIM router on the specified port:

::emulation pim control
     mode= prune
     port_handle= $port1Handle
     handle= $router
     group_member_handle= $groupMemberHandle(2)
Note: groupMemberHandle(1) must be created by the ::emulation pim group config
function before using either join or prune mode.

Sample Output:

{router_id 41.1.0.2} {router_state NEIGHBOR} {upstream_neighbor_addr
41.1.0.1} {j_p_pdu_rx 0.000000} {bsm_rx 1.000000} {j_p_pdu_tx 4.000000}
{bsm_tx 0.000000} {hello_rx 2.000000} {crp_rx 0.000000} {hello_tx 3.000000}
{group_assert_rx 0.000000} {s_g_join_rx 0.000000} {s_g_join_tx 0.000000}
{handle router1} {reg_stop_rx 0.000000} {group_join_rx 0.000000}
{duration 45.136785984} {group_join_tx 20.000000} {reg_rx 0.000000} {status
1}

emulation pim group config

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

Purpose:
Configures multicast groups added to a PIM session, which enables you to add (*,G) or (S,G) entries to a PIM session.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation pim group config
        mode= {create|modify|delete} M
        group_pool_handle= <handle>
        group_pool_mode=  {send | register}
        session_handle= <PIM_host_handle>
        source_pool_handle= <list of IP addresses
        handle= <PIM_group_membership_handle>
        interval= <1-1000>
        join_prune_per_interval= <1-1000>
        rate_control= {0|1}
        register_per_interval= <1-1000>
        register_stop_per_interval= <1-1000>
        rp_ip_addr= <a.b.c.d>
        wildcard_group= {0|1}
        count= <integer>
        ip_addr_start= {<a.b.c.d> |  <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>}
        ip_addr_step= <integer> | <a.b.c.d> | <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        ip_prefix_len= <1-128>
        num_groups= <1-65535>
        ip_group_mem_step= <a.b.c.d> | <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
        rp_ip_addr_step= <a.b.c.d>

Arguments:

group_pool_handle
                Specifies the name of the group (that is, the list of
                multicast IP addresses) to link to the session during
                create mode. Before specifying the group pool handle, use
                the ``emulation multicast group config`` function to add
                the group pool. See "Multicast APIs" in the "Spirent
                TestCenter HLTAPI Command Reference" document for
                information about the emulation multicast group config
                and ``emulation multicast source config`` functions.


group_pool_mode
                Specifies how the membership pool is used to process
                PIM messages. Possible values are::


                 send       Send Join/Prunes (downstream DR) messages

                 register   Send Register and NULL Register messages (source DR)
                            and receive StopRegister messages

                The default value is send.

handle
                Sets group membership handle that associates group pools
                with a PIM host. The handle is returned after linking to the
                specified group pool in create mode. In modify mode, you
                must use the membership handle (handle) in conjunction with
                the session handle (session_handle) to identify the
                multicast group pools.

                Note: The PIM hosts, specified by session_handle, join the
                      multicast groups, specified by the group_pool_handle.
                      So, both arguments are `Mandatory` for mode create and
                      mode modify.

                      If handle is not specified in modify mode, it will
                      modify all the created PIM group memberships that
                      are associated with the specified PIM host.

interval
                Specifies the minimum gap, in milliseconds, between
                between successive PIM messages. If you specify 0, Spirent
                HLTAPI sends PIM messages as fast as possible. Possible
                values range from 1 to 1000. The default is 1000.

join_prune_per_interval
                Specifies the number of Join/Prune messages sent per
                interval. Possible values range from 1 to 1000. The
                default is 1000.

mode
                Specifies the action to perform. Possible values are create,
                modify, and delete. There is no default; you must
                specify a mode. The modes are described below::


                 create   Starts emulation on the port specified with
                          handle and associates an existing multicast group
                          pool (group_pool_handle) with the specified PIM host
                          (that is, joins the membership).

                 modify   Changes the configuration identified by the handle
                          argument by applying the parameters specified in
                          subsequent arguments.

                 delete   Remove one group of pools from this session.

rate_control
                Enables rate control on Join/Prune and register messages
                when set to 1 (enable). Possible values are 0 (disable) and
                1 (enable). The default is 0.

register_per_interval
                Specifies the number of Register messages sent per interval.
                Possible values range from 1 to 1000. The default is 100.

register_stop_per_interval
                Specifies the number of Register Stop messages sent per
                interval. Possible values range from 1 to 1000. The default
                is 100.

rp_ip_addr
                Specifies the IP address of Rendezvous Point router for the
                multicast group pool.

session_handle
                Specifies the handle of the PIM host on which to configure
                the PIM group ranges.

source_pool_handle
                Specifies the handle of the source pool (a list of nonmulticast
                source IP addresses) to associate with the groups in mode create.
                Use this argument if the host requests only specific information
                within the multicast group specified by group_pool_handle.
                Before specifying this argument, use the
                ``emulation multicast source config`` function to add source
                pools. See Multicast Functions for information about the
                emulation multicast source config and
                ``emulation multicast group config`` functions.

wildcard_group
                Specifies whether the emulated PIM router will join wildcard
                groups. Possible values are 1 (enable) and 0 (disable). When
                enabled, Join/Prune messages are sent. Wildcard groups
                take effect only when sourcespecific groups (S,G) are
                disabled (no source pool). The default is 0. For wildcard
                groups, you must specify the RPR address (rp_ip_addr).

count
                Specifies number of PIM group blocks. The
                default value is 1.

ip_addr_start
                Specifies the first multicast group address in the group
                pool. The default for IPv4 is 224.0.0.1. If you do not enter
                an IPv6 address, the default IPv4 address is used. This option
                will create multicast groups and map to PIM group sessions when
                group_pool_handle option is not configured.

ip_addr_step
                Specifies the amount by which to increment the first multicast
                group address to generate each subsequent group address in the
                group pool. This argument can be configured either in integer
                format or in IPv4 address format or in IPv6 address format.
                The IPv4 or IPv6 address is automatically converted to an
                integer value and then used as the address increment. Possible
                values range from 0 to 4294967295. The default value is 1.
                This option will create multicast groups and map to PIM group
                sessions when group_pool_handle option is not configured.

ip_prefix_len
                Sets the bit in the address by which to change the step
                value to generate each subsequent address in the pool.
                Possible values range from 1 to 128. The default for IPv4
                addresses is 32. The default for IPv6 is 128.
                This option will create multicast groups and map to PIM group
                sessions when group_pool_handle option is not configured.

num_groups
                Specifies the number of multicast groups in the group pool.
                Possible values range from 1 to 65535. The default is 1.
                This option will create multicast groups and map to PIM group
                sessions when group_pool_handle option is not configured.

ip_group_mem_step
                Specifies the amount by which to increment the IP address
                between the specified multicast groups. This argument can
                be configured either in IPv4 address format or in IPv6
                address format. This option will create multicast groups and
                map to PIM group sessions when group_pool_handle option is
                not configured.

rp_ip_addr_step
                Specifies the step value to increment IP address of Rendezvous
                Point router for the multicast group pool. This option will be
                used when group_pool_handle option is not configured.

Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:

s_g_rpt_group
When enabled, Join/Prune messages are sent. Possible values are 1 (enable) and 0 (disable). Takes effect only if sourcespecific groups are enabled.

Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:

    join_prune_aggregation_factor
    flap_interval
    spt_switchover
    switch_over_interval

Note: For more information about Spirent HLTAPI Wrapper, refer to Chapter 4
          Spirent HLTAPI Wrapper in Spirent HLTAPI Programmer's Reference.
Ciscospecific Arguments:

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

border_bit
group_pool_mode
join_prune_aggregation_factor
s_g_rpt_group
Return Values:

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

handle
              Identifies the handle of the group (PIM_group_config_handle)
              created by the ``emulation pim group config`` function.

group_pool_handle
              Identifies the group pool handle used by the
              ``emulation pim group config`` function to configure or modify
              the group member.

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

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

The emulation pim group config function configures or modifies a group of PIM hosts where each group share a set of common characteristics. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)

Before using this function, you must specify “mode create” when configuring PIM host emulation on a port and initialize the port handle argument (using the emulation pim config function).

You can link groups of multicast IP addresses to any interested host or just a subset of IP addresses within each group.

Examples:

The following example configures the hosts, represented by “upStreamRtr”, to subscribe to the multicast group(s) represented by “mcastGrpPoolHandle(1)”:

set returnedString [::emulation pim group config
   mode= "create"
   group_pool_handle= $mcastGrpPoolHandle(1)
   session_handle= $upStreamRtr
   interval= 0
   rate_control= 0
   rp_ip_addr= 220.1.1.1
   wildcard_group= 0]

Sample output for example shown above:

{handle pimv4groupblk1} {group_pool_handle ipv4group1} {status 1}

The following example configures 5 PIM sessions on each PIM router, and each PIM session creates a multicast group and mapped with it. The IP address of Rendezvous Point router will be increment by the rp_ip_addr_step value for subsequent PIM sessions.

set pim_group0 [emulation pim group config
mode= create session_handle= “router1 router2 router3” interval= 1 rate_control= 0 count= 5 rp_ip_addr= 10.1.1.1 ip_addr_start= 224.1.0.1 ip_addr_step= 3 ip_prefix_len= 21 num_groups= 3 ip_group_mem_step= 0.1.1.0 rp_ip_addr_step= 0.1.1.1 ]

Sample output for example shown above:

{handle {pimv4groupblk1 pimv4groupblk2 pimv4groupblk3 pimv4groupblk4
pimv4groupblk5 pimv4groupblk6 pimv4groupblk7 pimv4groupblk8 pimv4groupblk9
pimv4groupblk10 pimv4groupblk11 pimv4groupblk12 pimv4groupblk13 pimv4groupblk14
pimv4groupblk15}} {group_pool_handle {ipv4group1 ipv4group2 ipv4group3 ipv4group4
ipv4group5 ipv4group6 ipv4group7 ipv4group8 ipv4group9 ipv4group10 ipv4group11
ipv4group12 ipv4group13 ipv4group14 ipv4group15}} {status 1}

emulation pim info

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

Purpose:
Returns statistics about the PIM group activity on the specified handle. Statistics include the connection status and number and type of messages sent and received from the specified port.

Synopsis:

Note: M indicates the argument is `Mandatory`.

     emulation pim info
        handle= <PIM_session_handle>  M

Arguments:

handle
          Specifies the PIM session handle upon which host emulation is
          configured. This argument is `Mandatory`. This value is returned by
          the ``emulation pim config`` function.
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.

bsm_tx
               Number of Bootstrap messages sent.

bsm_rx
               Number of Bootstrap messages received.

crp_tx
               Number of candidate Rendezvous Point (RP)
               Advertisements sent.

crp_rx
               Number of candidate Rendezvous Point (RP)
               Advertisements received.

hello_tx
               Number of PIMHello messages sent.

hello_rx
               Number of PIMHello messages received.

group_join_tx
               Number of (*,G) Join messages sent.

group_join_rx
               Number of (*,G) Join messages received.

j_p_pdu_tx
               Number of Join/Prune messages sent.

j_p_pdu_rx
               Number of Join/Prune messages received.

reg_tx
               Number of Register messages sent.

reg_rx
               Number of Register messages received.

reg_stop_tx
               Number of RegisterStop messages sent.

reg_stop_rx
               Number of RegisterStop messages received.

s_g_join_tx
               Number of (S,G) Join messages sent.

s_g_join_rx
               Number of (S,G) Join messages received.
Ciscospecific Arguments:

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

duration
s_g_assert_tx
s_g_assert_rx
null_reg_tx
null_reg_rx
bsm_rp_tx
bsm_rp_rx
bsm_group_tx
bsm_group_rx
graft_tx
graft_rx
graft_ack_tx
graft_ack_rx
group_assert_tx
group_assert_rx
group_prune_tx
group_prune_rx
s_g_prune_tx
s_g_prune_rx
Description:

The emulation pim info function provides information about the messages sent and received on the specified PIM handle.

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 pim info handle=$handle1

Sample Output:

{router_id 41.1.0.2} {router_state NEIGHBOR} {upstream_neighbor_addr
41.1.0.1} {j_p_pdu_rx 0.000000} {bsm_rx 1.000000} {j_p_pdu_tx 4.000000}
{bsm_tx 0.000000} {hello_rx 2.000000} {crp_rx 0.000000} {hello_tx 3.000000}
{group_assert_rx 0.000000} {s_g_join_rx 0.000000} {s_g_join_tx 0.000000}
{handle router1} {reg_stop_rx 0.000000} {group_join_rx 0.000000}
{duration 45.136785984} {group_join_tx 20.000000} {reg_rx 0.000000} {status 1}

End of Procedure Header