Device Configuration Functions

emulation device config

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

Purpose:

Spirent Extension (for Spirent HLTAPI only).

Used to configure, modify or delete emulated devices

Synopsis:

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

     emulation device config
           mode= {create|modify|delete} M
           port_handle= <port_handle>
           handle= < device_handle>
           block_mode= {one_host_per_block|one_device_per_block|
                               one_network_per_block|
                               multiple_networks_per_block|
                               multiple_device_per_block} S]
           expand= {true|false} S
           count= <integer>
           encapsulation= {ethernet_ii|ethernet_ii_vlan|ethernet_ii_qinq|ethernet_ii_mvlan}
           enable_ping_response= {1|0}
           enable_gw_learning= {true|false}
           gateway_mac= <aa:bb:cc:dd:ee:ff>
           resolve_gateway_mac= {true|false}
           ipv6_gateway_mac= <aa:bb:cc:dd:ee:ff>
           ipv6_resolve_gateway_mac= {true|false}
           ip_version= {ipv4|ipv6|ipv46|none}
           intf_ip_addr= <a.b.c.d>
           intf_ip_addr_step= <a.b.c.d>
           ip_stack_count= <0-65535>
           ip_step_per_port= <a.b.c.d>
           ip_step_per_vlan= <a.b.c.d>
                       gateway_step_per_port= <a.b.c.d>
                       gateway_step_per_vlan= <a.b.c.d>
           stack_ip_repeat= <0-65535>
           stack_ip_recycle_count= <0-65535>
           gateway_ip_addr= <a.b.c.d>
           gateway_ip_addr_step= <a.b.c.d>
           use_ip_addr_range_gateway= {true|false}
           stack_gateway_ip_repeat= <0-65535>
           stack_gateway_ip_recycle_count= <0-65535>
           use_ipv6_addr_range_gateway= {true|false}
           stack_gateway_ipv6_repeat= <0-65535>
           stack_gateway_ipv6_recycle_count= <0-65535>
           gateway_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           gateway_ipv6_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           intf_prefix_len= <1-32>
           intf_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           intf_ipv6_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           intf_ipv6_prefix_len= <1-128>
           ipv6_step_per_port= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           ipv6_step_per_vlan= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                       gateway_ipv6_step_per_port= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
                       gateway_ipv6_step_per_vlan= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           link_local_ipv6_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           link_local_ipv6_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           link_local_ipv6_prefix_len= <0-128>
           link_local_ipv6_step_per_port= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           link_local_ipv6_step_per_vlan= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           ipv6_stack_count= <0-65535>
           stack_ipv6_repeat= <0-65535>
           stack_ipv6_recycle_count= <0-65535>
           mac_addr= <aa:bb:cc:dd:ee:ff>
           mac_addr_step= <aa:bb:cc:dd:ee:ff>
           mac_addr_step_per_port= <aa:bb:cc:dd:ee:ff>
           mac_addr_step_per_vlan= <aa:bb:cc:dd:ee:ff>
           qinq_incr_mode= {inner|outer|both}
           router_id= <a.b.c.d>
           router_id_ipv6= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           router_id_step= <a.b.c.d>
           router_id_ipv6_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
           ipv6_router_id_src= {manual|use_ipv6_global_addr|use_ipv6_ll_add}
           tos= <0-255>
           tos_type= {tos|diffserv}
           traffic_class= <0-255>
           use_default_phy_mac= {true|false}
           vlan_id= <0-4095>
           vlan_id_count= <1-4096>
           vlan_id_step= <0-4095>
           vlan_id_repeat_count= <0-4294967295>
           vlan_id_stack_count= <NUMERIC>
           vlan_id_repeatmode= <REPEAT_ACROSS_PORT  | NO_REPEAT | REPEAT_ACROSS_LOWER_IF>
           vlan_user_pri= <0-7>
           vlan_outer_id= <0-4095>
           vlan_outer_id_count= <1-4096>
           vlan_outer_id_step= <0-4095>
           vlan_outer_id_repeat_count= <0-4294967295>
           vlan_outer_id_repeatmode= <REPEAT_ACROSS_PORT  | NO_REPEAT | REPEAT_ACROSS_LOWER_IF>
           vlan_outer_user_pri= <0-7>
           vlan_tpid= <0-65535>
           vlan_cfi= <0-1>
           vlan_outer_tpid= <0-65535>
           vlan_outer_cfi= <0-1>
           vlan_id_list= <0-4095>
           vlan_id_step_list= <0-4095>
           vlan_id_count_list= <0-4095>
           vlan_user_pri_list= <0-7>
           vlan_id_repeat_count_list= <0-4294967295>
           vlan_tpid_list= <0-65535>
           vlan_cfi_list= <0-65535>
           name= <string>
           block_name_index= <0-4294967295>
           count_per_block= <integer>
           count_block_per_port= <integer>
           lower_encap= {pppoe gre}
           enable_rfc4814_addresses= {true|false}
           random_seed_value= <numeric>
           gre_tnl_type= {4|6} M
           gre_tnl_addr= <a.b.c.d>
           gre_tnl_addr_step= <a.b.c.d>
           gre_tnl_addr_count= <1-2147483647>
           gre_src_mode= {fixed|increment}
           gre_src_addr= <a.b.c.d>
           gre_src_addr_step= <a.b.c.d>
           gre_src_addr_count= <1-2147483647>
           gre_dst_mode= {fixed|increment}
           gre_dst_addr= <a.b.c.d>
           gre_dst_addr_step= <a.b.c.d>
           gre_dst_addr_count= <1-2147483647>
           gre_checksum= {0|1}
           gre_keepalive= {true|false}
           gre_keepalive_interval= <integer>
           gre_keepalive_retries= <integer>
           gre_in_key= <in_key>
           gre_out_key= <out_key>
           gre_prefix_len= <integer>
           gre_seqnum_enabled= {true|false}
           gre_src_mac_addr= {<aaaa.bbbb.cccc> | <aaaa:bbbb:cccc> |<aa.bb.cc.dd.ee.ff> |
                     <aa:bb:cc:dd:ee:ff> |<aabb-cc-dd-ee-ff>}
           gre_src_mac_addr_step= {<aaaa.bbbb.cccc> | <aaaa:bbbb:cccc> | <aa.bb.cc.dd.ee.ff> |
                     <aa:bb:cc:dd:ee:ff> |<aabb-cc-dd-ee-ff>}

Arguments:

 port_handle
                 Specifies the port on which to create the emulated device. This
                 handle is returned by the ``connect`` function. It is `Mandatory`
                 for mode create.

 handle
                 Specifies the device handle. This argument is `Mandatory` for
                 mode modify and delete. For mode delete, you can also specify
                 the value all, to delete all devices.

                 Note: handle all is only valid for -mode delete.

 mode
                 Specifies the action to perform on the test port. This argument is
                 `Mandatory`. Possible values are::

                  create - Creates the device on the specified port. You must
                           specify port_handle.

                  modify - Modifies the configured device identified by handle.

                  delete - Deletes the emulated device identified by handle.

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

                 Specifies the device block mode. Emulated device objects may be
                 used to represent a single device or a block of many devices for
                 higher scalability. Emulated device blocks are not supported by
                 all protocols  (for example, routing protocols) and have less
                 granularity of control at the protocol level and in traffic
                 configuration. Possible values are described below::


                  one_device_per_block          One emulated device block is created
                                                for each device

                  one_network_per_block         One emulated device block is created
                                                for each network

                  multiple_networks_per_block   One emulated device block may represent
                                                multiple networks. Note that there
                                                are limitations to what can be
                                                represented as a single emulated
                                                device block using this mode .

                  multiple_device_per_block     Multiple devices per block

                 This argument is available for mode create.

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

                 Determines whether to expand the specified device parameters into
                 emulated device objects during `scaling` test scenarios.
                 This argument is used in `scaling` test scenarios, and available
                 for mode create, and working together with -block_mode.
                 Possible values are true and false.

                 If it is set to true, a list of emulated devices will be created
                 and their handles returned.

                 If it is set to false, param_handle will be returned, which can
                 be passed to protocol configuration APIs, for example::

                     mode activate in emulation isis config.

 count
                 Specifies the number of emulated devices to be created. The
                 default value is 1.

 router_id
                 Specifies the router ID of the emulated device. The value
                 must be in IPv4 format.

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

 enable_ping_response
                 Enables or disables the emulated device to respond to ping.
                 Possible values are 0 (disable) and 1 (enable). The default is 0.

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

                 Enables or disables IPv6 learning for the gateway IP and MAC
                 addresses. Possible values are true (enable) and false (disable).
                 The default value is false.

 gateway_mac
                 Specifies the IPv4 gateway's MAC address for the emulated device.
                 The default value is 00:00:01:00:00:01.

 resolve_gateway_mac
                 Determines whether to resolve the IPv4 gateway's MAC address.
                 Possible values are true and false. The default value is true.

 ipv6_gateway_mac
                 Specifies the IPv6 gateway's MAC address for the emulated device.
                 The default value is 00:00:01:00:00:01.

 ipv6_resolve_gateway_mac
                 Determines whether to resolve the IPv6 gateway's MAC address.
                 Possible values are true and false. The default value is true.

 ip_version
                 Defines the IP version of the emulated device. Possible values
                 are ipv4, ipv6, ipv46, and none. The default value is ipv4.

 intf_ip_addr
                 Specifies the IPv4 address of the emulated device. The default
                 value is 192.85.1.3.

 intf_ip_addr_step
                 Specifies the difference between IPv4 interface addresses of
                 consecutive devices when multiple emulated devices are created.
                 The value must be in IPv4 format. The default is 0.0.0.1.

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

                 Specifies the number of IPv4 objects to be created. Possible
                 values range from 0 to 65535. The default value is 1.

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

                 Specifies the step value by which to increment IPv4 addresses for
                 the device block per port
                 Dependency: block_mode or -expand
                 Values: IPv4

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

                 Specifies the step value by which to increment IPv4 addresses for
                 the device block per VLAN
                 Dependency: block_mode or -expand
                 Values: IPv4

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

                                     Specifies the step value by which to increment IPv4 Gateway
                                     addresses for the device block per port
                                     Dependency: block_mode or -expand
                                     Values: IPv4

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

                                     Specifies the step value by which to increment IPv4 Gateway
                                     addresses for the device block per VLAN
                                     Dependency: block_mode or -expand
                                     Values: IPv4

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

                 Specifies how many times to repeat the same IPv4 address before
                 incrementing it. Possible values range from 0 to 65535. The
                 default value is 0.

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

                 Specifies how many times to increment the IPv4 address before
                 returning to the starting value. Possible values range from 0 to
                 65535. The default value is 0.

 gateway_ip_addr
                 Specifies the IPv4 gateway address for the emulated device.

 gateway_ip_addr_step
                 Specifies the difference between IPv4 gateway addresses of
                 consecutive devices when multiple emulated devices are created.
                 The default value is 0.0.0.1.

 use_ip_addr_range_gateway
                 Specifies the same settings for gateway as the IP address range parameters
                 Possible values are true and false.
                 The default value is false.

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

                 Specifies how many times to repeat the same IPv4 gateway address before
                 incrementing it. Possible values range from 0 to 65535. The
                 default value is 0.

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

                 Specifies how many times to increment the IPv4 gateway address before
                 returning to the starting value. Possible values range from 0 to
                 65535. The default value is 0.

 use_ipv6_addr_range_gateway
                 Specifies whether to use IP address range settings for the gateway.
                 Possible values are true and false.
                 The default value is false.

 stack_gateway_ipv6_repeat
                 Specifies the gateway repeat count for the emulated device.
                 Possible values range from 0 to 65535. The default value is 0.

 stack_gateway_ipv6_recycle_count
                 Specifies the gateway recycle count for the emulated device.
                 Possible values range from 0 to 65535. The default value is 0.

 intf_prefix_len
                 Specifies the prefix length for the IPv6 address of the emulated
                 device. Possible values range from 1 to 32. The default is 24.

 intf_ipv6_addr
                 Specifies the IPv6 address of the emulated device.

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

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

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

                 Specifies the step value by which to increment IPv6 addresses for
                 the device block per port
                 Dependency: block_mode or -expand
                 Values: IPv6

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

                 Specifies the step value by which to increment IPv6 addresses for
                 the device block per VLAN
                 Dependency: block_mode or -expand
                 Values: IPv6

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

                                     Specifies the step value by which to increment IPv6 Gateway
                                     addresses for the device block per port
                                     Dependency: block_mode or -expand
                                     Values: IPv6

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

                                     Specifies the step value by which to increment IPv6 Gateway
                                     addresses for the device block per VLAN
                                     Dependency: block_mode or -expand
                                     Values: IPv6

 gateway_ipv6_addr
                 Specifies the IPv6 gateway address for the emulated device.

 gateway_ipv6_addr_step
                 Specifies the difference between IPv6 gateway addresses of
                 consecutive devices when multiple emulated devices are created.

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

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

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

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

                 Specifies the step value by which to increment link local IPv6
                 addresses for the device block per port
                 Dependency: block_mode or -expand
                 Values: IPv6

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

                 Specifies the step value by which to increment link local IPv6
                 addresses for the device block per VLAN
                 Dependency: block_mode or -expand
                 Values: IPv6

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

                 Specifies the number of IPv6 objects to be created. Possible
                 values range from 0 to 65535. The default value is 1.

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

                 Specifies how many times to repeat the same IPv6 address before
                 incrementing it. Possible values range from 0 to 65535. The
                 default value is 0.

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

                 Specifies how many times to increment the IPv6 address before
                 returning to the starting value. Possible values range from 0 to
                 65535. The default value is 0.

 mac_addr
                 Specifies the MAC address of the emulated device.

 mac_addr_step
                 Specifies the difference between MAC addresses of consecutive
                 devices when multiple emulated devices are created.


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

                 Specifies the step value by which to increment source MAC
                 addresses for the device block per port
                 Dependency: block_mode or -expand
                 Values: MAC

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

                 Specifies the step value by which to increment source MAC
                 addresses for the device block per VLAN
                 Dependency: block_mode or -expand
                 Values: MAC

                  Example::

                    emulation device config
                            mode                           create
                            block_mode                     ONE_NETWORK_PER_BLOCK
                            ip_version                     ipv4
                            encapsulation                  ethernet_ii_vlan
                            port_handle                    $port1 $port2
                            vlan_user_pri                  7
                            vlan_id                        10
                            vlan_id_count                  2
                            vlan_id_step                   1
                            vlan_id_repeatmode             REPEAT_ACROSS_LOWER_IF
                            vlan_outer_id                  20
                            vlan_outer_id_step             2
                            vlan_outer_id_count            2
                            vlan_outer_id_repeatmode       NO_REPEAT
                            count                          1
                            mac_addr                       00:10:94:00:00:02
                            mac_addr_step                  00:00:00:00:00:01
                            intf_ip_addr                   192.85.1.4
                            intf_prefix_len                 24
                            gateway_ip_addr               192.85.1.1
                            gateway_ip_addr_step          0.0.0.0
                            intf_ip_addr_step             0.0.0.1
                            mac_addr_step_per_vlan        {00:00:00:00:01:01 00:00:00:00:01:00}
                            mac_addr_step_per_port        00:00:00:01:00:00
                            ip_step_per_port              0.1.0.0
                            ip_step_per_vlan              {0.0.1.1 0.0.1.0}

                    In argument "mac_addr_step_per_vlan", first MAC address "00:00:00:00:01:01" increments
                    outer VLAN and second MAC address increments inner VLAN.
                    mac_addr_step_per_vlan        {00:00:00:00:01:01 00:00:00:00:01:00}
                    Similarly, in ip_step_per_vlan, first IP address increments outer VLAN IP and second
                    address increments inner VLAN IP.

 qinq_incr_mode
                 Determines which VLAN ID to increment first. Possible values are::


                  inner - Increments the inner VLAN ID before the outer VLAN ID

                  outer - Increments the outer VLAN ID before the inner VLAN ID

                  both - Increment both the inner and outer VLAN ID at the same time

                 The default value is inner.

 encapsulation
                 Specifies the type of Layer 2 encapsulation for the emulated
                 device. Possible values are::


                  ethernet_ii - Ethernet II

                  ethernet_ii_vlan - Ethernet II with a single VLAN tag

                  ethernet_ii_qinq - Ethernet II with two VLAN tags

                  ethernet_ii_mvlan - Ethernet II with more than two VLAN tags
                                      (Specifies VLAN from the 3rd tag on. The
                                      first two tags are specified with vlan_id,
                                      vlan_outer_id, and their related arguments.)

                 The default value is ethernet_ii.

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

                 Specifies the difference between consecutive router IDs when
                 multiple routers are created. The value must be in IPv4 format.
                 The default value is 0.0.0.1.

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

                 Specifies the difference between consecutive IPv6 router IDs when
                 multiple routers are created. The value must be in IPv6 format.
                 The default value is 0000::1.

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

                 Specifies the ipv6 router id source.
                 Dependency: block_mode or -expand
                 Possible values are::


                  manual - Set source manually

                  use_ipv6_global_addr - Use IPv6 global address as source

                  use_ipv6_ll_add - Use IPv6 link local address as source

                 The default value is manual.
 tos
                 `Spirent Extension (for Spirent HLTAPI only).`

                 Specifies the ToS value of the IPv4 header. Possible values range
                 from 0 to 255. The default value is 192.

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

                 Specifies the ToS type of the IPv4 header. Possible values are
                 tos and diffserv. The default value is tos.

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

                 Specifies the traffic class of the IPv6 header. Possible values
                 range from 0 to 255. The default value is 0.

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

                 Determines whether to use the source MAC address from the
                 physical interface. Possible values are true and false.
                 The default value is false.

 vlan_id
                 Specifies the starting VLAN ID for the ethernet_ii_vlan
                 encapsulation or the ethernet_ii_qinq encapsulation. Possible
                 values range from 0 to 4095. The default value is 100. This
                 argument is available when encapsulation is set to
                 ethernet_ii_qinq or ethernet_ii_vlan.


 vlan_id_count
                 Specifies the number of VLAN IDs to create. Possible values range
                 from 1 to 4096. The default value is 1.

 vlan_id_step
                 Specifies the step size by which the VLAN ID is incremented.
                 Possible values range from 0 to 4095. The default value is 1.

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

                 Number of times to repeat the same VLAN ID before
                 incrementing it for the inner VLAN. The value must be an integer.
                 The default value is 0.

 vlan_id_stack_count
                 Number of interfaces in this interface object.
                 The value must be an integer. The default value is 1.

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

                 Specifies the repeat mode for the inner VLAN.
                 The default value is REPEAT_ACROSS_PORT.

                  NO_REPEAT               VLAN IDs are not repeated.
                  REPEAT_ACROSS_PORT      VLAN IDs are repeated from the starting VLAN ID on all ports.
                  REPEAT_ACROSS_LOWER_IF  VLAN IDs are repeated from the starting VLAN ID
                                          when the next lower level interface (or port) changes.

 vlan_user_pri
                 Specifies the VLAN user priority assigned to emulated device.
                 Possible values range from 0 to 7. The default value is 0.

 vlan_outer_id
                 Specifies the starting outer VLAN ID for the QinQ encapsulation.
                 Possible values range from 0 to 4095. The default value is 100.
                 This argument is available when encapsulation is set to
                 ethernet_ii_qinq.

 vlan_outer_id_count
                 Specifies the number of outer VLAN IDs assigned to emulated device.
                 Possible values range from 1 to 4096. The default is 1.

 vlan_outer_id_step
                 Specifies the step size by which the outer VLAN ID is
                 incremented. Possible values range from 0 to 4095. The default
                 value is 1.

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

                 Number of times to repeat the same VLAN ID before
                 incrementing it for the outer VLAN. The value must be an integer.
                 The default value is 0.

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

                 Specifies the repeat mode for the outer VLAN.
                 The default value is REPEAT_ACROSS_PORT.

                  NO_REPEAT               VLAN IDs are not repeated.
                  REPEAT_ACROSS_PORT      VLAN IDs are repeated from the starting VLAN ID on all ports.
                  REPEAT_ACROSS_LOWER_IF  VLAN IDs are repeated from the starting VLAN ID
                                          when the next lower level interface (or port) changes.

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

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

                 Specifies the Ethernet type of VLAN for the device interface.
                 Possible values range from 0 to 65535. The default value is
                 33024.

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

                 Specifies the Ethernet type of outer VLAN for the device
                 interface. Possible values range from 0 to 65535. The default
                 value is 33024.

 vlan_cfi
                 Specifies the canonical format indicator (CFI) field in VLAN
                 for the emulated device. Possible values are 0 (Ethernet)
                 and 1 (Token Ring). The default is 1.

 vlan_outer_cfi
                 Specifies the CFI field in the outer VLAN for the emulated
                 device. Possible values are 0 (Ethernet) and 1 (Token Ring). The
                 default is 1.

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

                 Specifies a list of VLAN IDs for the ethernet_ii_mvlan
                 encapsulation. Possible values range from 0 to 4095. The default
                 value is 100.

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

                 Specifies a list of VLAN step values for the ethernet_ii_mvlan
                 encapsulation. Possible values range from 0 to 4095. The default
                 value is 1.

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

                 Specifies a list of numbers of VLAN IDs for the ethernet_ii_mvlan
                 encapsulation. Possible values range from 0 to 4095. The default
                 value is 100.

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

                 Specifies a list of VLAN TPIDs for ethernet_ii_mvlan
                 encapsulation. Possible values range from 0 to 65535. The default
                 value is 33024.

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

                 Specifies a list of VLAN priorities for the ethernet_ii_mvlan
                 encapsulation. Possible values range from 0 to 7. The default
                 value is 0.

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

                 Specifies a list of numbers of times to repeat the corresponding
                 VLAN IDs before incrementing them. The value must be an integer.
                 The default value is 0. This argument is available when
                 encapsulation is set to ethernet_ii_mvlan.

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

                 Specifies a list of CFI values for ethernet_ii_mvlan
                 encapsulation. Possible values are 0 (Ethernet) and 1 (Token
                 Ring). The default value is 1.

 name
                 A text name for the emulated device. If block_mode is specified,
                 block_name_index will be appended to the name of emulated device.

 block_name_index
                 Specifies start value of index for device name.
                 Dependency: block_mode

 count_block_per_port
                 Specifies the block count per port.
                 Dependency: expand and -block_mode

 count_per_block
                 Specifies the device count per block.
                 Dependency: expand and -block_mode

 lower_encap
                 Specifies the lower layer encapsulation.
                 Possible values are pppoe and gre.
                 This argument is required for GRE tunnel configuration.

 enable_rfc4814_addresses
                 Specifies to enable or disable the generation of MAC addresses
                 according to RFC 4814.
                 Possible values are true and false. The default value is false.
                 Dependency: expand and -block_mode

 random_seed_value
                 Specifies the seed value for the random number generator used
                 in generating RFC 4814 MAC addresses.
                 The default value is true.
                 Dependency: expand, -block_mode and enable_rfc4814_addresses

 gre_tnl_type
                 Specifies whether the tunnel has an IPv4 or IPv6 address. This
                 argument is `Mandatory`.

 gre_tnl_addr
                 Defines the IPv4 or IPv6 gateway address of the GRE tunnel.

 gre_tnl_addr_step
                 Configures the IPv4 or IPv6 gateway address for multiple tunnels.
                 Use this argument with the gre_tnl_addr argument.

 gre_tnl_addr_count
                 The number of source IP addresses to generate for a
                 tunnel. Possible values range from 1 to 2147483647. The
                 default is 1.

 gre_src_mode
                 Specifies how Spirent HLTAPI will assign the IP
                 addresses for a particular tunnel. Possible values are::


                  fixed - The source IP address is the same for all tunnels.

                  increment - For all packets, the source IP address increments
                            by the step specified in the gre_src_addr_step
                            argument.

 gre_src_addr
                 Specifies the source IP address of the first generated
                 packet. The default is 0.0.0.0.

 gre_src_addr_step
                 Indicates both the step value and the prefix length that
                 Spirent HLTAPI applies to the specified source address
                 (gre_src_addr). The format of the gre_src_addr_step value is an
                 IPv4 address, for example, 0.0.1.0. Use a single decimal
                 digit equal to a power of 2; the remaining three digits must
                 be zero (0). The numeric value identifies a bit location in
                 the address; the location determines the prefix length.
                 Spirent HLTAPI also uses the value to increment the host
                 ID portion of the address.

 gre_src_addr_count
                 The number of source IPv4 or IPv6 addresses to generate
                 for a stream. Possible values range from 1 to 2147483647. The
                 default is 1.

 gre_dst_mode
                 Specifies how Spirent HLTAPI will assign the IP
                 addresses for a particular stream. Possible values are::


                  fixed - The destination IP address is the same for all
                         packets.

                  increment - For all packets, the destination IP address
                        increments by the step specified in the
                        gre_dst_addr_step argument.

 gre_dst_addr
                 Specifies the destination IP address of the first generated
                 packet. The default is 0.0.0.0.

 gre_dst_addr_step
                 Indicates both the step value and the prefix length that
                 Spirent HLTAPI applies to the specified destination address
                 (gre_dst_addr). The format of the gre_dst_addr_step value is an
                 IPv4 address, for example, 0.0.1.0. Use a single decimal
                 digit equal to a power of 2; the remaining three digits must
                 be zero (0). The numeric value identifies a bit location in
                 the address; the location determines the prefix length.
                 Spirent HLTAPI also uses the value to increment the host
                 ID portion of the address.

 gre_dst_addr_count
                 The number of destination IPv4 or IPv6 addresses to generate
                 for a stream. Possible values range from 1 to 2147483647. The
                 default is 1.

 gre_checksum
                 Verifies that packets are not corrupted. Possible values are
                 0 (not corrupted) and 1 (corrupted). The default is 0.

 gre_keepalive
                 Enables or disables KEEPALIVE for GRE tunnel.
                 Possible Values: true or false. The default is false.

 gre_keepalive_interval
                 Specifies the amount of time, in seconds, between KEEPALIVE messages.
                 The default is 10.

 gre_keepalive_retries
                 Specifies the number of retries to send before tunnel expires.
                 The default is 0.

 gre_in_key
                 Defines the GRE tunnel In key. Spirent HLTAPI will automatically
                 change the value to the GRE tunnel Out key to when gre_out_key is
                 specified.

 gre_out_key
                 Defines the GRE tunnel Out key.

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

                 Defines the length (in bits) of the IPv4 tunnel. It must be an
                 integer. The default value is 24.

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

                 Defines the source MAC address for a Gigabit Ethernet or Gigabit
                 Ethernet GBIC interface of the GRE tunnel device. You can enter
                 this address in one of the following formats: aaaa.bbbb.cccc
                 aaaa:bbbb:cccc aa.bb.cc.dd.ee.ff aa:bb:cc:dd:ee:ff
                 aabb-cc-dd-ee-ff

                 The default is 0000.0000.0000.

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

                 Defines the modifier for the interface MAC address of the
                 emulated GRE tunnel device. The default value is
                 00:00:00:00:00:01.

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

                 Enables or disables sequence number for GRE tunnel.
                 Possible Values: true or false. The default is false.
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)
log                  Error message if command returns {status 0}
handle               The host handle
handle_list          The host handle or
                     the emulated device handles list when expand is set true.
Description:

The emulation device config function creates, modifies and deletes one or more emulated hosts on the specified port. 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 host, use the port_handle argument to specify the Spirent HLTAPI port that the emulated device will use. (The port handle value is contained in the keyed list returned by the connect function.) The create mode returns the handle of the host.

Use this function when you want to create a device without configuring a protocol. You can enable a protocol on the created device if you need it later. You can also use the created device as the source or destination handle when you create a bound stream.

Examples:

The following example creates an emulated host:

set devcie_ret1 [::emulation device config
 mode=                       create\
 ip_version=                 ipv4\
 encapsulation=              ethernet_ii\
 port_handle=                $port1\
 count=                      1 \
 enable_ping_response=        0 \
 router_id=                  192.0.0.1 \
 mac_addr=                   00:10:94:00:00:01 \
 mac_addr_step=              00:00:00:00:00:01 \
 resolve_gateway_mac=        true \
 gateway_ip_addr_step=       0.0.0.0 \
 intf_ip_addr=               192.85.1.3 \
 intf_prefix_len=            24 \
 gateway_ip_addr=            192.85.1.1 \
 intf_ip_addr_step=          0.0.0.1 \
 ip_stack_count=             1003 \
 stack_ip_repeat=            10 \
 stack_ip_recycle_count=     10 ]

Sample Output:

{handle host2} {handle_list host2} {status 1}

The following example creates an emulated host with GRE over Ipv4 stack:

set device_ret0 [emulation device config
mode= create ip_version= ipv4 encapsulation= ethernet_ii_qinq port_handle= $port1 count= 3 enable_ping_response= 0 mac_addr= 00:10:94:00:00:02 mac_addr_step= 00:00:00:00:00:01 use_default_phy_mac= false intf_ip_addr= 192.85.1.5 intf_prefix_len= 24 tos= 192 resolve_gateway_mac= true gateway_ip_addr= 192.85.1.1 gateway_ip_addr_step= 0.0.0.0 intf_ip_addr_step= 0.0.0.1 ip_step_per_port= 0.0.0.1 vlan_user_pri= 7 vlan_cfi= 0 vlan_id= 10 vlan_id_count= 10 vlan_id_step= 1 vlan_id_repeatmode= NO_REPEAT vlan_outer_id= 20 vlan_outer_id_step= 2 vlan_outer_id_count= 2 vlan_outer_id_repeatmode= NO_REPEAT lower_encap= gre gre_src_mode= increment gre_dst_mode= increment gre_tnl_type= 4 gre_dst_addr= 1.1.1.1 gre_dst_addr_step= 0.0.0.1 gre_checksum= 1 gre_src_addr= 1.1.1.1 gre_src_addr_step= 0.0.0.1 gre_prefix_len= 24 gre_tnl_addr= 1.1.1.3 gre_tnl_addr_step= 0.0.0.1 gre_keepalive= true gre_keepalive_interval= 10 gre_keepalive_retries= 10 gre_in_key= 1 gre_seqnum_enabled= true gre_out_key= 2 ]

Sample Output:

{handle host2} {handle_list host2} {status 1}

The following example deletes all devices:

set returnedString [emulation device config
                   mode=   delete
                   handle=  all]

The following example creates 5 raw ipv6 emulateddevices in scaling with expand true, block_mode= is ONE_DEVICE_PER_BLOCK by default:

set ret [emulation device config
       mode=                                   create
       ip_version=                             ipv6
       encapsulation=                          ethernet_ii_vlan
       port_handle=                            $port1
       intf_ip_addr=                           1.2.3.2
       gateway_ip_addr=                        1.2.3.1
       intf_prefix_len=                        30
       ip_step_per_vlan=                       0.0.0.4
       intf_ipv6_addr=                         ::ffff:1:2:3:2
       gateway_ipv6_addr=                      ::ffff:1:2:3:1
       intf_ipv6_prefix_len=                   126
       ipv6_step_per_vlan=                     0:0:0:0:0:0:0:4
       expand=                                 true
       vlan_id=                                1
       vlan_id_step=                           1
       vlan_id_count=                          5
       enable_rfc4814_addresses=               true
       random_seed_value=                      4815 ]

Sample Output:

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

The following example creates 1 raw ipv6 emulateddevice in scaling with expand= true and block_mode= MULTIPLE_DEVICE_PER_BLOCK:

      set ret [emulation device config
             mode=                                   create
             ip_version=                             ipv6
             encapsulation=                          ethernet_ii_vlan
             port_handle=                            port1
             intf_ip_addr=                           1.2.3.2
             gateway_ip_addr=                        1.2.3.1
             intf_prefix_len=                        30
             ip_step_per_vlan=                       0.0.0.4
             intf_ipv6_addr=                         ::ffff:1:2:3:2
             gateway_ipv6_addr=                      ::ffff:1:2:3:1
             intf_ipv6_prefix_len=                   126
             ipv6_step_per_vlan=                     0:0:0:0:0:0:0:4
             expand=                                 true
             block_mode=                             MULTIPLE_DEVICE_PER_BLOCK
             vlan_id=                                1
             vlan_id_step=                           1
             vlan_id_count=                          5]

