#!/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_1_9_B.seq,v 1.6 2008/02/07 10:45:44 akisada Exp $ # ######################################################################## use nd; BEGIN {} END {} my $ns = 'nd_mcast_ns_sll'; startNdiscWorld($Link0); vLogHTML('Procedure'. '
'); my @na = ndSetNa4mcastNs(); if(ndRecvNsNone2ProbeWithEchoRequest($Link0, $ns, \@na) < 0) { $NEED_COMMON_CLEANUP = 1; $tn1_cache = 1; exitFail(); #NOTREACHED } exitPass(); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_1_9_B - NS processing, No NCE (Multicast Neighbor Solicitation) =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 STALE
- Verify that NUT transmits valid NA in STALE state
- Verify that NUT transmits valid NSs in PROBE state
   TN1     NUT
    |       |
    | -->   | NS (multicast)
    | ----> | Echo Request
    | <---- | NA           [Judgment #1]
    | <---- | Echo Reply
    |       |
    *       | Wait (DELAY_FIRST_PROBE_TIME)
    |       |
    | <---- | NS (unicast) [Judgment #2]
    | <---- | NS (unicast)
    | <---- | NS (unicast)
    |       |
    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
2. Send Echo Request
        IPv6 header
            source      = TR1 (link-local)
            destination = HUT (link-local)
        Echo Request
    State: STALE (TN1) (link-local)
3. Observe NA [Judgment #1]
        IPv6 header
            source      = NUT (link-local)
            destination = TN1 (link-local)
        NA
            R           = 0   (If NUT is Host)
                        = 1   (If NUT is Router)
            S           = 1
            O           = 1
            target      = NUT (link-local)
        TLL option
4. Observe Echo Reply
        IPv6 header
            source      = HUT (link-local)
            destination = TR1 (link-local)
        Echo Reply
    State: DELAY (TN1) (link-local)
5. Wait (DELAY_FIRST_PROBE_TIME)
        Node constants:
            DELAY_FIRST_PROBE_TIME: 5 seconds
    State: PROBE (TN1) (link-local)
6. Observe MAX_UNICAST_SOLICIT NSs [Judgment #2]
        IPv6 header
            hop limit   = 255
            source      = NUT (link-local)
            destination = TN1 (link-local)
        NS
            target      = TN1 (link-local)
        SLL option
        Node constants:
            MAX_UNICAST_SOLICIT: 3 transmissions
    State: NONE (TN1) (link-local)
=end html =head1 JUDGEMENT =begin html
[Judgment #1] NUT must transmit NA to TN1
[Judgment #2] NUT must transmit NS to TN1


Index NS Previous New
Source Addr Destination Addr SLL option State Cached LLA State Cached LLA
V6LC_2_1_9_A unicast unicast exist NONE none STALE updated
V6LC_2_1_9_B unicast multicast exist NONE none STALE updated

=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