#!/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_1.seq,v 1.3 2005/04/11 08:54:40 akisada Exp $ # ######################################################################## use rdisc; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'host') { exitRouterOnly($Link0); #NOTREACHED } vCapture($Link0); unless(v6LC_2_2_1($Link0)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_2_1 - Router Solicitations =end html =begin html
=end html =head1 TARGET =begin html
Host
=end html =head1 TOPOLOGY =begin html
   HUT
    |
----+--- Link0

Link0 link-local fe80::/64
HUT link-local fe80::<NutDef.Link0_addr>
ether <NutDef.Link0_addr>

=end html =head1 SETUP =begin html
none
=end html =head1 TEST PROCEDURE =begin html
- Verify that a host sends valid Router Solicitations at the appropriate time.
           HUT
            |
            * Reboot
            |
        <-- | RS (multicast) [Judgment #1]
        <-- | RS (multicast)
        <-- | RS (multicast)
            |
            V

1. Reboot
2. Observe RS
        RS message format #1
            IPv6 header
                hop limit   = 255
                source      = unspecified address
                destination = all-routers multicast address
            RS
        RS message format #2
            IPv6 header
                hop limit   = 255
                source      = HUT (link-local)
                destination = all-routers multicast address
            RS
            SLL option
        RS message format #3
            IPv6 header
                hop limit   = 255
                source      = HUT (link-local)
                destination = all-routers multicast address
            RS
=end html =head1 JUDGEMENT =begin html
[Judgment #1] The HUT should transmit up to MAX_RTR_SOLICITATIONS (3) Router Solicitations RTR_SOLICITATION_INTERVAL (4) seconds apart.
The Router Solicitations should be sent from either the link-local address of the HUT or the unspecified address.
The destination address should be the All-Routers multicast address.
The Router Solicitations may or may not include a Source Link-layer Address option.
=end html =head1 CLEANUP =begin html
none
=end html =cut # =head1 REFERENCE # # =begin html #
#
# 6.3.7.  Sending Router Solicitations
# 
#
#    When an interface becomes enabled, a host may be unwilling to wait
#    for the next unsolicited Router Advertisement to locate default
#    routers or learn prefixes.  To obtain Router Advertisements quickly,
#    a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router
#    Solicitation messages each separated by at least
#    RTR_SOLICITATION_INTERVAL seconds.  Router Solicitations may be sent
#    after any of the following events:
# 
#
#       - The interface is initialized at system startup time.
# 
#
#       - The interface is reinitialized after a temporary interface
#         failure or after being temporarily disabled by system
#         management.
# 
#
#       - The system changes from being a router to being a host, by
#         having its IP forwarding capability turned off by system
#         management.
# 
#
#       - The host attaches to a link for the first time.
# 
#
#       - The host re-attaches to a link after being detached for some
#         time.
# 
#
#    A host sends Router Solicitations to the All-Routers multicast
#    address.  The IP source address is set to either one of the
#    interface's unicast addresses or the unspecified address.  The Source
#    Link-Layer Address option SHOULD be set to the host's link-layer
#    address, if the IP source address is not the unspecified address.
# 
#
#    Before a host sends an initial solicitation, it SHOULD delay the
#    transmission for a random amount of time between 0 and
#    MAX_RTR_SOLICITATION_DELAY.  This serves to alleviate congestion when
#    many hosts start up on a link at the same time, such as might happen
#    after recovery from a power failure.  If a host has already performed
#    a random delay since the interface became (re)enabled (e.g., as part
#    of Duplicate Address Detection [ADDRCONF]) there is no need to delay
#    again before sending the first Router Solicitation message.
# 
#
#    Once the host sends a Router Solicitation, and receives a valid
#    Router Advertisement with a non-zero Router Lifetime, the host MUST
#    desist from sending additional solicitations on that interface, until
#    the next time one of the above events occurs.  Moreover, a host
#    SHOULD send at least one solicitation in the case where an
#    advertisement is received prior to having sent a solicitation.
#    Unsolicited Router Advertisements may be incomplete (see Section
#    6.2.3); solicited advertisements are expected to contain complete
#    information.
# 
#
#    If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no
#    Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY
#    seconds after sending the last solicitation, the host concludes that
#    there are no routers on the link for the purpose of [ADDRCONF].
#    However, the host continues to receive and process Router
#    Advertisements messages in the event that routers appear on the link.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut