#!/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_4_F.seq,v 1.3 2005/04/11 08:54:41 akisada Exp $ # ######################################################################## use rdisc; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'router') { exitRouterOnly($Link0); #NOTREACHED } vCapture($Link0); $pktdesc{'rs_local'} = ' Send RS w/ SLL: '. 'unspecified address -> all-routers multicast address'; unless(v6LC_2_2_4($Link0)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_2_4_F - Router Ignores Invalid Router Solicitations (Unspecified IP source address and a source link-layer address option) =end html =begin html=end html =head1 TARGET =begin html
Router=end html =head1 TOPOLOGY =begin html
=end html =head1 SETUP =begin html| TN1 RUT | | ----+-------+--- Link0
Link0 global 3ffe:501:ffff:100::/64 link-local fe80::/64 RUT global 3ffe:501:ffff:100::<NutDef.Link0_addr> link-local fe80::<NutDef.Link0_addr> ether <NutDef.Link0_addr> TN1 global 3ffe:501:ffff:100::<TnDef.Link0_addr> link-local fe80::<TnDef.Link0_addr> ether <TnDef.Link0_addr>
=end html =head1 TEST PROCEDURE =begin htmlnone
- Verify that a router ignores invalid Router Solicitations.=end html =head1 JUDGEMENT =begin html
TN1 RUT | | | * Configure Interface A on the RUT to be an advertising interface. | | | <-- | RA (multicast) | <-- | RA (multicast) | <-- | RA (multicast) | | | --> | RS (multicast) | X-- | no response [Judgment #1] | | V V
1. Configure Interface A on the RUT to be an advertising interface.2. Observe RARA message format #1 IPv6 header hop limit = 255 source = RUT (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 1800 reachable time = 0 retrans timer = 0 SLL option Prefix Information option prefix length = 64 L = 1 A = 1 valid Lifetime = 2592000 preferred lifetime = 604800 prefix = 3ffe:501:ffff:100::RA message format #2 IPv6 header hop limit = 255 source = RUT (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 1800 reachable time = 0 retrans timer = 0 Prefix Information option prefix length = 64 L = 1 A = 1 valid Lifetime = 2592000 preferred lifetime = 604800 prefix = 3ffe:501:ffff:100::3. Send RSIPv6 header source = unspecified address destination = all-routers multicast address RS SLL option4. no response
[Judgment #1] The RUT must discard the Router Solicitation from TN1 and must not transmit a corresponding Router Advertisement within MAX_RA_DELAY_TIME (0.5) seconds.=end html =head1 CLEANUP =begin html
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 #TN1 RUT | | | * Ceasing to be an advertising interface | | | <-- | RA (multicast) | <-- | RA (multicast) | <-- | RA (multicast) | | V V
1. Ceasing to be an advertising interface2. Observe RARA message format #1 IPv6 header hop limit = 255 source = RUT (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 0 reachable time = 0 retrans timer = 0 SLL option Prefix Information option prefix length = 64 L = 1 A = 1 valid Lifetime = 2592000 preferred lifetime = 604800 prefix = 3ffe:501:ffff:100::RA message format #2 IPv6 header hop limit = 255 source = RUT (link-local) destination = all-nodes multicast address RA cur hop limit = 64 M = 0 O = 0 router lifetime = 0 reachable time = 0 retrans timer = 0 Prefix Information option prefix length = 64 L = 1 A = 1 valid Lifetime = 2592000 preferred lifetime = 604800 prefix = 3ffe:501:ffff:100::
## # =end html # =pod =head1 REFERENCE =begin html# 6.1.1. Validation of Router Solicitation Messages ### Hosts MUST silently discard any received Router Solicitation # Messages. ### A router MUST silently discard any received Router Solicitation # messages that do not satisfy all of the following validity checks: ### - The IP Hop Limit field has a value of 255, i.e., the packet # could not possibly have been forwarded by a router. ### - If the message includes an IP Authentication Header, the message # authenticates correctly. ### - ICMP Checksum is valid. ### - ICMP Code is 0. ### - ICMP length (derived from the IP length) is 8 or more octets. ### - All included options have a length that is greater than zero. ### - If the IP source address is the unspecified address, there is no # source link-layer address option in the message. ### The contents of the Reserved field, and of any unrecognized options, # MUST be ignored. Future, backward-compatible changes to the protocol # may specify the contents of the Reserved field or add new options; # backward-incompatible changes may use different Code values. ### The contents of any defined options that are not specified to be used # with Router Solicitation messages MUST be ignored and the packet # processed as normal. The only defined option that may appear is the # Source Link-Layer Address option. ### A solicitation that passes the validity checks is called a "valid # solicitation". ##
=end html =cutRFC 2461 - Neighbor Discovery for IPv6