#!/usr/bin/perl # # $Copyright_v6PC$ # # $Copyright$ # # $TAHI: ct/nd/routerSendUnsolRaMin.seq,v 1.10 2004/04/02 02:28:24 akisada Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: $ '; } use V6evalTool; use nd; use ra; my $wait_readout = $nd::DELAY_FIRST_PROBE_TIME + $nd::RETRANS_TIMER * $nd::MAX_UNICAST_SOLICIT + 1; ndOptions(@ARGV); # The following generate debugging messages. $nd::debug=$ndOpt_v|$ndOpt_vv; # You can specifies debug options to a remote control program. # If you want to know more detail, please see the following: # - V6evalTool.pm: perldoc V6evalTool # - V6evalRemote.pm: perldoc V6evalRemote $nd::remote_debug="-o1" if $ndOpt_vv; $IF=Link0; $wait_ra=$ra::minRAmaxInterval*2; # # # $type=$V6evalTool::NutDef{Type}; if($type eq host) { vLogHTML("This test is for the router only
"); exit $V6evalTool::exitRouterOnly; } $type=$V6evalTool::NutDef{Type}; if($type ne router) { vLogHTML(ndErrmsg("ERROR: $V6evalTool::NutDef{Type}: ". "Unknown target type
")); exit $V6evalTool::exitFail; } # # # raStartMinRA() || exit $V6evalTool::exitFail; # # # vCapture($IF); # # # $r=raRecvMinRA($IF, $wait_ra, 0, 0, %ret); if($ret{status} != 0 || $r == 0) { $exit_rtn=$V6evalTool::exitFail; goto end; } # # # end: if($exit_rtn == $V6evalTool::exitPass) { vLogHTML("OK
"); } else { vLogHTML(ndErrmsg("NG
")); readout($IF, $wait_readout); } exit $exit_rtn; sub readout($$) { my ($if, $timeout) = @_; return(vRecv($if, $timeout, 0, 0)); } ######################################################################## __END__ =head1 NAME routerSendUnsolRaMin - NUT sends configured RAs. =head1 TARGET Router only =head1 SYNOPSIS routerSendUnsolRaMin.seq [-tooloption ...] -p routerSendUnsolRaMin.def =head1 INITIALIZATION Start NUT advertising RAs: MaxRtrAdvInterval 10 MinRtrAdvInterval 7 AdvCurHopLimit 64 AdvManagedFlag&AdvOtherConfigFlag False AdvDefaultLifetime 0 (min value) AdvReachableTime 0 (min value) AdvRetransTimer 0 (min value) AdvOnlinkFlag&AdvAutonomousFlag True AdvValidLifetime 2592000 AdvPerferredLifetime 604800 AdvLinkMTU 1500 =head1 TEST PROCEDURE =begin html routerSendUnsolRaMin verifies that NUT sends RAs =end html =head1 TERMINATION N/A =head1 NOTE The test invokes remote command - rtadvd.rmt. =head1 REFERENCE =begin html
RFC2461

6.2.4. Sending Unsolicited Router Advertisements
A host MUST NOT send Router Advertisement messages at any time.
Unsolicited Router Advertisements are not strictly periodic: the interval between subsequent transmissions is randomized to reduce the probability of synchronization with the advertisements from other routers on the same link [SYNC]. Each advertising interface has its own timer. Whenever a multicast advertisement is sent from an interface, the timer is reset to a uniformly-distributed random value between the interface's configured MinRtrAdvInterval and MaxRtrAdvInterval; expiration of the timer causes the next advertisement to be sent and a new random value to be chosen.
=end html =head1 SEE ALSO perldoc V6evalTool perldoc V6evalRemote =cut