#!/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_3_C.seq,v 1.4 2005/04/14 08:40:23 akisada Exp $ # ######################################################################## use rdisc; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'host') { exitRouterOnly($Link0); #NOTREACHED } vCapture($Link0); $pktdesc{'local_rs'} = ' Send RS w/ SLL: '. 'TN1 (link-local) -> NUT (link-local)'; unless(v6LC_2_2_3($Link0)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_2_3_C - Host Ignores Router Solicitations (Link-local Unicast Destination) =end html =begin html
=end html =head1 TARGET =begin html
Host
=end html =head1 TOPOLOGY =begin html
   TN1     HUT
    |       |
----+-------+--- Link0

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

=end html =head1 SETUP =begin html
none
=end html =head1 TEST PROCEDURE =begin html
- Verify that a host ignores Router Solicitations and does not update its Neighbor Cache.
   TN1     HUT
    |       |
    | ----> | RS
    |       |
    |       * Wait (RETRANS_TIMER * MAX_*CAST_SOLICIT)
    |       |
    | ----> | Echo Request
    |   <-- | NS (multicast) [Judgment #1]
    |   <-- | NS
    |   <-- | NS
    |       |
    V       V

1. Send RS
        IPv6 header
            hop limit   = 255
            source      = TN1 (link-local)
            destination = NUT (link-local)
        RS
        SLL option
2. Wait (RETRANS_TIMER * MAX_*CAST_SOLICIT)
        Node constants:
            MAX_MULTICAST_SOLICIT: 3 transmissions
            MAX_UNICAST_SOLICIT:   3 transmissions
            RETRANS_TIMER:         1,000 milliseconds
3. Send Echo Request
        IPv6 header
            source      = TN1 (link-local)
            destination = HUT (link-local)
        Echo Request
4. Observe MAX_MULTICAST_SOLICIT NSs
        IPv6 header
            hop limit   = 255
            source      = HUT (link-local)
            destination = TN1 (solicited-node multicast address)
        NS
            target      = TN1 (link-local)
        SLL option
        Node constants:
            MAX_MULTICAST_SOLICIT: 3 transmissions
=end html =head1 JUDGEMENT =begin html
[Judgment #1] the HUT should send a multicast Neighbor Solicitation for TN1 in Step 5, indicating the HUT did not process the Router Solicitation from TN1.
=end html =head1 CLEANUP =begin html
none
=end html =cut # =head1 REFERENCE # # =begin html #
#
# 6.2.6.  Processing Router Solicitations
# 
#
#    A host MUST silently discard any received Router Solicitation
#    messages.
# 
#
#    In addition to sending periodic, unsolicited advertisements, a router
#    sends advertisements in response to valid solicitations received on
#    an advertising interface.  A router MAY choose to unicast the
#    response directly to the soliciting host's address (if the
#    solicitation's source address is not the unspecified address), but
#    the usual case is to multicast the response to the all-nodes group.
#    In the latter case, the interface's interval timer is reset to a new
#    random value, as if an unsolicited advertisement had just been sent
#    (see Section 6.2.4).
# 
#
#    In all cases, Router Advertisements sent in response to a Router
#    Solicitation MUST be delayed by a random time between 0 and
#    MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in
#    response to multiple solicitations, the delay is relative to the
#    first solicitation.)  In addition, consecutive Router Advertisements
#    sent to the all-nodes multicast address MUST be rate limited to no
#    more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds.
# 
#
#    A router might process Router Solicitations as follows:
# 
#
#     - Upon receipt of a Router Solicitation, compute a random delay
#       within the range 0 through MAX_RA_DELAY_TIME.  If the computed
#       value corresponds to a time later than the time the next multicast
#       Router Advertisement is scheduled to be sent, ignore the random
#       delay and send the advertisement at the already-scheduled time.
# 
#
#     - If the router sent a multicast Router Advertisement (solicited or
#       unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds,
#       schedule the advertisement to be sent at a time corresponding to
#       MIN_DELAY_BETWEEN_RAS plus the random value after the previous
#       advertisement was sent.  This ensures that the multicast Router
#       Advertisements are rate limited.
# 
#
#     - Otherwise, schedule the sending of a Router Advertisement at the
#       time given by the random value.
# 
#
#    Note that a router is permitted to send multicast Router
#    Advertisements more frequently than indicated by the
#    MinRtrAdvInterval configuration variable so long as the more frequent
#    advertisements are responses to Router Solicitations.  In all cases,
#    however, unsolicited multicast advertisements MUST NOT be sent more
#    frequently than indicated by MinRtrAdvInterval.
# 
#
#    Router Solicitations in which the Source Address is the unspecified
#    address MUST NOT update the router's Neighbor Cache; solicitations
#    with a proper source address update the Neighbor Cache as follows. If
#    the router already has a Neighbor Cache entry for the solicitation's
#    sender, the solicitation contains a Source Link-Layer Address option,
#    and the received link-layer address differs from that already in the
#    cache, the link-layer address SHOULD be updated in the appropriate
#    Neighbor Cache entry, and its reachability state MUST also be set to
#    STALE.  If there is no existing Neighbor Cache entry for the
#    solicitation's sender, the router creates one, installs the link-
#    layer address and sets its reachability state to STALE as specified
#    in Section 7.3.3.  Whether or not a Source Link-Layer Address option
#    is provided, if a Neighbor Cache entry for the solicitation's sender
#    exists (or is created) the entry's IsRouter flag MUST be set to
#    FALSE.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut