Printer FriendlyEmail Article Link

Spirent TestCenter-JTAPI:How to enable the option "source as list option" for IGMP?

Environment/Versions

Spirent TestCenter
Automation-JTAPI
IGMP
 

Answer

Below is the code:

my $igmp1 = {groups=>\@group1, filter_mode => "include", version=>"IGMP_V3",
user_defined_sources=>"true",filter_source_addr=>"225.0.0.1 225.0.0.2",
filter_addr_count=>"3"};
my @host1 = $rt->setup_hosts(ports=>[$port1],MAC_ADDR=>"00:10:94:00:00:02",host_count=>"1",ipv4_addr=>"20.20.20.2",ipv4_gw_addr=>"20.20.20.1",igmpmld_config=>$igmp1);
#######Using the Native API as there is no direct attribute to enable/disable the option
my $IgmpHostConfig=$rt->invoke("stc::get $host1[0] -children-IgmpHostConfig");
my $IgmpGroupMembership=$rt->invoke("stc::get $IgmpHostConfig -children-IgmpGroupMembership");
my @igmpmemberships = split(/ /, $IgmpGroupMembership);
foreach $igm (@igmpmemberships) {
$rt->invoke("stc::config $igm -IsSourceList true");
}


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