MLD Functions¶
emulation mld config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Creates, modifies, or deletes a Multicast Listener Discovery Protocol (MLD) session on the specified Spirent HLTAPI port or handle.
MLD is a communications protocol that manages IPv6 multicast groups. Use MLD to track IPv6 multicast membership.
Synopsis:
Note: 1. M indicates the argument is `Mandatory`.
2. S indicates the argument is for `scaling` scenarios.
emulation mld config
mode= {create|modify|activate|delete} M
port_handle= <port_handle>
handle= <device_handle>|<mld_session_handle>
count= <1-65535>
filter_mode= {include | exclude}
filter_ip_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
force_leave= {0|1}
force_robust_join= {0|1}
general_query= 1
group_query= 1
insert_checksum_errors= {0|1}
intf_ip_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
intf_ip_addr_step= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
intf_prefix_len= <1-128>
insert_length_errors= {0|1}
ip_router_alert= 1
link_local_intf_ip_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
link_local_intf_prefix_len= <1-128>
max_response_control= 0
mld_version= {v1|v2}
msg_interval= <0-4294967295>
neighbor_intf_ip_addr= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
neighbor_intf_ip_addr_step=
<aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>]
qinq_incr_mode= {inner|outer|both}
robustness= <2-255>
suppress_report= 1
unsolicited_report_interval= <0-4294967295>
use_partial_block_state= {0|1}
vlan_cfi= {0|1}
vlan_outer_cfi= {0 | 1}
vlan_id= <0-4095>
vlan_id_count= <1-4096>
vlan_id_mode= {fixed|increment}
vlan_id_step= <0-4094>
vlan_user_priority= <0-7>
vlan_id_outer= <0-4095>
vlan_id_outer_mode= {fixed|increment}
vlan_id_outer_count= <1-4096>
vlan_id_outer_step= <0-4094>
vlan_outer_user_priority= <0-7>
expand= {true|false} S
mcast_group_count= <1-32000>
ignore_memberships= {true|false}
device_group_mapping= {many_to_many|one_to_one|round_robin}
mcast_ipv6_addr= <IPV6>
filtered_sources= {custom|existing|none}
src_ipv6_addr= <IPV6>
src_count= <1-4294967295>
src_step= <0-4294967295>
src_ipv6_prefix= <1-128>
source_filters= {true | false}
source_list= <device_list or host_list>
incr_src_ipv6_addr_per_device= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
Arguments:
count
Defines the number of MLD sessions to create on the
interface. Possible values are 1 to 65535. The default
is 1. You can configure up to 8192 sessions per port.
filter_mode
Specifies an explicit set of sources from which the multicast
group is interested in receiving data (configures MLDv2 Include
Filter mode). Possible values are include and exclude. The
default is "include".
include
Data from the specified sources are filtered and
forwarded to the hosts by the multicast router.
exclude
Data from the specified sources are filtered and
not forwarded to the hosts by the multicast router.
filter_ip_addr
Configure the filtered IP address. The values
must be in IPv6 format. The default value is 2008::8.
force_leave
`Spirent Extension (for Spirent HLTAPI only).`
Controls whether all hosts are `Mandatory` to send leave
reports when leaving the multicast group. Valid values are 0
(false) and 1 (true). The default is 0. If set to 0, hosts
are not `Mandatory` to send a Leave Group message when leaving
a multicast group. If set to 1, hosts are `Mandatory` to send
a Leave Group message when leaving a multicast group. This
argument affects all hosts except the last one, which is
always `Mandatory` to send an MLDv1 leave report. MLDv1 hosts
leaving a multicast group may optionally send a leave report
to the allrouters multicast group.
force_robust_join
`Spirent Extension (for Spirent HLTAPI only).`
Controls whether a second unsolicited join report is
transmitted by the MLDv1 host. Valid values are 0 (false)
and 1 (true). The default is 0. If set to 0, MLDv1 hosts do
not transmit a second join report. If set to 1, MLDv1
hosts do transmit a second join report.
When an MLDv1 host joins a multicast group, it immediately
transmits an initial unsolicited membership report for that
group, in case it is the first member of that group on the
network. In case the initial report gets damaged or lost,
it is recommended that you send a second unsolicited report.
general_query
Always enabled. When general_query is set to 1, Spirent
HLTAPI responds to only general queries received on the
interface.
group_query
Always enabled. When group_query is set to 1, Spirent
HLTAPI responds to only groupspecific (and source/group)
queries received on the interface.
handle
The handle of the MLD host configured on the port to
use when mode is set to either modify or delete. When mode is
create, Spirent HLTAPI creates MLD over the provided device.
(Please refer to mode for more information)
insert_checksum_errors
`Spirent Extension (for Spirent HLTAPI only).`
Controls the insertion of checksum errors into the MLD
messages by the hardware. Valid values are 0 (false) and 1
(true). The default is 0. If set to 0, the MLD checksum of
the transmitted packet is not modified. If set to 1, the
MLD checksum of the transmitted packet is flipped by the
protocol stack (that is, the least significant bit is
inverted.)
insert_length_errors
`Spirent Extension (for Spirent HLTAPI only).`
Controls the insertion of message length errors into the MLD
messages by the MLD stack. Valid values are 0 (false) and 1
(true). The default is 0. If set to 1, every MLD packet
transmitted by the host will be two bytes shorter than
normal If set to 0, the MLD packet lengths will not be
modified.
intf_ip_addr
Specifies the first IPv6 address in the group. This argument
is `Mandatory`.
intf_ip_addr_step
Specifies the difference between interface IP addresses of
consecutive hosts when multiple MLD hosts are created.
The default increment is 1. This argument is only applicable
in create mode.
intf_prefix_len
Specifies the address prefix length on the emulated host,
Possible values for IPv6 addresses range from 1 to 128; the
default is 64,
ip_router_alert
Alerts transit routers to examine the contents of an IP
packet more closely. When ip_router_alert is set to 1,
Spirent HLTAPI enables the IP router alert option. This
argument is always enabled (1 or true) in Spirent HLTAPI
whenever hosts send to routers. The IP router alert option
is useful for new protocols that are addressed to a
destination but require relatively complex processing in
routers along the path. (See RFC 2113 for more information.)
link_local_intf_ip_addr
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the first link local IPv6 address in the group.
link_local_intf_prefix_len
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the address prefix length on the emulated host,
Possible values for link local IPv6 addresses range from 1
to 128; the default is 128.
max_response_control
Always set to 0 (false).
mld_version
Specifies the multicasting protocol used to manage multicast
group memberships. Possible values are::
v1 - Initial multicasting protocol version for IPv6,
similar to IGMPv2. It is specified in RFC 2710.
v2 - Version of MLD, specified in draftvida-mld-
v2-08.txt, that adds the "include" and "exclude"
filter functionality.
mode
Specifies the action to perform. Possible values are create,
modify, and delete. This argument is `Mandatory`. The modes
are described below: :
create
Creates MLD hosts on the specified port or handle,
but does not start them.
modify
Changes the configuration parameters for the MLD
hosts identified by the handle argument. When -port_handle
is provided, Spirent HLTAPI creates one or more emulated
hosts that are associated with the specified port. When
handle is provided, Spirent HLTAPI creates MLD over the
specified device.
activate
Used for `scaling` scenarios.
1. Enables MLD devices and configures MLD 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 mld config`` function for more
information. For this mode, only the following set of
options are valid::
mld_version
device_group_mapping
mcast_ipv6_addr
ignore_memberships
mcast_group_count
filtered_sources
src_ipv6_addr
src_count
src_step
src_ipv6_prefix
2. Creates devices and enables MLD 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_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
source_filters
source_list
incr_src_ipv6_addr_per_device
Note: Please refer to the emulation_device_config documentation.
delete
Stops the MLD emulation locally without attempting
to clear the bound addresses from the MLD server. In
addition, all MLD group sessions information on the
port is cleared and the connection is restarted.
Note: When handle is provided for -mode modify, the following
options will be obsoleted::
intf_ip_addr
intf_ip_addr_step
intf_prefix_len
neighbor_intf_ip_addr
neighbor_intf_ip_addr_step
vlan_cfi
vlan_id
vlan_id_mode
vlan_id_step
vlan_user_priority
vlan_outer_cfi
vlan_id_count
vlan_id_outer
vlan_id_outer_count
vlan_id_outer_step
vlan_id_outer_mode
vlan_outer_user_priority
qinq_incr_mode
link_local_intf_ip_addr
link_local_intf_ip_addr_step
link_local_intf_prefix_len
msg_interval
Maximum output rate of MLD message packets generated per
millisecond. Set this value to 0 to send messages as fast
as possible. Possible values range from 0 to 4294967295. The
default is 0.
neighbor_intf_ip_addr
Specifies the IP address of the interface for the MLD
neighbor (next hop) that will establish an adjacency with
the DUT. The default for IPv6 is 2000::1.
neighbor_intf_ip_addr_step
Specifies the difference between the MLD neighbor's
interface IP addresses when multiple MLD hosts are created.
The default is 0000:0000:0000:0000:0000:0000:0000:0000 (that
is, the same address).
port_handle
The handle of the port on which to create the MLD session.
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.
robustness
Specifies the number of times to send a State
Change Report. This number is used in the calculation of
default values for various timers and counters. Possible
values are 2 to 255. The default value is 2. For MLDv1, you
must set force_robust_join to 1.
suppress_report
Suppresses the transmission of a listener report that
duplicates one received on the interface. Multicast hosts
can suppress the transmission of reports to reduce the
amount of multicast communication. This argument is
always enabled.
unsolicited_report_interval
Sets the interval (in 1/10 seconds) to wait before re-
sending the host's initial report of membership in a group.
Possible values are 0 to 4294967295. The default value is
100 for MLDv1 and 10 for MLDv2. Set it to 0 if you do not
want to send an unsolicited report.
use_partial_block_state
`Spirent Extension (for Spirent HLTAPI only).`
Controls the use of a partial block state. Possible values
are 1 (true) and 0 (false). When set to 1, this argument
enables using a partial block state. When set to 0, it
disables the use of a partial block state.
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
Defines the VLAN ID of the first VLAN subinterface.
Possible values range from 0 to 4095. The default is 1. When
the mode is either "create" or "enable", Spirent HLTAPI
checks for a vlan object on the port with the given VLAN ID.
If no VLAN object with that ID exists, Spirent HLTAPI
creates a VLAN object with the specified VLAN ID.
vlan_id_count
Specifies the number of inner VLAN tags to generate for the
stream. Possible values range from 1 to 4096. The default
is 1.
vlan_id_mode
If you configure more than one interface on Spirent
HLTAPI with VLAN, you can choose to either automatically
increment the VLAN tag (mode "increment") or leave it idle
for each interface (mode "fixed"), in which case the VLAN ID
is the same for all packets. If you set this argument
to "increment", then you must also specify the vlan_id_step
argument to indicate the step size. The default is
increment.
vlan_id_step
Defines the step size by which the VLAN value is incremented
when you set vlan_id_mode to "increment". Possible values
range from 0 to 4094. You must specify the step when the
count argument is greater than 1. The default is 1.
vlan_id_outer
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the VLAN ID for a particular outer header.
Possible values range from 0 to 4095.
vlan_id_outer_count
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the number of VLAN tags to generate for the
outer header. Possible values range from 1 to 4096.
The default is 1. You must set the vlan_id_outer_mode
argument to increment.
vlan_id_outer_mode
`Spirent Extension (for Spirent HLTAPI only).`
Specifies how Spirent Test Center will assign VLAN tags to
packets in the specified outer header. Possible values are:
fixed
The outer VLAN ID is the same for all packets.
increment
For all packets, the outer VLAN tag ID increments by the step
specified in the vlan_id_outer_step argument.
vlan_id_outer_step
`Spirent Extension (for Spirent HLTAPI only).`
The amount by which to increment the specified outer VLAN ID
(vlan_id_outer) for subsequent packets. Possible values
range from 0 to 4094. The default is 0.
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.
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.
vlan_user_priority
Defines the VLAN priority for the VLANs on this port.
Possible values range from 0 to 7. The default is 0.
expand
`Spirent Extension (for Spirent HLTAPI only).`
Determines whether to expand the specified MLD device
parameters into emulated MLD device objects. It is
used in `scaling` test scenarios.
When set to true, a list of emulated device handles (handle_list)
with enabled MLD device configurations is created.
When set to false, only MLD parameters are configured with no
handle returned.
mcast_group_count
Specifies the number of multicast groups to subscribe to.
Possible values range from 1 to 32000. The default is 1.
Applicable only in mode activate when -block_mode or -expand is specified.
ignore_memberships
Specifies to enable/disable configuration of group memberships.
Possible values are true and false. The default is true.
Applicable only in mode activate when -block_mode or -expand is specified.
mcast_ipv6_addr
Specifies the IPv4 multicast group address.
The default is ff1e::1
Applicable only in mode activate when -block_mode or -expand is specified.
device_group_mapping
Specifies the mapping between the device and subscribed multicast group
within their respective blocks.
The default is many_to_many
Applicable only in mode activate when -block_mode or -expand is specified.
src_ipv6_addr
Specifies the ulticast source IPv6 address.
The default is 2001::2
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources custom
source_filters false
src_count
Specifies the number of multicast sources.
The default is 1
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources custom
source_filters false
src_step
Specifies the step for the multicast source address.
The default is 1
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources custom
source_filters false
filtered_sources
Mode for specifying filtered sources.
Applicable only in mode activate when -block_mode or -expand is specified.
Possible values are::
existing - Use existing sources (Hosts).
custom - Specify sources by entering starting source IP, count, and step.
none - Specifies an empty source list.
The default is none.
src_ipv6_prefix
Specifies the multicast source IPv6 prefix length.
The default is 64.
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources custom
source_filters false
source_filters
`Spirent Extension (for Spirent HLTAPI only).`
Specifies to configure source address pool when mode is set to activate.
Applicable only in mode activate when -block_mode or -expand is specified.
Possible values are::
true - Configures source IP as MLDV2 host IP.
false - Configures source IP based on the source_list or -incr_src_ipv6_addr_per_device
argument setting.
The default is true.
source_list
`Spirent Extension (for Spirent HLTAPI only).`
Specifies to provide the list of device handles.
MLDV2 group sources will be mapped with provided device IP.
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources existing
source_filters false
incr_src_ipv6_addr_per_device
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the source IP incrementation per MLDV2 host in IPV6 format.
Applicable only in mode activate when -block_mode or -expand is specified.
These argument settings are required::
filtered_sources custom
source_filters false
src_ipv6_addr aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh
Arguments Unsupported by Save as HLTAPI:
The following Spirent HLTAPI arguments are currently not supported by the Save as
HLTAPI function::
qinq_incr_mode
vlan_id_outer_count
Vendor Specific Arguments Processed by Spirent HLTAPI Wrapper:
None
Vendor Specific Arguments Ignored by Spirent HLTAPI Wrapper:
max_groups_per_pkts
reset
mac_address_init
msg_count_per_interval
mac_address_step
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:
max_groups_per_pkts max_response_time
- 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 MLD session handle. A handle to the MLD host block is returned on success. handle_list A list of emulated devices with enabled MLD configuratin created by ``emulation mld 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 mld config
function creates, modifies, enables, or deletes one or more emulated MLD hosts. Use the mode argument to specify the action to perform. (See the mode argument description for information about the actions.)When you create an MLD host, use the port_handle argument to specify the Spirent HLTAPI port that the emulated MLD host will use for MLD communication. (The port handle value is contained in the keyed list returned by the
connect
function.)Use the mode create function to define the characteristics of an MLD host.
Spirent HLTAPI supports the use of MLD versions 1 and 2 for multicast group membership.
For more information about the MLD protocol, see RFC 2710 (MLDv1) and draftvida-mldv2-08.txt (MLDv2).
Examples:
The following example creates an MLD session:
emulation mld config port_handle= $port_handle1 mode= create mld_version= v1 intf_ip_addr= 2001::3 neighbor_intf_ip_addr= 2001::1Sample output for example shown above:
{handle host1} {status 1}The following example uses the function in scaling mode (mode= activate) with port_handle= and block_mode:
set mld_ret [emulation mld config mode= activate port_handle= $port1 count= 2 block_mode= ONE_DEVICE_PER_BLOCK block_name_index= 1 vlan_id= 444 vlan_outer_id= 333 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} intf_ipv6_prefix_len= 65 ipv6_step_per_vlan= {"" ::2} ipv6_step_per_port= ::1 link_local_ipv6_step_per_port= ::1:0 link_local_ipv6_step_per_vlan= {::4 ::5} name= DEVICE_BLOCK_MLD vlan_user_pri= 3 vlan_id_count= 2 vlan_id_repeatmode= REPEAT_ACROSS_PORT vlan_outer_id_count= 2 vlan_outer_user_pri= 4 vlan_outer_id_repeatmode= REPEAT_ACROSS_PORT router_id_ipv6= 0101::011 router_id_ipv6_step= ::11 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 mld_version= v2 device_group_mapping= many_to_many mcast_ipv6_addr= ff1e::2 ignore_memberships= false mcast_group_count= 2 filtered_sources= custom src_ipv6_addr= 2002::5 src_count= 2 src_step= 2 src_ipv6_prefix= 64 incr_src_ipv6_addr_per_device= 0.0.1.0 source_filters= false ]Sample Output:
{param_handle emulateddevicegenparams1} {status 1} {handle {}} {handle_list {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5 emulateddevice6 emulateddevice7 emulateddevice8}} {mld_handle_list {mldhostconfig1 mldhostconfig2 mldhostconfig3 mldhostconfig4 mldhostconfig5 mldhostconfig6 mldhostconfig7 mldhostconfig8}} {mld_group_handle_list {mldgroupmembership1 mldgroupmembership2 mldgroupmembership3 mldgroupmembership4 mldgroupmembership5 mldgroupmembership6 mldgroupmembership7 mldgroupmembership8}} {multicast_group_handle_list {ipv4group1 ipv4group2 ipv4group3 ipv4group4 ipv4group5 ipv4group6 ipv4group7 ipv4group8}} {handles {emulateddevice1 emulateddevice2 emulateddevice3 emulateddevice4 emulateddevice5 emulateddevice6 emulateddevice7 emulateddevice8}}
emulation mld group config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
- Creates group pools and source pools and modifies group and
source pools from MLD hosts. This function configures multicast
group ranges for an emulated MLD host. You must use the common
multicast source config
functions with this function.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation mld group config
mode= {create|modify|delete} M
session_handle= <mld_session_handle>
group_pool_handle= <multicast_group_pool_handle>
handle= <group_member_handle>
source_pool_handle= <multicast_source_pool_handle>
device_group_mapping= {many_to_many|one_to_one|round_robin}
user_defined_src= {true|false}
ip_addr_list= <aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
host_handle= <host_handle>
Arguments:
group_pool_handle
Specifies the name of the group (that is, the list of
multicast IP addresses) to link to the MLD host 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 this documentation
set for information about the
emulation multicast group config and
``emulation multicast source config`` functions. This
argument is `Mandatory` in mode create.
handle
Sets the group membership handle that associates group pools
with an MLD host. In modify mode, the membership handle must
be used in conjunction with the session handle to identify
the multicast group pools. mode modify returns the same
handle passed in. This argument is `Mandatory` in modes modify and
delete.
mode
Specifies the action to perform. Possible values are create,
modify, and delete. There is no default; you must specify a
mode. This argument is `Mandatory`.
create
Starts emulation on the port specified with
session_handle and associates an existing multicast
group pool (group_pool_handle) with the specified MLD
host (that is, joins the membership). You must specify
a session handle with mode create.
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.
session_handle
Specifies the handle of the MLD host on which to configure
the MLD group ranges. This argument is `Mandatory` in mode create.
source_pool_handle
Specifies the name of the source pool (that is, the list of
nonmulticast source IP addresses) to associate with the
groups during create mode. Each multicast group may contain
0 or more of these source IP addresses. Use this argument if
the host only wants specific information within the
specified multicast group (group_pool_handle). Specifying
the source pool handle along with the group pool handle in
the ``emulation mld group config`` function adds the
range of source IP addresses to each multicast group.
Before specifying the source pool handle, use the
``emulation multicast source config`` function to add
the source pools. See "Multicast APIs" in this documentation
set for information about the
emulation multicast source config and
``emulation multicast group config`` functions.
device_group_mapping
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the method of mapping between the device and the
subscribed multicast group within their respective blocks.
Possible values are:
many_to_many
Creates a full mesh of devices and groups
one_to_one
Assigns one device to each group. The mapping
stops when it reaches the end of either devices
or groups. Extra devices or groups are not
mapped.
round_robin
Creates a roundrobin pattern of devices and
groups
The default value is many_to_many.
user_defined_src
`Spirent Extension (for Spirent HLTAPI only).`
Enables or disables userdefined multicast sources. Possible
values are true (enable) and false (disable). The default value
is false.
ip_addr_list
`Spirent Extension (for Spirent HLTAPI only).`
A list of IP addresses that are used to specify a range of source
addresses. This argument is available when
user_defined_src is enabled.
host_handle
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the handle of the host on which to configure the MLD
source
- 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 (group_member_handle) created
by the
emulation mld group config
function. - group_pool_handle
- Identifies the group pool handle used by the
emulation mld group config
function to configure or modify the group member. - source_pool_handle
- Identifies the source pool handle used by the
emulation mld 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 mld group config
function configures or modifies a group of MLD 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 MLD host emulation on a port and initialize the port handle argument (using the
emulation mld config
function).When calling emulation mld group config mode=create”, this function will return the group member handle for use with the handle argument.
You can link groups of multicast IP addresses to any interested host or just a subset of IP addresses within each group.
Each multicast IP address directs the information it represents to any host interested in subscribing to it.
To subscribe to only one or more particular IP addresses that exist within a multicast group, you must use the source_pool_handle as well. Specifying the source_pool_handle along with the group_pool_handle in the
emulation mld group config
function, adds the range of source IP addresses to each multicast group.
Examples:
The following example configures the hosts, represented by “mldSessionHandle”, to subscribe to the multicast group(s) represented by “McGroupHandle”:
emulation mld group config mode= create group_pool_handle= $McGroupHandle session_handle= $mldSessionHandleSample output for example shown above:
{status 1} {handle mldhostconfig1}The following example configures the hosts, represented by mldSessionHandle, to subscribe to the multicast group(s) represented by McGroupHandle with user defined source IP list:
emulation mld group config mode= create group_pool_handle= $McGroupHandle session_handle= $mldSessionHandle device_group_mapping= round_robin user_defined_src= true ip_addr_list= "2001::1 1000::2"]Sample output for example shown above:
{status 1} {handle mldhostconfig1}
emulation mld control¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
- Start, stop, or restart the MLD host on the specified port. Leaves and joins group pools.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation mld control
mode= {join|leave|leave_join} M
group_member_handle= <handle>
port_handle= < port_handle_list >
handle= <MLD_session_handle_list>
delay= <seconds>
data_duration= <seconds>
calculate_latency= {0|1}
Arguments:
calculate_latency
`Spirent Extension (for Spirent HLTAPI only).`
Specifies whether to calculate latencies when joining or
leaving multicast groups. Possible values are 0 (do not
calculate latency) and 1 (calculate latency). If set to 1
during an MLD Join, HLTAPI cannot capture the MLD
control plane packets because the analyzer stops to collect
packets so it can calculate latency.
Note: Background traffic analysis with MLD is unavailable
with calculate latency enabled. Also, if you are testing
multiple joins and leaves with calculate latency enabled,
you must add a delay (a few seconds) between subsequent
joins and leaves (see example below).
The following example does 100 iterations of join and leaves
on 90 sessions. A 10second delay is added after each join
and each leave (using the Tcl command "after"). The delay
duration to use depends on the number of iterations and
number of sessions::
for {set joinleaveidx 0} {$joinleaveidx < 100}
{incr joinleaveidx} {
# MLD join
emulation mld control
mode join
calculate_latency 1
handle $MLDSessionHandle
# Adding a delay between join and leave.
# This value is based on 90 sessions joining.
# May need to be adjusted when `scaling` higher.
after 10000
# MLD leave
emulation mld control
mode leave
calculate_latency 1
handle $MLDSessionHandle
# Adding a delay between the last leave and
# the next join when this loops.
# This value is based on 90 sessions leaving.
# May need to be adjusted when `scaling` higher.
after 10000
}
delay
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the amount of time, in seconds, between joins and
leaves. The default is 0.
data_duration
`Spirent Extension (for Spirent HLTAPI only).`
Specifies the amount of time, in seconds, to wait before
latencies are calculated. The default is 10.
group_member_handle
Identifies the MLD (one or more) group member handle.
port_handle
Specifies a list of ports on which to perform the MLD actions.
This argument is `Mandatory` when the mode argument is "start",
"stop", or "restart".
handle
Identifies a list of MLD groups to stop, start, restart, join, or
leave. This value is returned by the
``emulation mld group config`` function. If you do not specify a
group, the specified action is applied to all groups configured
on the port specified by port_handle. This value appears in the
keyed list returned by the emulation mld group config
function.
mode
Specifies the action to perform on the specified handle. If
you provide a handle (handle), this argument performs the
specified action on all groups on this session. If you
provide a group member handle (group_member_handle), this
argument performs the specified action on the specified
group pool(s). If you do not provide either a handle or
a group member handle, this argument performs the specified
action on all groups on all sessions. Possible values are
start, stop, join, leave and leave_join. You must specify one of
these values. The modes are described below: :
join
Joins all groups specified by handle or joins
group pools specified by group_member_handle. If you
do not provide a handle, this action joins all groups
on all ports. This action only affects the status of
the groups, it will not start the MLD protocol.
leave
Leave (or unjoin) all groups specified by handle or
group pools specified by group_member_handle. If you
do not provide a handle, this action leaves all groups
on all ports. This action only affects the status of
the groups, it will not start or stop the protocol.
leave_join
Rejoins all groups specified by handle or
rejoins group pools specified by group_member_handle.
The device specified by handle or
group_member_handle will resend IGMP/MLD Reports.
Note: There is a critical limitation for MLD Latency tests.
For MLD Latency tests (IgmpMldLeaveGroupsCommand), the
Spirent TestCenter analyzer only filters on the upper
two and lower two bytes of the IPv6 group address.
Therefore, if you step any of the 12 bytes in between, these
streams will get aggregated based on the values of the upper
and lower two bytes. The Spirent TestCenter analyzer does
not have enough filter space to filter on the entire 16byte
IPv6 group address.
For example, the following IPv6 group addresses are sent
from port1::
FF1E:1111:0:0:0:0:0:1
FF1E:1111:0:0:0:0:0:2
FF1E:2222:0:0:0:0:0:1
FF1E:2222:0:0:0:0:0:2
Suppose an MLD host on port 2 joins all the groups. You will
be receiving packets from all four group addresses, but
notice how the groups will be aggregated onto two streams on
the analyzer due to the limitation of not being able to
differentiate the middle 12 bytes of the packets.
First, analyzer looks at the upper and lower two bytes of
each packet and ignore the middle 12 bytes, as shown below::
FF1E:1111:0:0:0:0:0:1
FF1E:1111:0:0:0:0:0:2
FF1E:2222:0:0:0:0:0:1
FF1E:2222:0:0:0:0:0:2
Next, packets are aggregated based on the values of the
upper and lower two bytes, as shown below::
Upper Lower
FF1E 1 * represents (FF1E:1111:0:0:0:0:0:1 and
FF1E:2222:0:0:0:0:0:1)
FF1E 2 * represents (FF1E:1111:0:0:0:0:0:2 and
FF1E:1111:0:0:0:0:0:2)
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status Success (1) or failure (0) of the operation. log An error message (if the operation failed).
- Description:
The
emulation mld control
function sends a Join or Leave message from the host to inform a router that the host is either joining the multicast group specified by handle or group_member_handle or terminating its membership in the specified multicast group.When you call the
emulation mld control
function, you specify a handle. Spirent HLTAPI applies the specified action to all of the emulated MLD hosts associated with the specified port.When a host wants to participate in a multicast group, it sends a “join” message to its local router. After a router receives one or more “joins” for a specific group, it forwards any packets destined for that particular group to the appropriate interface(s). The router regularly verifies that the hosts want to continue to participate in the multicast groups by sending periodic “queries” to the receivers.
When a host is no longer interested in multicast group participation, it sends a “leave” message.
Examples:
The following example joins all groups specified by handle:
emulation mld control mode= join handle= $MLDSessionHandleThe following example removes the groups specified by handle= from the hosts on the specified port:
emulation mld control mode= leave handle= $MLDSessionHandleThe following example starts the groups specified by handle:
emulation mld control handle= $MLDSessionHandleThe following example rejoins the groups specified by handle:
emulation mld control mode= leave_join handle= $MLDSessionHandleSample Output:
{status 1} success or {status 0} fail
emulation mld info¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
- Returns statistics about the MLD 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 mld info
handle= <MLD_session_handle> M
port_handle= <port(device.port)>
Arguments:
handle
Specifies the MLD session handle upon which host emulation is
configured. This value is returned by the emulation mld config
function. If handle is not specified, the statistics of all MLD
session handles under project1 will be retrieved.
port_handle
Specifies the port upon which MLD session handle is configured.
The port handle is returned by the ``connect`` function.
If port_handle is not specified, the statistics of all port
handles with MLD session handles configured will be retrieved.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
- status
- Success (1) or failure (0) of the operation.
- log
- An error message (if the operation failed).
- invalid_pkts
Number of invalid MLD packets received. Invalid MLD packets include:
invalid MLD checksum invalid packet length invalid MLD types
- dropped_pkts
- Will always return 0 because Spirent HLTAPI currently does not drop valid MLD packets dropped.
- host_addr
- IP address of host whose group membership stats are being displayed.
- group_addr
- Group membership IP address of host whose group membership stats are being displayed.
- group_membership_stats
- List of group membership statistics.
- state
State of group membership of host whose group membership stats are being displayed. Possible returned values are:
UNDEFINED - The state is not defined. NON_MEMBER - The host does not belong to the group on the interface. Nonmember is the initial state for all memberships on all network interfaces. DELAYING_MEMBER - The host belongs to the group on the interface and has a report delay timer running for that membership. IDLE_MEMBER - The host belongs to the group on the interface and does not have a report delay timer running for that membership. RETRYING_MEMBER - This state applies to MLDv1 hosts when ForceRobustJoin is True. The host is retransmitting its initial "join" before transitioning from the NON_MEMBER state to the DELAYING_MEMBER or IDLE_MEMBER state. INCLUDE - Data from the specified sources are filtered and forwarded to the host by the multicast router. EXCLUDE - Data from the specified sources are filtered and not forwarded to the host by the multicast router.
- join_latency
- The time, in milliseconds, between sending the MLD join and receiving the multicast data for the channel specified in the join message. This value is valid only when “emulation igmp control calculate_latency=” is set to 1.
- leave_latency
- The time, in milliseconds, between sending the MLD leave for a channel and when multicast data has stopped being received. This value is valid only when “emulation igmp control calculate_latency” is set to 1.
In addition, the following MLD port statistics are returned:
- mldv1_queries_rx
- Routers use Multicast Listener Query messages to query a subnet for multicast listeners.
- mldv1_group_queries_rx
- MLDv1 Group specific Queries received.
- mldv1_queries_tx
- MLDv1 Membership Queries are sent by IP multicast routers to query the multicast reception state of neighboring interfaces.
- mldv1_mem_reports_tx
- MLDv1 reports are sent to multicast routers to indicate that hosts have listeners interested in joining multicast groups whose multicast address is listed in the router’s list.
- mldv1_mem_reports_rx
- MLDv1 reports are sent to multicast routers to indicate that hosts have listeners interested in joining multicast groups whose multicast address is listed in the router’s list.
- mldv1_leave_tx
- MLDv1 Leaves transmitted.
- mldv2_queries_rx
- Routers use Multicast Listener Query messages to query a subnet for multicast listeners.
- mldv2_group_queries_tx
- This statistic is included in the TxV2QueryCount. MLDv2 Membership Queries are sent by IP multicast routers to query the multicast reception state of neighboring interfaces.
- mldv2_group_src_queries_rx
- Routers use Multicast Listener Query messages to query a subnet for multicast listeners
- mldv2_mem_reports_rx
- MLDv2 are used to report interest in receiving multicast traffic for a specific multicast address or to respond to a Multicast Listener Query message.
- mldv2_mem_reports_tx
- MLDv2 reports are sent to multicast routers to indicate that hosts have listeners interested in joining multicast groups whose multicast address is listed in the router’s list.
- mld_frames_rx
- Total number of MLD frames received.
- mld_general_queries_rx
- Total number of multicast general queries received.
- mld_group_src_queries_rx
- Group- and sourcespecific queries are sent by a multicast router whenever a host leave a specific source of a group. This is to make sure that there are no other hosts of that source and group.
- mld_group_queries_rx
- The GroupSpecific Query is used to learn if a particular group has any members on an attached network.
- mld_checksum_errors_rx
- Total number of MLD messages received with checksum errors.
- mld_length_errors_rx
- Total number of MLD messages received with length errors.
- mld_unknown_rx
- Total number of MLD frames of unknown type received.
- mld_timestamp
- Timestamp in seconds of last statistic update.
- mld_frames_tx
- Total number of MLD frames transmitted.
- mld_general_queries_tx
- General Queries are used to learn which multicast addresses have listeners on an attached link.
- mld_group_src_queries_tx
- Group- and sourcespecific queries are sent by a multicast router whenever a host leave a specific source of a group. This is to make sure that there are no other hosts of that source and group.
- mld_group_queries_tx
- The GroupSpecific Query is used to learn if a particular group has any members on an attached network.
- mldv2_allow_new_src_tx
- A SourceList-Change Record (SLCR) indicating the group’s associated sources have changed such that data from a new set of sources are to be received
- mldv2_block_old_src_tx
- A SourceList-Change Record (SLCR) indicating the group’s associated sources have changed such that data from an existing set of sources are not Mandatory.
- mldv2_filter_exclude_tx
- A FilterMode-Change Record (FMCR) indicating the filtermode of the reception state has changed to exclude mode.
- mldv2_filter_include_tx
- A FilterMode-Change Record (FMCR) indicating the filtermode of the reception state has changed to include mode.
- mldv2_exclude_tx
- A CurrentState Record (CSR) indicating the current reception state with respect to 1 multicast group at a given interface. The state contains the exclude filter mode.
- mldv2_include_tx
- A CurrentState Record (CSR) indicating the current reception state with respect to 1 multicast group at a given interface. The state contains the include filter mode
- Description:
- The
emulation mld info
function retrieves statistics about the number of invalid and dropped packets on the specified host as well as several port statistics.
Examples:
When you call emulation mld info, the contents of the returned keyed list depends on the status of the call. For example:
emulation mld info handle=$handle1Returns a list that contains one of the following:
- If the call is successful, the list contains stats and command execution status (in this case, a 1 indicating success).
- If the call fails, the list contains error log and command execution status (in this case, a 0 indicating failure).
Sample Output:
{group_membership_stats {{group_addr {{ff1e::1 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::2 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::3 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::4 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::5 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::6 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::7 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::8 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::9 {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}} {ff1e::a {{host_addr {{fe80:1:1:1:1:1:1:2 {{state IDLE_MEMBER} {join_latency 0.000000} {leave_latency 0.000000}}}}}}}}}}} {session {{mldhostconfig1 {{min_join_latency 0.000000} {max_join_latency 0.000000} {avg_join_latency 0.000000} {min_leave_latency 0.000000} {max_leave_latency 0.000000} {avg_leave_latency 0.000000}}}}} {status 1}If there is an error, you will see:
{status 0} {log {Error message }}End of Procedure Header