#!/usr/bin/perl # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # 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_1_8_C-v3_8_2.seq,v 1.1 2006/04/26 06:33:49 akisada Exp $ # ######################################################################## use nd; BEGIN {} END {} my $ns = 'nd_ucast_ns'; startNdiscWorld($Link0); if(setupCase0($Link0) < 0) { exitFatal(); #NOTREACHED } if(ndRecvNsNone2IncompleteWithEchoRequest($Link0, $ns) < 0) { exitFail(); #NOTREACHED } exitPass(); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
v6LC_2_1_8_C-v3_8_2 - Neighbor Solicitation Processing, No NCE (Unicast Neighbor Solicitation without SLL) =end html =begin html
=end html =head1 TARGET =begin html
Host/Router
=end html =head1 TOPOLOGY =begin html
   TN1     NUT
    |       |
----+-------+--- Link0

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

=end html =head1 SETUP =begin html
none
=end html =head1 INITIALIZATION =begin html
none
=end html =head1 TEST PROCEDURE =begin html
- Verify that NUT updates entry's reachablity state to INCOMPLETE
- Verify that NUT transmits valid NS in INCOMPLETE state
   TN1     NUT
    |       |
    | ----> | NS (unicast)
    | ----> | Echo Request
    |   <-- | NS (multicast) [Judgment #1]
    |   <-- | NS (multicast)
    |   <-- | NS (multicast)
    |       |
    V       V

    State: NONE (TN1) (link-local)
1. Send NS
        IPv6 header
            hop limit   = 255
            source      = TN1 (link-local)
            destination = NUT (solicited-node multicast address)
        NS
            target      = NUT (link-local)
        SLL option
    State: INCOMPLETE (TN1) (link-local)
2. Send Echo Request
        IPv6 header
            source      = TR1 (link-local)
            destination = HUT (link-local)
        Echo Request
3. Observe MAX_MULTICAST_SOLICIT NSs [Judgment #1]
        IPv6 header
            hop limit   = 255
            source      = NUT (link-local)
            destination = TN1 (link-local)
        NS
            target      = TN1 (link-local)
        SLL option
        Node constants:
            MAX_MULTICAST_SOLICIT: 3 transmissions
    State: NONE (TN1) (link-local)
=end html =head1 JUDGEMENT =begin html
[Judgment #1] NUT must transmit NS to TN1
=end html =head1 CLEANUP =begin html
none
=end html =cut # =head1 REFERENCE # # =begin html #
# RFC2461 Neighbor Discovery for IPv6 #
#
# 7.2.3.  Receipt of Neighbor Solicitations
# 
#
#    If the Target Address is tentative, the Neighbor Solicitation should
#    be processed as described in [ADDRCONF].  Otherwise, the following
#    description applies.  If the Source Address is not the unspecified
#    address and, on link layers that have addresses, the solicitation
#    includes a Source Link-Layer Address option, then the recipient
#    SHOULD create or update the Neighbor Cache entry for the IP Source
#    Address of the solicitation.  If an entry does not already exist, the
#    node SHOULD create a new one and set its reachability state to STALE
#    as specified in Section 7.3.3.  If an entry already exists, and the
#    cached link-layer address differs from the one in the received Source
#    Link-Layer option, the cached address should be replaced by the
#    received address and the entry's reachability state MUST be set to
#    STALE.
# 
#

# RFC2461 Neighbor Discovery for IPv6 #


#
# 7.2.4.  Sending Solicited Neighbor Advertisements
# 
#
#    A node sends a Neighbor Advertisement in response to a valid Neighbor
#    Solicitation targeting one of the node's assigned addresses.  The
#    Target Address of the advertisement is copied from the Target Address
#    of the solicitation.  If the solicitation's IP Destination Address is
#    not a multicast address, the Target Link-Layer Address option MAY be
#    omitted; the neighboring node's cached value must already be current
#    in order for the solicitation to have been received.  If the
#    solicitation's IP Destination Address is a multicast address, the
#    Target Link-Layer option MUST be included in the advertisement.
#    Furthermore, if the node is a router, it MUST set the Router flag to
#    one; otherwise it MUST set the flag to zero.
# 
#
#    If the Target Address is either an anycast address or a unicast
#    address for which the node is providing proxy service, or the Target
#    Link-Layer Address option is not included, the Override flag SHOULD
#    be set to zero.  Otherwise, the Override flag SHOULD be set to one.
#    Proper setting of the Override flag ensures that nodes give
#    preference to non-proxy advertisements, even when received after
#    proxy advertisements, and also ensures that the first advertisement
#    for an anycast address "wins".
# 
#
#    If the source of the solicitation is the unspecified address, the
#    node MUST set the Solicited flag to zero and multicast the
#    advertisement to the all-nodes address.  Otherwise, the node MUST set
#    the Solicited flag to one and unicast the advertisement to the Source
#    Address of the solicitation.
# 
#

# RFC2461 Neighbor Discovery for IPv6 #


#
# 4.4.  Neighbor Advertisement Message Format
# 
#
#    Possible options:
# 
#
#       Target link-layer address
#                      The link-layer address for the target, i.e., the
#                      sender of the advertisement.  This option MUST be
#                      included on link layers that have addresses when
#                      responding to multicast solicitations.  When
#                      responding to a unicast Neighbor Solicitation this
#                      option SHOULD be included.
# 
#
#                      The option MUST be included for multicast
#                      solicitations in order to avoid infinite Neighbor
#                      Solicitation "recursion" when the peer node does
#                      not have a cache entry to return a Neighbor
#                      Advertisements message.  When responding to unicast
#                      solicitations, the option can be omitted since the
#                      sender of the solicitation has the correct link-
#                      layer address; otherwise it would not have be able
#                      to send the unicast solicitation in the first
#                      place. However, including the link-layer address in
#                      this case adds little overhead and eliminates a
#                      potential race condition where the sender deletes
#                      the cached link-layer address prior to receiving a
#                      response to a previous solicitation.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut