#!/usr/bin/perl
#
# $Copyright$
#
# $Id: hostRecvRaURD.seq,v 1.1.1.1 2000/10/31 22:38:59 sekiya Exp $
########################################################################
BEGIN { $V6evalTool::TestVersion = '$Name: $ '; }
use V6evalTool;
use nd;
ndOptions(@ARGV);
# The following generate debugging messages.
$nd::debug=$ndOpt_v|$ndOpt_vv;
# You can specifies debug optons 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;
$exit_rtn=$V6evalTool::exitHostPass;
$wait_dad=3;
$wait_echo=2;
$wait_incomplete=($nd::RETRANS_TIMER * $nd::MAX_MULTICAST_SOLICIT) + 1;
$wait_stale=($nd::REACHABLE_TIME * $nd::MAX_RANDOM_FACTOR) + 1;
$wait_probe=$nd::DELAY_FIRST_PROBE_TIME +
($nd::RETRANS_TIMER * $nd::MAX_UNICAST_SOLICIT) + 1;
#
#
#
$type=$V6evalTool::NutDef{Type};
if($type eq router) {
vLogHTML("This test is for the host only
");
exit $V6evalTool::exitHostOnly;
}
$type=$V6evalTool::NutDef{Type};
if($type ne host) {
vLogHTML(ndErrmsg("ERROR: $V6evalTool::NutDef{Type}: ".
"Unknown target type
"));
exit $V6evalTool::exitFail;
}
#
#
#
vLogHTML("
TN NUT ----------------------=end html =head1 TEST PROCEDURE =begin html
State: NONCE (for TN, Y, Z)
==== unsolicited RA ===> src=TN's link-local dst=all-node M=0, O=0 RouterLifetime=600 ReachableTime=0 RetransTimer=0 w/ SLLA Prefix Option: L=1, A=1 ValidLifetime=2592000 PreferredLifetime=604800 Prefix=3ffe:501:ffff:100::/64
==== unsolicited RA ===> src=Y's link-local dst=all-node M=0, O=0 RouterLifetime=600 ReachableTime=0 RetransTimer=0 w/ SLLA Prefix Option: L=1, A=1 ValidLifetime=2592000 PreferredLifetime=604800 Prefix=3ffe:501:ffff:100::/64
==== unsolicited RA ===> src=Z's link-local dst=all-node M=0, O=0 RouterLifetime=600 ReachableTime=0 RetransTimer=0 w/ SLLA Prefix Option: L=1, A=1 ValidLifetime=2592000 PreferredLifetime=604800 Prefix=3ffe:501:ffff:100::/64
State: STALE (for TN, Y, Z)
<=== Ns for DAD (if any) ==== src=unspecified dst=solicited-node[NUT's global, prefix=3ffe:501:ffff:100::/64] target=NUT's global Wait (3 sec)
==== solicited NA ===> src=TN's link-local dst=NUT's link-local R=1, S=1, O=1 target=TN's link-local TLLA=TN's LLA
==== solicited NA ===> src=Y's link-local dst=NUT's link-local R=1, S=1, O=1 target=Y's link-local TLLA=Y's LLA
==== solicited NA ===> src=Z's link-local dst=NUT's link-local R=1, S=1, O=1 target=Z's link-local TLLA=Z's LLA
State: REACHABLE (for TN, Y, Z)
Wait (REACHABLE_TIME * MAX_RANDOM_FACTOR)
State: STALE (for TN, Y, Z)
TN NUT ----------------------=end html =head1 JUDGMENT =for html 1. NUT must throw an echo-reply to the default router (i.e. NUT). =for html 2. NUT must throw an echo-reply to the default router (i.e. Y). =for html 3. NUT must throw an echo-reply to the default router (i.e. Z). =for html 4. Routers should be selected in a raound-robin fashion. =head1 TERMINATION Send RAs to clear the Default Router List: - RA (src=TN) with RouterLifetime=0 - RA (src=Y) with RouterLifetime=0 - RA (src=Z) with RouterLifetime=0 =head1 NOTE 1. The test does not invoke any remote command: =head1 REFERENCE =begin html RFC2461
State: STALE (for TN, Y, Z)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
<=== Judgment #1: echo-reply ==== src=NUT's global dst=off-link global, but LLA is TN's one
State: DELAY (for TN), STALE (for Y, Z)
Wait (DELAY_FIRST_PROBE_TIME + (RETRANS_TIMER * $MAX_UNICAST_SOLICIT)) for the entry of the Default Router List to be unreachable.
State: NONCE (for TN), STALE (for Y, Z)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
<=== Judgment #2: echo-reply ==== src=NUT's global dst=off-link global, but LLA is Y's one
State: NONCE (for TN), DELAY (for Y), STALE (for Z)
Wait (DELAY_FIRST_PROBE_TIME + (RETRANS_TIMER * $MAX_UNICAST_SOLICIT)) for the entry of the Default Router List to be unreachable.
State: NONCE (for TN, Y), STALE (for Z)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
<=== Judgment #3: echo-reply ==== src=NUT's global dst=off-link global, but LLA is Z's one
State: NONCE (for TN, Y), DELAY (for Z)
Wait (DELAY_FIRST_PROBE_TIME + (RETRANS_TIMER * $MAX_UNICAST_SOLICIT)) for the entry of the Default Router List to be unreachable.
State: NONCE (for all)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
State: INCOMPLETE (for TN), NONCE (for Y, Z)
<=== Judgment #4: multicast NS ==== src=NUT's global dst=solicited-node[TN's link-local] target=TN's link-local w/ SLLA
Wait (RETRANS_TIMER * $MAX_MULTICAST_SOLICIT)
State: NONCE (for all)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
State: INCOMPLETE (for Y), NOCE (for TN, Z)
<=== Judgment #4: multicast NS ==== src=NUT's global dst=solicited-node[Y's link-local] target=Y's link-local w/ SLLA
Wait (RETRANS_TIMER * $MAX_MULTICAST_SOLICIT)
State: NONCE (for all)
==== echo-request ===> src=off-link global, but LLA is the W's one dst=NUT's global
State: INCOMPLETE (for Z), NONCE (for TN, Y)
<=== Judgment #4: multicast NS ==== src=NUT's global dst=solicited-node[Z's link-local] target=Z's link-local w/ SLLA
Wait (RETRANS_TIMER * $MAX_MULTICAST_SOLICIT)
State: NONCE (for all)
6.3.4. Processing Received Router Advertisements=end html =head1 SEE ALSO perldoc V6evalTool perldoc V6evalRemote =cut
To limit the storage needed for the Default Router List, a host MAY choose not to store all of the router addresses discovered via advertisements. However, a host MUST retain at least two router addresses and SHOULD retain more. Default router selections are made whenever communication to a destination appears to be failing. Thus, the more routers on the list, the more likely an alternative working router can be found quickly (e.g., without having to wait for the next advertisement to arrive).
6.3.6. Default Router Selection
The policy for selecting routers from the Default Router List is as follows:
1) Routers that are reachable or probably reachable (i.e., in any state other than INCOMPLETE) SHOULD be preferred over routers whose reachability is unknown or suspect (i.e., in the INCOMPLETE state, or for which no Neighbor Cache entry exists). An implementation may choose to always return the same router or cycle through the router list in a round-robin fashion as long as it always returns a reachable or a probably reachable router when one is available.
2) When no routers on the list are known to be reachable or probably reachable, routers SHOULD be selected in a round-robin fashion, so that subsequent requests for a default router do not return the same router until all other routers have been selected.
Cycling through the router list in this case ensures that all available routers are actively probed by the Neighbor Unreachability Detection algorithm. A request for a default router is made in conjunction with the sending of a packet to a router, and the selected router will be probed for reachability as a side effect.
3) If the Default Router List is empty, assume that all destinations are on-link as specified in Section 5.2.