#!/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_7_F.seq,v 1.1 2008/04/04 07:18:51 akisada Exp $ # ######################################################################## use rdisc; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'router') { exitRouterOnly($Link0); #NOTREACHED } $pktdesc{'ra_local'} = ' Recv RA w/o SLL w/o MTU: '. 'NUT (link-local) -> all-nodes multicast address'; $pktdesc{'ra_sll_local'} = ' Recv RA w/ SLL w/o MTU: '. 'NUT (link-local) -> all-nodes multicast address'; $pktdesc{'ra_mtu_local'} = ' Recv RA w/o SLL w/ MTU: '. 'NUT (link-local) -> all-nodes multicast address'; $pktdesc{'ra_sll_mtu_local'} = ' Recv RA w/ SLL w/ MTU: '. 'NUT (link-local) -> all-nodes multicast address'; vCapture($Link0); unless(v6LC_2_2_7_F($Link0)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
v6LC_2_2_7_C: Sending Unsolicited RA (Min Values) =end html =begin html
=end html =head1 TARGET =begin html
Router
=end html =head1 TOPOLOGY =begin html
    |
   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>

=end html =head1 SETUP =begin html
none
=end html =head1 TEST PROCEDURE =begin html
Verify that a router sends the first few advertisements (up to MAX_INITIAL_RTR_ADVERTISEMENTS) from an interface when it becomes an advertising interface at an maximum interval value of MAX_INITIAL_RTR_ADVERT_INTERVAL (16) seconds.
   TN1     RUT
    |       |
    |       * Configure Interface A on the RUT to be an advertising interface
    |       |
    |   <-- | RA (multicast) [Judgment #1]
    |       |
    V       V

1. Configure Interface A on the RUT to be an advertising interface with the following values:
MaxRtrAdvInterval4
MinRtrAdvInterval3
AdvCurHopLimit0
AdvManagedFlag&AdvOtherConfigFlagFalse
AdvDefaultLifetime0 (min value)
AdvReachableTime0 (min value)
AdvRetransTimer0 (min value)
AdvOnlinkFlag&Amp;dvAutonomousFlagFalse
AdvValidLifetime0
AdvPerferredLifetime0
AdvLinkMTU0
2. Observe the packets transmitted by the RUT on Interface A.
        RA message format #1
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 0
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            SLL option
            Prefix Information option
                prefix length      = 64
                L                  = 0
                A                  = 0
                valid Lifetime     = 0 
                preferred lifetime = 0
                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      = 0
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            Prefix Information option
                prefix length      = 64
                L                  = 0
                A                  = 0
                valid Lifetime     = 0
                preferred lifetime = 0
                prefix             = 3ffe:501:ffff:100::
=end html =head1 JUDGEMENT =begin html
[Judgment #1] The RUT should transmit the Router Advertisements with the same values as configured.
=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.
   TN1     RUT
    |       |
    |       * Ceasing to be an advertising interface
    |       |
    |   <-- | RA (multicast)
    |   <-- | RA (multicast)
    |   <-- | RA (multicast)
    |       |
    V       V

1. Ceasing to be an advertising interface
2. Observe RA
        RA message format #1
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 0
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            SLL option
            Prefix Information option
                prefix length      = 64
                L                  = 0
                A                  = 0
                valid Lifetime     = 0
                preferred lifetime = 0
                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      = 0
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            Prefix Information option
                prefix length      = 64
                L                  = 0
                A                  = 0
                valid Lifetime     = 0
                preferred lifetime = 0
                prefix             = 3ffe:501:ffff:100::
=end html =cut # =head1 REFERENCE # # =begin html #
#
# 6.2.4.  Sending Unsolicited Router Advertisements
# 
#
#    A host MUST NOT send Router Advertisement messages at any time.
# 
#
#    Unsolicited Router Advertisements are not strictly periodic: the
#    interval between subsequent transmissions is randomized to reduce the
#    probability of synchronization with the advertisements from other
#    routers on the same link [SYNC].  Each advertising interface has its
#    own timer.  Whenever a multicast advertisement is sent from an
#    interface, the timer is reset to a uniformly-distributed random value
#    between the interface's configured MinRtrAdvInterval and
#    MaxRtrAdvInterval; expiration of the timer causes the next
#    advertisement to be sent and a new random value to be chosen.
# 
#
#    For the first few advertisements (up to
#    MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it
#    becomes an advertising interface, if the randomly chosen interval is
#    greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set
#    to MAX_INITIAL_RTR_ADVERT_INTERVAL instead.  Using a smaller interval
#    for the initial advertisements increases the likelihood of a router
#    being discovered quickly when it first becomes available, in the
#    presence of possible packet loss.
# 
#
#    The information contained in Router Advertisements may change through
#    actions of system management.  For instance, the lifetime of
#    advertised prefixes may change, new prefixes could be added, a router
#    could cease to be a router (i.e., switch from being a router to being
#    a host), etc.  In such cases, the router MAY transmit up to
#    MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the
#    same rules as when an interface becomes an advertising interface.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut