IPv6 Auto-configuration Functions

sth::emulation_ipv6_autoconfig

Purpose

The emulation_ipv6_autoconfig function creates, modifies, or resets IPv6 auto configuration hosts for the specified Spirent HLTAPI port or handle.

The IPv6 autoconfiguration process includes creating a link-local address and verifying its uniqueness on a link, determining what information should be autoconfigured (addresses, other information, or both), and in the case of addresses, whether they should be obtained through the stateless mechanism, the stateful mechanism, or both. Spirent HLTAPI currently only supports stateless autoconfiguration .

The stateless approach is used when a site is not concerned with the exact addresses hosts use, as long as they are unique and properly routable. During the process, IPv6-capable hosts rely on Router Advertisement (RA) messages to obtain the information needed for autoconfiguration. To acquire an IPv6 address, a host will follow three steps:

  1. Discover a prefix used on the link: The host can listen to periodic RAs sent by routers on the link or it can poll for routers with the help of Router Solicitation messages. The prefix information is extracted from the RA messages.
  2. Generate an interface ID. To have a complete IPv6 address, the host must add an interface identifier to a prefix learned from the routers on the link.
  3. Verify the uniqueness of the generated IPv6 address using the Duplicate Address Detection (DAD) mechanism.

For more information about stateless autoconfiguration, please refer to RFC 2462.

Synopsis

Note

  1. M indicates that the argument is Mandatory .
  2. S indicates the argument is for scaling scenarios.
