#!/usr/bin/perl # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # 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_2_16_K-v3_8_2.seq,v 1.1 2006/04/27 06:01:18 akisada Exp $ # ######################################################################## use rdisc; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'host') { exitHostOnly($Link0); #NOTREACHED } vCapture($Link0); $pktdesc{'local_ra'} = ' Send RA w/o SLL: '. 'TR1 (link-local) -> all-nodes multicast address'; unless(v6LC_2_2_16_J($Link0)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
v6LC_2_2_16_K-v3_8_2 - Router Advertisement Processing, Neighbor Cache (RA without SLLA, NCE STALE) =end html =begin html=end html =head1 TARGET =begin html
Host=end html =head1 TOPOLOGY =begin html
=end html =head1 SETUP =begin html| TR1 HUT | | ----+-------+--- Link0
Link0 link-local fe80::/64 TR1 link-local fe80::200:ff:fe00:a0a0 ether 00:00:00:00:a0:a0 HUT link-local fe80::<NutDef.Link0_addr> ether <NutDef.Link0_addr>
=end html =head1 TEST PROCEDURE =begin htmlnone
Verify that a host properly updates its Neighbor Cache upon receipt of a Router Advertisement.=end html =head1 JUDGEMENT =begin htmlTR1 HUT | | | ----> | Echo Request | <-- | NS (multicast) [Judgment #1] | ----> | NA | <---- | Echo Reply [Judgment #2] | | * | Wait (REACHABLE_TIME * MAX_RANDOM_FACTOR) | | | --> | RA | | | ----> | Echo Request | <---- | Echo Reply [Judgment #3] | | * | Wait (DELAY_FIRST_PROBE_TIME) | | | <---- | NS [Judgment #4] | <---- | NS | <---- | NS | | V V
1. Send Echo RequestIPv6 header source = TR1 (link-local) destination = HUT (link-local) Echo Request2. Observe NSIPv6 header hop limit = 255 source = RUT (link-local) destination = TR1 (solicited-node multicast address) NS target = TR1 (link-local) SLL option3. Send NAIPv6 header hop limit = 255 source = TR1 (link-local) destination = HUT (link-local) NA R = 1 S = 1 O = 1 target = TR1 (link-local) TLL option4. Observe Echo ReplyIPv6 header source = HUT (link-local) destination = TR1 (link-local) Echo Reply5. Wait (REACHABLE_TIME * MAX_RANDOM_FACTOR)Node constants: REACHABLE_TIME : 30,000 milliseconds MAX_RANDOM_FACTOR: 1.56. Send RAIPv6 header hop limit = 255 source = TR1 (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 0 reachable time = 10000 retrans timer = 10007. Send Echo RequestIPv6 header source = TR1 (link-local) destination = HUT (link-local) Echo Request8. Observe Echo ReplyIPv6 header source = HUT (link-local) destination = TR1 (link-local) Echo Reply9. Wait (DELAY_FIRST_PROBE_TIME)Node constants: DELAY_FIRST_PROBE_TIME: 5 seconds10. Observe MAX_UNICAST_SOLICIT NSsIPv6 header hop limit = 255 source = HUT (link-local) destination = TR1 (link-local) NS target = TR1 (link-local) SLL optionNode constants: MAX_UNICAST_SOLICIT: 3 transmissions
[Judgment #1] The HUT should create a Neighbor Cache Entry for TR1 and set the state of the Entry to INCOMPLETE. The HUT should send a multicast Neighbor Solicitation to TR1.=end html =head1 CLEANUP =begin html
[Judgment #2] The HUT should update the state of TR1's NCE to REACHABLE and record TR1's Link-layer Address. Because the HUT is in state REACHABLE, after receiving the earlier Echo Request from TR1, the HUT should send an Echo Reply using the received Link-Layer Address.
[Judgment #3] The HUT must not change the state of TR1's NCE, send an Echo Reply to TR1 using the same Link-Layer address and enter state DELAY.
[Judgment #4] The HUT should update the state of TR1's NCE to PROBE by sending a unicast Neighbor Solicitation to TR1.
The Cleanup procedure should cause the NUT to transition Neighbor Cache entries created in this test to state INCOMPLETE and remove any entries from its Default Router and Prefix Lists.=end html =cut # =head1 REFERENCE # # =begin html #TR1 HUT | | | --> | RA | | V V
1. Send RAIPv6 header hop limit = 255 source = TR1 (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 0 reachable time = 30000 retrans timer = 1000 Prefix Information option prefix length = 64 L = 1 A = 1 valid Lifetime = 0 preferred lifetime = 0 prefix = 3ffe:501:ffff:100::
## # =end html # =pod =head1 REFERENCE =begin html# 6.3.4. Processing Received Router Advertisements ### After extracting information from the fixed part of the Router # Advertisement message, the advertisement is scanned for valid # options. If the advertisement contains a Source Link-Layer Address # option the link-layer address SHOULD be recorded in the Neighbor # Cache entry for the router (creating an entry if necessary) and the # IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no # Source Link-Layer Address is included, but a corresponding Neighbor # Cache entry exists, its IsRouter flag MUST be set to TRUE. The # IsRouter flag is used by Neighbor Unreachability Detection to # determine when a router changes to being a host (i.e., no longer # capable of forwarding packets). If a Neighbor Cache entry is created # for the router its reachability state MUST be set to STALE as # specified in Section 7.3.3. If a cache entry already exists and is # updated with a different link-layer address the reachability state # MUST also be set to STALE. ##
=end html =cutRFC 2461 - Neighbor Discovery for IPv6