#!/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_1_B.seq,v 1.5 2005/06/14 05:54:40 akisada Exp $ # ######################################################################## use nd; BEGIN {} END {} startNdiscWorld($Link0); if(setupCase0($Link0) < 0) { exitFatal(); #NOTREACHED } vLogHTML('TEST PROCEDURE'. '
'); $SeekTime = 0; my @frames = ('ndisc_mcast_ns_sll_LG', 'ndisc_erep_LG'); vSend($Link0, 'ndisc_ereq_GL'); my %ret = vRecvWrapper($Link0, $TimeOut, $SeekTime, 0, @frames); if ($ret{'recvCount'}) { if ($ret{'recvFrame'} eq 'ndisc_mcast_ns_sll_LL') { vLogHTML('Could observe NS
'); exitFail(); } elsif ($ret{'recvFrame'} eq 'ndisc_erep_LG') { vLogHTML('Could observe Echo Reply
'); exitFial(); } } exitPass(); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_1_1_B - On-Link Determination (Global Address, No Default Router) =end html =begin html
=end html =head1 TARGET =begin html
Host
=end html =head1 TOPOLOGY =begin html
    TN     NUT
    |       |
----+-------+--- Link0

Link0 link-local fe80::/64
TN global 3ffe:501:ffff:100::<TnDef.Link0_addr>
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 TEST PROCEDURE =begin html
- Verify that NUT assumes the destination is on-link
    TN     NUT
    |       |
    | ----> | Echo Request
    |       |
    *       | Observe Packets [Judgment #1]
    |       |
    V       V

    State: NONE (TN) (global)
1. Send Echo Request
        IPv6 header
            source      = TN  (global)
            destination = NUT (link-local)
        Echo Request
=end html =head1 JUDGEMENT =begin html
[Judgment #1] NUT must not transmit an Echo Reply using TR1 as its first hop. And NUT must not transmit a NS to resolve TR1's MAC address.
=end html =head1 CLEANUP =begin html
none
=end html =cut # =head1 REFERENCE # # =begin html #
# RFC2461 Neighbor Discovery for IPv6 #
#
# 5.2.  Conceptual Sending Algorithm
# 
#
#    Next-hop determination for a given unicast destination operates as
#    follows.  The sender performs a longest prefix match against the
#    Prefix List to determine whether the packet's destination is on- or
#    off-link.  If the destination is on-link, the next-hop address is the
#    same as the packet's destination address.  Otherwise, the sender
#    selects a router from the Default Router List (following the rules
#    described in Section 6.3.6).  If the Default Router List is empty,
#    the sender assumes that the destination is on-link.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut