Printer FriendlyEmail Article Link

Spirent TestCenter-HLTAPI:How to enable/disable the option User defined sources for a MLD device and to configure Source Filter?

Environment/Versions
  • Spirent TestCenter
  • Automation-HLTAPI
  • MLD
Answer
Currently there is not HLTAPI to configure these options. We can invoke the below native API:

% stc::config mldgroupmembership1 -UserDefinedSources false  ##########To disable the User defined source 
%
% stc::config mldgroupmembership1 -SubscribedGroups-targets ipv6group1 ########## To Select the source filter
% stc::config mldGroupMembership1 -SubscribedSources-targets host1


Complete code:

% pack req SpirentHltApi
 
OS: Windows NT, 6.1, windows; Tcl version: 8.6.4
 
HLTAPI supports tcl 8.4.xxx:
        Wrong Tcl version 8.6.4 may load HLTAPI wrongly!
19:32:39.999 WARN  - Tcl versions newer than 8.5.14 are not supported.
SpirentTestCenter Automation Version: 4.64.8676.0000
Hlt Api (Ver. 4.59) was successfully loaded and initialized
Internal Version: 4.59GA.0304
4.59
% set i 0
0
% set device 10.108.8.20
10.108.8.20
% set port_list "1/1 1/2"
1/1 1/2
% set intStatus [sth::connect -device $device -port_list $port_list -break_locks 1 -offline 0]
{offline 0} {port_handle {{10 {{108 {{8 {{20 {{1/1 port1} {1/2 port2}}}}}}}}}}} {status 1}
%
% set device_ret0_ipgroup_1 [sth::emulation_multicast_group_config\
        -pool_name                                        Ipv6Group_4 \
        -ip_prefix_len                                    128 \
        -ip_addr_start                                    ff1e::1 \
        -ip_addr_step                                     1 \
        -num_groups                                       1 \
        -mode                                             create\
]
{status 1} {handle ipv6group1}
% set device_ret0_ipblock_1 [sth::emulation_multicast_source_config\
        -ip_prefix_len                                    128 \
        -ip_addr_start                                    2000::1 \
        -ip_addr_step                                     1 \
        -num_sources                                      1 \
        -mode                                             create\
]
{status 1} {handle multicastSourcePool(0)}
% set device_ret0 [sth::emulation_mld_config\
        -mode                                             create\
        -filter_mode                                      exclude\
        -filter_ip_addr                                   2000::1\
        -link_local_intf_ip_addr                          fe80::210:94ff:fe00:2\
        -link_local_intf_ip_addr_step                     ::1\
        -link_local_intf_prefix_len                       64\
        -port_handle                                      port1\
        -msg_interval                                     0 \
        -neighbor_intf_ip_addr_step                       :: \
        -neighbor_intf_ip_addr                            2001::1 \
        -intf_ip_addr                                     2001::4 \
        -intf_prefix_len                                  64 \
        -intf_ip_addr_step                                ::1 \
        -insert_length_errors                             FALSE \
        -mld_version                                      v2 \
        -unsolicited_report_interval                      10 \
        -insert_checksum_errors                           FALSE \
        -force_leave                                      FALSE \
        -use_partial_block_state                          FALSE \
        -force_robust_join                                FALSE \
        -count                                            1 \
]
{handle host1} {handles mldhostconfig1} {status 1}
%
%
% set device_ret0_group [sth::emulation_mld_group_config\
        -mode                                             create\
        -session_handle                                   mldhostconfig1\
        -group_pool_handle                                ipv6group1\
        -source_pool_handle                               multicastSourcePool(0)\
]
{status 1} {handle mldgroupmembership1}
%
%
%
% stc::config mldgroupmembership1 -UserDefinedSources false  ##########To disable the User defined source 
%
% stc::config mldgroupmembership1 -SubscribedGroups-targets ipv6group1 ########## To Select the source filter
% stc::config mldGroupMembership1 -SubscribedSources-targets host1

Product : Automation,API,Spirent TestCenter,IGMP/MLD