sth::emulation_ipv6_autoconfig
  [-mode {create|modify|reset|enable|disable|activate}  M]
  [-port_handle <port_handle>]
  [-handle <handle>]
  [-ip_version {6|4_6}]
  [-ipv6_enable_gateway_learning {true|false}]
  [-encap {ethernet_ii|ethernet_vlan}]
  [-count <1-65536>]
  [-mac_addr <aa:bb:cc:dd:ee:ff>]
  [-mac_addr_step <aa:bb:cc:dd:ee:ff>]
  [-local_ip_addr <a.b.c.d>]
  [-local_ip_addr_step <a.b.c.d>]
  [-local_ip_prefix_len <0-32>]
  [-gateway_ip_addr <a.b.c.d>]
  [-gateway_ip_addr_step <a.b.c.d>]
  [-link_local_ipv6_prefix_len <0-128>]
  [-link_local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-link_local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-local_ipv6_prefix_len <0-128>]
  [-gateway_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-gateway_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-dad_enable {true|false }]
  [-dad_transmit_count <1-255>]
  [-dad_retransmit_delay <1000-4294967295>]
  [-router_solicit_retransmit_delay <1000-4294967295>]
  [-router_solicit_retry <0-4294967295>]
  [-enable_eui64_linklocal {true|false }]
  [-vlan_id <0-4095>]
  [-vlan_id_mode {fixed|increment}]
  [-vlan_id_step <0-4094>]
  [-vlan_id_repeat_count <0-4294967295>]
  [-vlan_id_recycle_count <0-4294967295>]
  [-vlan_cfi {0|1}]
  [-vlan_priority <0-7>]
  [-vlan_outer_id <0-4095>]
  [-vlan_outer_id_mode {fixed|increment}]
  [-vlan_outer_user_priority <0-7>]
  [-vlan_id_outer_count <1-4096>]
  [-vlan_id_outer_step <0-4094>]
  [-vlan_outer_id_repeat_count <0-4294967295>]
  [-vlan_outer_id_recycle_count <0-4294967295>]
  [-vlan_outer_cfi {0|1}]
  [-expand {true|false} S]
  [-block_name_index <0-4294967295>]
  [-mac_addr_step_per_port <aa:bb:cc:dd:ee:ff>]
  [-mac_addr_step_per_vlan <aa:bb:cc:dd:ee:ff>]
  [-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>]
  [-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>]
  [-vlan_id_count <1-4096>]
  [-vlan_outer_id_count <1-4096>]
  [-vlan_id_repeatmode <REPEAT_ACROSS_PORT  | NO_REPEAT | REPEAT_ACROSS_LOWER_IF>]
  [-vlan_outer_id_repeatmode <REPEAT_ACROSS_PORT  | NO_REPEAT | REPEAT_ACROSS_LOWER_IF>]
  [-router_id_ipv6 <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-router_id_ipv6_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-intf_ipv6_addr <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh> ]
  [-intf_ipv6_addr_step <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
  [-block_mode {ONE_HOST_PER_BLOCK|ONE_DEVICE_PER_BLOCK|
                          ONE_NETWORK_PER_BLOCK|
                          MULTIPLE_NETWORKS_PER_BLOCK|
                          MULTIPLE_DEVICE_PER_BLOCK} S]

Arguments

-handle

Defines an IPv6 autoconfiguration handle to be returned from this procedure. This argument is Mandatory for modes modify and reset.

-port_handle

Specifies the port on which to create the IPv6 autoconfiguration emulation. This argument is Mandatory for mode create.

-mode

Specifies the action to be taken. Possible values are create, modify and reset. This argument is Mandatory . Possible values are described below:

create - Starts emulating IPv6 autoconfiguration on the specified
         port

modify - Changes the configuration for the emulated IPv6
        autoconfiguration hosts identified by the -handle
        argument. You must specify the -handle argument.

reset - Deletes the emulated IPv6 autoconfiguration hosts. You
        must specify the -handle argument.

enable - Activates the existing IPv6 autoconfiguration hosts
         specified by -handle

disable - Deactivates the existing IPv6 autoconfiguration hosts
          specified by -handle

activate - Used for ``Scaling`` scenarios.
           1. Enables IPv6 autoconfiguration devices and configures
              802.1x parameters for the devices created via
              the ``sth::emulation_device_config`` function.
              This mode requires the value of param_handle
              as the input to the -handle option. Use this mode for
              ``Scaling`` scenarios. Refer to -count and -expand options
              under the ``sth::emulation_ipv6_autoconfig`` function for more
              information. For this mode, only the following set of
              options are valid::

                dad_enable
                enable_eui64_linklocal
                dad_transmit_count
                dad_retransmit_delay
                router_solicit_retransmit_delay
                router_solicit_retry

           2. Creates devices and enables IPv6 autoconfiguration 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
                -device_name
                -vlan_id
                -vlan_outer_id
                -vlan_priority
                -vlan_id_count
                -vlan_id_repeatmode
                -vlan_outer_id_count
                -vlan_outer_user_priority
                -vlan_outer_id_repeatmode
                -router_id_ipv6
                -router_id_ipv6_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
                -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.
-ip_version

Defines the IP version to be used. Possible values are 6 for IPv6 and 4_6 for dual stack. The default is 6.

-ipv6_enable_gateway_learning

Spirent Extension (for Spirent HLTAPI only).

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

-encap

Specifies the type of Layer 2 encapsulation. Possible values are described below:

ethernet_ii -  Ethernet II

ethernet_vlan - Ethernet II with a single VLAN tag

ethernet_ii_qinq - Ethernet II with two VLAN tags. This option
                   supports Ethernet encapsulation.

The default value is ethernet_ii.

-count

Specifies the number of devices to emulate. Possible values range from 1 to 65536. The default value is 1.

-mac_addr

Specifies the first MAC address to use when emulating IPv6 auto configuration clients. Each client must have a unique source MAC address. The value must be in MAC format. The default value is 00:10:94:00:00:01.

-mac_addr_step

Specifies the increment used to generate additional MAC addresses for IPv6 autoconfiguration hosts. The default value is 00:00:00:00:00:01.

-local_ip_addr

Specifies the starting IPv4 address of the emulated devices. The value must be in IPv4 format. The default value is 192.85.1.3. This argument is only available when -ip_version set to 4_6.

-local_ip_addr_step

Specifies the increment used to generate IPv4 addresses for multiple devices. The value must be in IPv4 format. The default value is 0.0.0.1. This argument is only available when -ip_version set to 4_6.

-local_ip_prefix_len

Specifies the IPv4 address prefix length. Possible values range from 0 to 32. The default value is 24. This argument is only available when -ip_version set to 4_6.

-gateway_ip_addr

Specifies the first IPv4 gateway address for the emulated devices. The value must be in IPv4 format. The default value is 192.85.1.1. This argument is only available when -ip_version set to 4_6.

-gateway_ip_addr_step

Specifies the increment used to generate IPv4 gateway addresses for multiple devices. The value must be in IPv4 format. The default value is 0.0.0.0. This argument is only available when -ip_version set to 4_6.

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

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.

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.

-local_ipv6_addr

Specifies the starting address of the emulated IPv6 devices. The value must be in IPv6 format. The default value is 2001::2.

-local_ipv6_addr_step

Specifies the increment used to generate IPv6 gateway addresses for multiple devices. The value must be in IPv6 format. The default value is 0::1.

-local_ipv6_prefix_len

Specifies the IPv6 address prefix length. Possible values range from 0 to 128. The default value is 64.

-gateway_ipv6_addr

Configures the first IPv6 gateway address for the emulated IPv6 devices. The value must be in IPv6 format. The default value is ::0.

-gateway_ipv6_addr_step

Defines the increment used to generate IPv6 gateway addresses for multiple devices. The value must be in IPv6 format. The default value is ::.

-dad_enable

Enables or disables detection of duplicate addresses. Possible values are true (enable) and false (disable). The default value is false.

-enable_eui64_linklocal

Specifies to use an EUI-64 address constructed from source MAC address or a user specified link local address. Possible values are true (enable) and false (disable). The default value is false.

-dad_transmit_count

Specifies the number of consecutive neighbor solicitation messages sent while performing duplicate address detection on a tentative address. Possible values range from 1 to 255. The default value is 1. This argument is available when -dad_enable is set to true.

-dad_retransmit_delay

Specifies the delay, in msec, between consecutive neighbor solicitation transmissions performed during duplicate address detection. Possible values range from 1000 to 4294967295. The default value is 1. This argument is available when -dad_enable is set to true.

-router_solicit_retransmit_delay

Specifies the delay, in msec, between router solicitation messages. Possible values range from 1000 to 4294967295. The default value is 3000.

-router_solicit_retry

Specifies the number of times to resend router solicitation messages to the all-routers multicast group. If no valid router advertisement is received within this period, the device returns to the IDLE state and is considered an RA timeout failure. Possible values range from 0 to 4294967295. The default value is 2.

-vlan_id

The VLAN ID of the first VLAN sub-interface. Possible values range from 0 to 4095. The default value is 1.

-vlan_id_mode

Specifies the VLAN ID assignment mode for configurations of multiple devices when -count is greater than 1. Possible values are described below:

fixed  -     The VLAN ID (the value of the -vlan_id argument)
            is the same for all of the devices.

increment -  Spirent HLTAPI assigns unique VLAN IDs.
            When you use this mode, you must also specify
            -vlan_id_step to define the increment value.
-vlan_id_step

The value that Spirent HLTAPI uses to increment the VLAN ID. Possible values range from 0 to 4094. The default value is 1.

-vlan_id_repeat_count

Spirent Extension (for Spirent HLTAPI only).

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

-vlan_id_recycle_count

Spirent Extension (for Spirent HLTAPI only).

Number of times to increment the IPv4 address before returning to the starting value. The value must be an integer. The default value is 0.

-vlan_cfi

Sets the Canonical Format Indicator (CFI) field in VLAN for the emulated router node. Possible values are 0 (Ethernet) and 1 (Token Ring). The default is 1. If set to 0, it indicates the network is Ethernet. If set to 1, it indicates the network is Token Ring and packets are dropped by Ethernet ports.

-vlan_priority

VLAN priority for the VLANs on this port. 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_id_outer_step

Specifies the step value to increment the outer VLAN IDs. Possible values range from 0 to 4095. The default value is 1. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_id_outer_count

Defines the number of outer VLAN IDs to use when creating IPv6 autoconfiguration devices. VLAN membership is assigned in round-robin fashion. The number of sessions must be divided evenly into the outer VLAN count. Possible values range from 1 to 4096. The default value is 1. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_id_repeat_count

Spirent Extension (for Spirent HLTAPI only).

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

-vlan_outer_id_recycle_count

Spirent Extension (for Spirent HLTAPI only).

Number of times to increment the IPv4 address before returning to the starting value. The value must be an integer. The default value is 0.

-vlan_outer_cfi

Specifies the Canonical Format Indicator (CFI) value for the VLAN outer header. Possible values are 0 and 1. The default value is 0. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_user_priority

Specifies the VLAN priority to assign to the outer VLAN header. Possible values range from 0 to 7. The default value is 0. This argument is available when -encapsulation is set to ethernet_ii_qinq.

-vlan_outer_id_mode

Spirent Extension (for Spirent HLTAPI only).

Specifies how Spirent HLTAPI 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.

This argument is available when -encapsulation is set to ethernet_ii_qinq.

-expand

Spirent Extension (for Spirent HLTAPI only).

Determines whether to expand the specified device parameters into emulated device objects. 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 sth::emulation_isis_config. This argument is available for -mode create.

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

-block_name_index

Specifies start value of index for device name.

Dependency: -block_mode.

-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

-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

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

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

-vlan_id_count

Specifies the number of VLAN IDs to use when generating 802.1x devices. Possible values range from 1 to 4096. The default value is 1

-vlan_outer_id_count

Specifies the number of outer VLAN IDs to use when generating 802.1x devices. Possible values range from 1 to 4096. 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_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.
-router_id_ipv6

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

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

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

Arguments Unsupported by Save as HLTAPI

None

Return Values

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

handles        A list of handles that identify the IPv6 emulation created by the
                ``sth::emulation_ipv6_autoconfig`` function

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

port_handle    The port handle on which IPv6 devices are configured

status         $SUCCESS or $FAILURE

log            An error message (if the operation failed)

Description

The sth::emulation_ipv6_autoconfig function creates, modifies or deletes the IPv6 autoconfiguration emulation. Use the -mode argument to specify the action to perform. (See the -mode argument description for information about the actions.) When you create IPv6 devices, you must use the -port_handle argument to specify the Spirent HLTAPI port that the emulated IPv6 devices will use for IPv6 Auto-configuration. (The port handle value is contained in the keyed list returned by the sth::connect function.) In addition to specifying the -port_handle, you can provide one or more of the following arguments when you create IPv6 supplicants or use their default values:

-count (the number of IPv6 supplicants to emulate)

-ip_version (IP version, IPv6 or dual stack)

-dad_enable (Enables or disables detection of duplicate addresses.)

-dad_transmit_count (The number of consecutive Neighbor Solicitation messages
sent while performing duplicate address detection on a tentative address.)

-dad_retransmit_delay (The delay, in msec, between consecutive Neighbor
Solicitation transmissions performed during duplicate address detection.)

-router_solcit_retransmit_delay (The delay, in msec, between router solicitation
messages)

-router_solicit_retry (The number of times to resend router solicitation to the
all-routers multicast group.)

In the modify mode, you can change the configuration of the created IPv6 devices except for these arguments: -port_handle, -encap, ip_version and -count. In the reset mode, you can remove the created device. If a creation, configuration, or deletion fails, Spirent HLTAPI returns an error message. For example, if the user tries to modify a non-existing session handle, an error message will be returned.

Examples

#### HLTAPI for Tcl ####

#-mode create, IPv6 autoconfiguration with IPv6 Stack:

set returnedString [ sth::emulation_ipv6_autoconfig  \
               -mode                           create \
               -port_handle                    $hltHostPort \
               -count                          1\
               -local_ipv6_addr                2001::2\
               -local_ipv6_addr_step           0000::1\
               -local_ipv6_prefix_len          64\
               -link_local_ipv6_prefix_len     64 \
               -link_local_ipv6_addr_step      ::1 \
               -link_local_ipv6_addr           fe80::3 \
               -gateway_ipv6_addr              2001:1213::205:9AFF:FEAD:7090\
               -gateway_ipv6_addr_step         0000::1\
               -dad_enable                     true\
               -dad_transmit_count             3\
               -dad_retransmit_delay           2000\
               -router_solicit_retransmit_delay 4000\
               -router_solicit_retry           4]

Sample Output:

{port_handle port1} {handle host1} {status 1}

# -mode modify, IPv6 autoconfiguration with IPv6 Stack:

set returnedString [ sth::emulation_ipv6_autoconfig  \
                   -mode                           modify \
                   -handle                         $ipv6Handle \
                   -dad_enable                     true\
                   -dad_transmit_count             4\
                   -dad_retransmit_delay           1000\
                   -router_solicit_retransmit_delay 3000\
                   -router_solicit_retry           5]

Sample Output:

{handle host1} {status 1}

# -mode create, IPv6 autoconfiguration with dual stack:

set returnedString [ sth::emulation_ipv6_autoconfig  \
                   -mode                           create \
                   -port_handle                    $hltHostPort \
                   -ip_version                     4_6\
                   -count                          5\
                   -local_ip_addr                  10.10.10.10\
                   -local_ip_addr_step             0.0.0.1\
                   -local_ip_prefix_len            24\
                   -link_local_ipv6_prefix_len     64 \
                   -link_local_ipv6_addr_step      ::1 \
                   -link_local_ipv6_addr           fe80::3 \
                   -gateway_ip_addr                192.86.1.1\
                   -gateway_ip_addr_step           0.0.0.1\
                   -local_ipv6_addr                2001::2\
                   -local_ipv6_addr_step           0000::1\
                   -local_ipv6_prefix_len          64\
                   -gateway_ipv6_addr              2001:1213::205:9AFF:FEAD:7090\
                   -gateway_ipv6_addr_step         0000::1\
                   -dad_enable                     true\
                   -dad_transmit_count             3\
                   -dad_retransmit_delay           2000\
                   -router_solicit_retransmit_delay  4000\
                   -router_solicit_retry           4]

Sample Output:

{port_handle port1} {handle {host1 host2 host3 host4 host5}} {status 1}

# -mode enable:

set ret1 [sth::emulation_ipv6_autoconfig \
        -mode             enable\
        -handle           $ipv6_auto_config_device \
]

Sample Output:

{status 1} {handle host1}

# -mode activate, IPv6 autoconfiguration with -expand true:

set ipv6auto_config1 [sth::emulation_ipv6_autoconfig\
                -mode                                             activate\
                -ip_version                                       6\
                -encap                                            ethernet_ii\
                -port_handle                                      $port1\
                -local_ipv6_prefix_len                            64 \
                -ipv6_enable_gateway_learning                     false \
                -gateway_ipv6_addr_step                           :: \
                -gateway_ipv6_addr                                3001::1 \
                -intf_ipv6_addr                                  3001::2 \
                -intf_ipv6_addr_step                             ::1 \
                -link_local_ipv6_prefix_len                       64 \
                -link_local_ipv6_addr_step                        ::1 \
                -link_local_ipv6_addr                             fe80::1 \
                -count                                            10 \
                -mac_addr                                         00:10:95:00:00:01 \
                -mac_addr_step                                    00:00:00:00:00:01 \
                -dad_enable                                       true \
                -enable_eui64_linklocal                           true \
                -dad_transmit_count                               3 \
                -dad_retransmit_delay                             1201 \
                -router_solicit_retransmit_delay                  3201 \
                -vlan_id                                          100 \
                -vlan_id_count                                    1 \
                -vlan_outer_id                                    200 \
                -vlan_outer_id_count                              1 \
                -router_solicit_retry                             3 \
                -block_mode                                       ONE_DEVICE_PER_BLOCK \
                -block_name_index                                 10 \
                -expand                                           true \
]

Sample Output:

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

#### HLTAPI for Python ####

# -mode create, IPv6 autoconfiguration with IPv6 stack:

    device_ret0 = sth.emulation_ipv6_autoconfig (
                mode                = 'create',
                ip_version          = '6',
                encap               = 'ethernet_ii',
                port_handle         = port_handle[0],
                local_ipv6_prefix_len= '64',
                gateway_ipv6_addr_step= '::',
                gateway_ipv6_addr   = '2001::1',
                local_ipv6_addr     = '2001::2',
                local_ipv6_addr_step= '::1',
                link_local_ipv6_prefix_len ='64',
                link_local_ipv6_addr_step ='::1',
                link_local_ipv6_addr = 'fe80::3',
                count               = '1',
                mac_addr            = '00:10:94:00:00:01',
                mac_addr_step       = '00:00:00:00:00:01',
                router_solicit_retransmit_delay= '3000',
                router_solicit_retry= '2');

# -mode create, IPv6 autoconfiguration with dual stack::

    device_ret0 = sth.emulation_ipv6_autoconfig (
                mode                = 'create',
                ip_version          = '4_6',
                encap               = 'ethernet_ii',
                port_handle         = port_handle[0],
                local_ipv6_prefix_len= '64',
                gateway_ipv6_addr_step= '::',
                gateway_ipv6_addr   = '2001::1',
                local_ipv6_addr     = '2001::2',
                local_ipv6_addr_step= '::1',
                link_local_ipv6_prefix_len ='64',
                link_local_ipv6_addr_step ='::1',
                link_local_ipv6_addr = 'fe80::3',
                count               = '1',
                mac_addr            = '00:10:94:00:00:01',
                mac_addr_step       = '00:00:00:00:00:01',
                local_ip_addr_step  = '0.0.0.1',
                local_ip_prefix_len = '24',
                gateway_ip_addr_step= '0.0.0.0',
                gateway_ip_addr     = '192.85.1.1',
                local_ip_addr       = '192.85.1.3',
                router_solicit_retransmit_delay= '3000',
                router_solicit_retry= '2');

Sample Output:

{'status': '1', 'handle': 'host2', 'port_handle': 'port1'}

#### HLTAPI for Perl ####

# -mode create, IPv6 autoconfiguration with IPv6 stack:

my %device_ret0 = sth::emulation_ipv6_autoconfig (
             mode                => 'create',
             ip_version          => '6',
             encap               => 'ethernet_ii',
             port_handle         => "$hport[1]",
             local_ipv6_prefix_len=> '64',
             gateway_ipv6_addr_step=> '::',
             gateway_ipv6_addr   => '2001::1',
             local_ipv6_addr     => '2001::2',
             local_ipv6_addr_step=> '::1',
             link_local_ipv6_prefix_len =>'64',
             link_local_ipv6_addr_step =>'::1',
             link_local_ipv6_addr =>'fe80::3',
             count               => '1',
             mac_addr            => '00:10:94:00:00:01',
             mac_addr_step       => '00:00:00:00:00:01',
             router_solicit_retransmit_delay=> '3000',
             router_solicit_retry=> '2');

# -mode create, IPv6 autoconfiguration with dual stack:

my %device_ret0 = sth::emulation_ipv6_autoconfig (
             mode                => 'create',
             ip_version          => '4_6',
             encap               => 'ethernet_ii',
             port_handle         => "$hport[1]",
             local_ipv6_prefix_len=> '64',
             gateway_ipv6_addr_step=> '::',
             gateway_ipv6_addr   => '2001::1',
             local_ipv6_addr     => '2001::2',
             local_ipv6_addr_step=> '::1',
             link_local_ipv6_prefix_len =>'64',
             link_local_ipv6_addr_step =>'::1',
             link_local_ipv6_addr =>'fe80::3',
             count               => '1',
             mac_addr            => '00:10:94:00:00:01',
             mac_addr_step       => '00:00:00:00:00:01',
             local_ip_addr_step  => '0.0.0.1',
             local_ip_prefix_len => '24',
             gateway_ip_addr_step=> '0.0.0.0',
             gateway_ip_addr     => '192.85.1.1',
             local_ip_addr       => '192.85.1.3',
             router_solicit_retransmit_delay=> '3000',
             router_solicit_retry=> '2');

Sample Output:

$VAR1 = 'handle';
$VAR2 = 'host2';
$VAR3 = 'port_handle';
$VAR4 = 'port1';
$VAR5 = 'status';
$VAR6 = '1';

End of Procedure Header

sth::emulation_ipv6_autoconfig_control

Purpose

Starts or stops IPv6 autoconfiguration on the specified port.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ipv6_autoconfig_control
       [-action {start|stop}  M]
       [-port_handle <port_handle_list>]
       [-handle <handle_list>]

Arguments

-action

Specifies the action(s) to be performed on the on the port specified by -port_handle. This argument is Mandatory . Possible values are described below:

start - Start IPv6 autoconfiguration

stop - Stop IPv6 autoconfiguration
-port_handle

Specifies a list of ports on which to perform the action

-handle

Specifies a list of devices on which to perform the action

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 or $FAILURE
log        An error message (if the operation failed).

Description

The sth::emulation_ipv6_autoconfig_control function controls the starting and stopping of IPv6 devices.

Examples

#### HLTAPI for Tcl ####

The following example starts the configured IPv6 autoconfiguration:

set returnedString [ sth::emulation_ipv6_autoconfig_control \
                              -port_handle    $portHandle \
                              -action         start]

The following example stops the IPv6 autoconfiguration:

set returnedString [ sth::emulation_ipv6_autoconfig_control \
                              -port_handle    $portHandle \

Sample Output:

{status 1}

#### HLTAPI for Python ####

The following example starts the configured IPv6 autoconfiguration:

ctrl_ret1 = sth.emulation_ipv6_autoconfig_control (
             port_handle         = port_handle[0],
             action              = 'start');

Sample Output:

{'status': '1'}

#### HLTAPI for Perl ####

The following example starts the configured IPv6 autoconfiguration:

my %ctrl_ret1 = sth::emulation_ipv6_autoconfig_control (
             port_handle         => "$hport[1]",
             action              => 'start');

Sample Output:

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

End of Procedure Header

sth::emulation_ipv6_autoconfig_stats

Purpose

Returns statistics about the IPv6 autoconfiguration on the specified port. Statistics include the bound status and number and type of messages sent and received from the specified port.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_ipv6_autoconfig_stats
        [-action {clear|collect}]
        [-handle <handle>]
        [-port_handle <port_handle>]
        [-mode {aggregate|session}]

Arguments

-action

Specifies the action to be taken. Possible values are:

collect
Retrieves the statistics from the specified port or IPv6 device
clear
Removes the statistics from the specified port or IPv6 device

The default value is collect.

-handle

Specifies the handle of the device on which to retrieve statistics. If no handle is specified, then the statistics for all devices configured on the port will be returned. You must specify -handle or -port_handle, but not both.

-port_handle

Specifies the port on which to retrieve statistics

-mode

Specifies the kind of information you want to see. Possible values are described below: :

aggregate
Returns statistics for the specified port
session
If -handle is specified, returns statistics for the specified IPv6 device. If -handle is not specified, then statistics for all IPv6 devices are returned.

The default value is session.

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 or $FAILURE
log            An error message (if the operation failed).

The following port aggregated statistics when you specify -mode to aggregate:

current_bound
                            Number of addresses currently bound to interfaces
current_idle
                            Number of addresses currently not bound to any
                            interfaces
rx_nbr_adv
                            Number of neighbor advertisement messages received
rx_rtr_adv
                            Number of router advertisement messages received
state
                            State of an IPv6 autoconfiguration session
success_percent
                            Percent of interfaces successfully bound with an
                            address
total_attempt
                            Number of attempts to bind addresses to interfaces
total_bound
                            Total number of addresses bound to interfaces
total_dad_failures
                            Total number of duplicate address detection failures
total_failed
                            Number of failures to bind an address to an interface
total_ra_timeout_failur
                            Total number of router advertisements that timed out
tx_nbr_sol
                            Number of neighbor solicitation messages sent
tx_rtr_sol
                            Number of router solicitation messages sent

The following port aggregated statistics when you specify -mode to session:

binding_state
                            State of the current binding attempts
current_attempt
                            Number of interfaces attempting to bind to an address
current_bound
                            Number of interfaces currently bound to an address
current_idle
                            Number of interfaces not currently attempting to
                            bind to an address
state
                            State of an IPv6 autoconfiguration session
total_attempt
                            Total number of attempts to bind addresses for all
                            interfaces
total_bound
                            Total number of interfaces bound to an address
total_dad_failures
                            Number of duplicate address detection failures
total_failed
                            Total number of interfaces that failed to bind to an
                            address

total_ra_timeout_failure
                            Number of router advertisements that timed out

Description

The sth::emulation_ipv6_autoconfig_stats function retrieves a list of aggregate statistics for the IPv6 devices configured on a specified port, or session statistics for a specified IPv6 device.

Examples

#### HLTAPI for Tcl ####

The following example returns aggregate statistics:

set returnedString [ sth::emulation_ipv6_autoconfig_stats \
                        -port_handle    $hltSourcePort \
                        -mode           aggregate]

Sample Output:

{port1 {{state BOUND} {tx_nbr_sol 6} {current_bound 1} {total_attempt 1}
{rx_nbr_adv 0} {tx_rtr_sol 1} {current_idle 0} {total_failed 0}
{success_percent 100} {rx_rtr_adv 1} {total_bound 1} {total_dad_failures 0}
{total_ra_timeout_failures 0}}} {status 1}

The following example returns session statistics:

set returnedString [ sth::emulation_ipv6_autoconfig_stats \
                       -port_handle    $hltSourcePort \
                       -mode           session]

Sample Output:

{state BOUND} {current_bound 1} {total_attempt 1} {current_idle 0}
{total_failed custom_llc 0} {current_attempt 0} {binding_state SUCCESS}
{total_bound 1} {total_dad_failures 0} {total_ra_timeout_failures 0}
{status 1}

If mode is not specified then it returns both aggregate as well as session results:

{port1 {{state BOUND} {tx_nbr_sol 6} {current_bound 1} {total_attempt 1}
{rx_nbr_adv 0} {tx_rtr_sol 1} {current_idle 0} {total_failed 0}
{success_percent 100} {rx_rtr_adv 1} {total_bound 1} {total_dad_failures 0}
{total_ra_timeout_failures 0}}} {state BOUND} {current_bound 1} {total_attempt 1}
{current_idle 0} {total_failed 0} {current_attempt 0} {binding_state SUCCESS}
{total_bound 1} {total_dad_failures 0} {total_ra_timeout_failures 0} {status 1}

#### HLTAPI for Python ####

The following example returns aggregate statistics:

results_ret1 = sth.emulation_ipv6_autoconfig_stats (
             port_handle         = port_handle[0],
             mode                = 'aggregate',
             action              = 'collect');

Sample Output:

{'status': '1', 'port1': {'success_percent': '0', 'total_failed': '0',
'rx_rtr_adv': '0', 'total_attempt': '0', 'rx_nbr_adv': '0', 'state': 'IDLE',
'current_idle': '1', 'total_bound': '0', 'tx_rtr_sol': '0',
'total_dad_failures': '0', 'total_ra_timeout_failures': '0', 'tx_nbr_sol': '0',
'current_bound': '0'}}

#### HLTAPI for Perl ####

The following example returns aggregate statistics:

my %results_ret1 = sth::emulation_ipv6_autoconfig_stats (
             port_handle         => "$hport[1]",
             mode                => 'aggregate',
             action              => 'collect');

Sample Output:

$VAR1 = 'status';
$VAR2 = '1';
$VAR3 = 'port1';
$VAR4 = {
          'total_dad_failures' => '0',
          'total_failed' => '0',
          'current_bound' => '0',
          'tx_rtr_sol' => '0',
          'rx_rtr_adv' => '0',
          'current_idle' => '1',
          'state' => 'IDLE',
          'tx_nbr_sol' => '0',
          'success_percent' => '0',
          'rx_nbr_adv' => '0',
          'total_bound' => '0',
          'total_attempt' => '0',
          'total_ra_timeout_failures' => '0'
        };

End of Procedure Header