#!/usr/bin/perl # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Yokogawa Electric Corporation. # All rights reserved. # # Redistribution and use of this software in source and binary # forms, with or without modification, are permitted provided that # the following conditions and disclaimer are agreed and accepted # by the user: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with # the distribution. # # 3. Neither the names of the copyrighters, the name of the project # which is related to this software (hereinafter referred to as # "project") nor the names of the contributors may be used to # endorse or promote products derived from this software without # specific prior written permission. # # 4. No merchantable use may be permitted without prior written # notification to the copyrighters. # # 5. The copyrighters, the project and the contributors may prohibit # the use of this software at any time. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHTERS, THE PROJECT AND # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING # BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHTERS, THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # $TAHI: ct/nd.p2/V6LC_2_1_2_B.seq,v 1.5 2005/06/14 06:03:15 akisada Exp $ # ######################################################################## use nd; BEGIN {} END {} my $maxPacketA = $WAIT_QUEUE_LMT; my $maxPacketB = $WAIT_QUEUE_LMT + 1; my %echo0 = (); my %echo1 = (); if(ndResolutionWaitQueueMultipleSetup($maxPacketA, $maxPacketB, \%echo0, \%echo1) < 0) { exitFatal(); #NOTREACHED } startNdiscWorld($Link0); if(setupCase3($Link0) < 0) { exitFatal(); #NOTREACHED } if(ndResolutionWaitQueueMultiple($Link0, \%echo0, \%echo1) < 0) { exitFail(); #NOTREACHED } exitPass(); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_1_2_B - Resolution Wait Queue (Multiple Queue) =end html =begin html=end html =head1 TARGET =begin html
Host/Router=end html =head1 TOPOLOGY =begin html
=end html =head1 SETUP =begin htmlTN H0 NUT | | | ----+-------+-------+--- Link0
Link0 link-local fe80::/64 TN link-local fe80::<TnDef.Link0_addr> ether <TnDef.Link0_addr> H0 link-local fe80::200:ff:fe00:a0a0 ether 00:00:00:00:a0:a0 NUT link-local fe80::<NutDef.Link0_addr> ether <NutDef.Link0_addr>
=end html =head1 INITIALIZATION =begin htmlnone
=end html =head1 TEST PROCEDURE =begin htmlnone
- Verify that NUT transmits valid NSs in INCOMPLETE state=end html =head1 JUDGEMENT =begin html
- Verify that NUT can transmit Echo Reply after address resolution
- Verify that NUT has one queue for each neighbor.
TN1 TN2 NUT | | | | ------------> | Echo Request (SN=0) | | ----> | Echo Request (SN=0) | ------------> | Echo Request (SN=1) | | ----> | Echo Request (SN=1) | ------------> | Echo Request (SN=2) | | ----> | Echo Request (SN=2) | | ----> | Echo Request (SN=3) | <---------- | NS (multicast) [Judgment #1] | | <-- | NS (multicast) [Judgment #2] | ------------> | NA | | ----> | NA | <------------ | Echo Reply (SN=2) [Judgment #3] | | <---- | Echo Reply (SN=3) [Judgment #4] | | | V V V
State: NONE (TN1) (link-local) State: NONE (TN2) (link-local)1. Send Echo RequestIPv6 header source = TN1 (link-local) destination = NUT (link-local) Echo Request sequence number = 0State: INCOMPLETE (TN1) (link-local) State: NONE (TN2) (link-local)2. Send Echo RequestIPv6 header source = TN2 (link-local) destination = NUT (link-local) Echo Request sequence number = 0State: INCOMPLETE (TN1) (link-local) State: INCOMPLETE (TN2) (link-local)3. Send Echo RequestIPv6 header source = TN1 (link-local) destination = NUT (link-local) Echo Request sequence number = 14. Send Echo RequestIPv6 header source = TN2 (link-local) destination = NUT (link-local) Echo Request sequence number = 15. Send Echo RequestIPv6 header source = TN1 (link-local) destination = NUT (link-local) Echo Request sequence number = 26. Send Echo RequestIPv6 header source = TN2 (link-local) destination = NUT (link-local) Echo Request sequence number = 27. Send Echo RequestIPv6 header source = TN2 (link-local) destination = NUT (link-local) Echo Request sequence number = 38. Observe NS [Judgment #1]IPv6 header hop limit = 255 source = NUT (link-local) destination = TN1 (solicited-node multicast address) NS target = TN1 (link-local) SLL option9. Observe NS [Judgment #2]IPv6 header hop limit = 255 source = NUT (link-local) destination = TN2 (solicited-node multicast address) NS target = TN2 (link-local) SLL option10. Send NAIPv6 header hop limit = 255 source = TN1 (link-local) destination = NUT (link-local) NA R = 0 S = 1 O = 1 target = TN1 (link-local) TLL optionState: REACHABLE (TN1) (link-local) State: INCOMPLETE (TN2) (link-local)11. Send NAIPv6 header hop limit = 255 source = TN2 (link-local) destination = NUT (link-local) NA R = 0 S = 1 O = 1 target = TN2 (link-local) TLL optionState: REACHABLE (TN1) (link-local) State: REACHABLE (TN2) (link-local)12. Observe Echo Reply [Judgment #3]IPv6 header source = NUT (link-local) destination = TN1 (link-local) Echo Reply sequence number = 213. Observe Echo Reply [Judgment #4]IPv6 header source = NUT (link-local) destination = TN2 (link-local) Echo Reply sequence number = 3State: REACHABLE (TN1) (link-local) State: REACHABLE (TN2) (link-local)
=end html =head1 CLEANUP =begin html[Judgment #1] NUT must transmit NSs to TN1 [Judgment #2] NUT must transmit NSs to TN2 [Judgment #3] NUT must transmit Echo Reply to TN1 [Judgment #4] NUT must transmit Echo Reply to TN2
- Set neighbor cache state for TN1 to NONE=end html =cut # =head1 REFERENCE # # =begin html #
TN1 TN2 NUT | | | | ------------> | NS (unicast) (different cached address) | | ----> | NS (unicast) (different cached address) | <------------ | NA | | <---- | NA | | | * | | Wait (DELAY_FIRST_PROBE_TIME) | | | | <------------ | NS (unicast) | | <---- | NS (unicast) | <------------ | NS (unicast) | | <---- | NS (unicast) | <------------ | NS (unicast) | | <---- | NS (unicast) | | | V V V
State: REACHABLE (TN1) (link-local) State: REACHABLE (TN2) (link-local)1. Send NSIPv6 header hop limit = 255 source = TN1 (link-local) destination = NUT (link-local) NS target = NUT (link-local) SLL option address = TN2 (ether)State: STALE (TN1) (link-local) State: REACHABLE (TN2) (link-local)2. Send NSIPv6 header hop limit = 255 source = TN2 (link-local) destination = NUT (link-local) NS target = NUT (link-local) SLL option address = H1 (ether)State: STALE (TN1) (link-local) State: STALE (TN2) (link-local)3. Observe NAIPv6 header source = NUT (link-local) destination = TN1 (link-local) NA R = 0 (If NUT is Host) = 1 (If NUT is Router) S = 1 O = 1 target = NUT (link-local) TLL optionState: DELAY (TN1) (link-local) State: STALE (TN2) (link-local)4. Observe NAIPv6 header source = NUT (link-local) destination = TN2 (link-local) NA R = 0 (If NUT is Host) = 1 (If NUT is Router) S = 1 O = 1 target = NUT (link-local) TLL optionState: DELAY (TN1) (link-local) State: DELAY (TN2) (link-local)5. Wait (DELAY_FIRST_PROBE_TIME)Node constants: DELAY_FIRST_PROBE_TIME: 5 secondsState: PROBE (TN1) (link-local) State: PROBE (TN2) (link-local)6. Observe MAX_UNICAST_SOLICIT NSsIPv6 header hop limit = 255 source = NUT (link-local) destination = TN1 (link-local) NS target = TN1 (link-local) SLL optionNode constants: MAX_UNICAST_SOLICIT: 3 transmissionsState: NONE (TN1) (link-local) State: PROBE (TN2) (link-local)7. Observe MAX_UNICAST_SOLICIT NSsIPv6 header hop limit = 255 source = NUT (link-local) destination = TN2 (link-local) NS target = TN2 (link-local) SLL optionNode constants: MAX_UNICAST_SOLICIT: 3 transmissionsState: NONE (TN1) (link-local) State: NONE (TN2) (link-local)
# RFC2461 Neighbor Discovery for IPv6 ## # =end html # =pod =head1 REFERENCE =begin html
## 7.2.2. Sending Neighbor Solicitations ### 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 =cutRFC 2461 - Neighbor Discovery for IPv6