Sample Output::


      {param_handle {}} {status 1} {handle emulateddevice1} {handle_list emulateddevice1}

The following example creates 5 raw ipv6 emulateddevices in `scaling` with expand= false,
block_mode= is ONE_DEVICE_PER_BLOCK by default, and then activate bgp on the returned param_handle:

      set ret [emulation device config
             mode=                                   create
             ip_version=                             ipv6
             encapsulation=                          ethernet_ii_vlan
             port_handle=                            $port1
             intf_ip_addr=                           1.2.3.2
             gateway_ip_addr=                        1.2.3.1
             intf_prefix_len=                        30
             ip_step_per_vlan=                       0.0.0.4
             intf_ipv6_addr=                         ::ffff:1:2:3:2
             gateway_ipv6_addr=                      ::ffff:1:2:3:1
             intf_ipv6_prefix_len=                   126
             ipv6_step_per_vlan=                     0:0:0:0:0:0:0:4
             expand=                                 false
             vlan_id=                                1
             vlan_id_step=                           1
             vlan_id_count=                          5]

      puts $ret
      #  {param_handle emulateddevicegenparams1} {status 1} {handle {}} {handle_list {}}

      set device_ret0 [emulation bgp config
             mode=                                             activate
             ipv4_unicast_nlri=                                1
             ip_stack_version=                                 4
             handle=                                           [keylget ret param_handle]
             remote_as=                                        1
             local_as=                                         1
             gateway_asdut_enable=                             1
             ipv6_unicast_nlri=                                1
             use_gateway_remote_ip_addr=                       true]

     puts $device_ret0
     #   {handle_list {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5}}
     #   {bgp_handle_list {bgprouterconfig1 bgprouterconfig2 bgprouterconfig3 bgprouterconfig4 bgprouterconfig5}}
     #   {handle {}} {handles {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5}} {status 1}

End of Procedure Header