#!/usr/bin/perl # # $Copyright$ # # $TAHI: ct/nd/adrsolvQueuOne.seq,v 1.23 2003/10/15 15:25:20 masaxmasa 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 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_ns=$nd::RETRANS_TIMER * $nd::MAX_MULTICAST_SOLICIT; $wait_echo=2; # # Start capture buffer # vLogHTML("Initialize
"); vCapture($IF); # # Need to clear neighbor cache entries of the target. # goto error if nd2NoNce($IF) != 0; # # # vLogHTML("Test
"); # # Send an echo-request (src:tn's link, dst:tn's link) # $pktdesc{echo_request}="Send an echo-request (TN ==> NUT)"; %ret=vSend($IF, echo_request); # # Should capture a NS (src:nut's link, dst:solnode[tn's link]) # $pktdesc{multicast_ns}="Got a multicast NS (TN <== NUT), then INCOMPLETE"; %ret=vRecv($IF, $wait_ns, $ret{sentTime1}, 1, multicast_ns); goto error if $ret{status} != 0; # # Send a NA (src:tn's link, dst:nut's link) # $pktdesc{na}="Send a NA (TN ==> NUT)"; %ret=vSend($IF, na); # # Should capture an echo-reply (src:nut's link, dst:tn's link) # $pktdesc{echo_reply}="Got an echo-reply (TN <== NUT), then REACHABLE"; %ret=vRecv($IF, $wait_echo, $ret{sentTime1}, 1, echo_reply); goto error if $ret{status} != 0; vLogHTML("OK
"); exit $V6evalTool::exitPass; error: vLogHTML(vErrmsg(%ret)."
"); vLogHTML(ndErrmsg("NG
")); exit $V6evalTool::exitFail; ######################################################################## __END__ =head1 NAME adrsolvQueuOne - Verifying an address resolution queue =head1 TARGET Host and Router =head1 SYNOPSIS adrsolvQueuOne.seq [-tooloption ...] -p adrsolvQueuOne.def =head1 INITIALIZATION Clear a neighbor cache entry for TN. =head1 TEST PROCEDURE B verifies that a NUT queues a packet whose LLA is not resolved. =begin html
  TN		   NUT
  ----------------------

State: No neighbor cache entry (for TN)
==== echo-request ===> src=TN's link-local dst=NUT's link-local
State: INCOMPLETE (for TN)
<=== Judgment #1: multicast NS ==== src=NUT's link-local or global dst=solicited-node[TN's link-local] w/ SLLA timeout: $RETRANS_TIMER * $MAX_MULTICAST_SOLICIT
==== solicited NA ===> src=TN's link-local dst=NUT's link-local R=0, S=1, O=1 w/ TLLA
State: REACHABLE (for TN)
<=== Judgment #2: echo-reply ==== src=NUT's link-local dst=TN's link-local
=end html =head1 JUDGMENT =begin html

  1. NUT must send at the lease one multicast NS.
     src=NUT's link-local or global, dst=sol-node[TN's link-local], w/ SLLA

  2. NUT must send an echo-reply to TN.
     src=NUT's link-local, dst=TN's link-local
=end html =head1 TERMINATION N/A =head1 NOTE The test does not invoke any remote command. =head1 REFERENCE =begin html
RFC2461

7.2.2 Sending Neighbor Solicitations
When a node has a unicast packet to send to a neighbor, but does not know the neighbor's link-layer address, it performs address resolution. For multicast-capable interfaces this entails creating a Neighbor Cache entry in the INCOMPLETE state and transmitting a Neighbor Solicitation message targeted at the neighbor. The solicitation is sent to the solicited-node multicast address corresponding to the target address.
If the source address of the packet prompting the solicitation is the same as one of the addresses assigned to the outgoing interface, that address SHOULD be placed in the IP Source Address of the outgoing solicitation. Otherwise, any one of the addresses assigned to the interface should be used. Using the prompting packet's source address when possible insures that the recipient of the Neighbor Solicitation installs in its Neighbor Cache the IP address that is highly likely to be used in subsequent return traffic belonging to the prompting packet's "connection".
If the solicitation is being sent to a solicited-node multicast address, the sender MUST include its link-layer address (if it has one) as a Source Link-Layer Address option. Otherwise, the sender SHOULD include its link-layer address (if it has one) as a Source Link-Layer Address option. Including the source link-layer address in a multicast solicitation is required to give the target an address to which it can send the Neighbor Advertisement. On unicast solicitations, an implementation MAY omit the Source Link-Layer Address option. The assumption here is that if the sender has a peer's link-layer address in its cache, there is a high probability that the peer will also have an entry in its cache for the sender. Consequently, it need not be sent.
While waiting for address resolution to complete, the sender MUST, for each neighbor, retain a small queue of packets waiting for address resolution to complete. The queue MUST hold at least one packet, and MAY contain more. However, the number of queued packets per neighbor SHOULD be limited to some small value. When a queue overflows, the new arrival SHOULD replace the oldest entry. Once address resolution completes, the node transmits any queued packets.
=end html =head1 SEE ALSO perldoc V6evalTool perldoc V6evalRemote =cut