#!/usr/bin/perl # # Copyright (C) 1999, 2000, 2001, 2002, 2003 Yokogawa Electric Corporation, # IPA (Information-technology Promotion Agency, Japan). # 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. However, using this software for the # purpose of testing or evaluating any products including merchantable # products may be permitted without any notification to the copyrighters. # # # # 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/ncStateByNa4Incomplete.seq,v 1.33 2002/02/27 01:08:26 masaxmasa Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: REL_2_1_1 $ '; } use V6evalTool; use nd; ndOptions(@ARGV); # The following generate debugging messages. $nd::debug=$ndOpt_v|$ndOpt_vv; # You can specifies debug options to a remote control program. # If you want to know more detail, please see the following: # - V6evalTool.pm: perldoc V6evalTool # - V6evalRemote.pm: perldoc V6evalRemote $nd::remote_debug="-o1" if $ndOpt_vv; $IF=Link0; $exit_rtn=$V6evalTool::exitPass; # # sub test definition: # - sending pattern, # - SLLA vs cached LLA # - expected state # - message # $idx_ptn=0; $idx_lla=1; $idx_exp=2; $idx_explla=3; $idx_msg=4; $idx_inc_ip=5; $idx_prb_ip=6; $idx_rpy_ip=7; $idx_ign_ip=8; $idx_non_n=9; $idx_rpy_n=10; $idx_ign_n=11; $idx_stl_sr=12; $idx_ign_sr=13; @null=(); # @reply_unicast_na_tn2nut_rso=(nd_echo_reply); @def_unicast_na_tn2nut_rso= ( unicast_na_tn2nut_rso, same, INCOMPLETE, unchanged, 'unicast rso NA w/o TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rso, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rsO=(nd_echo_reply); @def_unicast_na_tn2nut_rsO= ( unicast_na_tn2nut_rsO, same, INCOMPLETE, unchanged, 'unicast rsO NA w/o TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rsO, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rSo=(nd_echo_reply); @def_unicast_na_tn2nut_rSo= ( unicast_na_tn2nut_rSo, same, INCOMPLETE, unchanged, 'unicast rSo NA w/o TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rSo, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rSO=(nd_echo_reply); @def_unicast_na_tn2nut_rSO= ( unicast_na_tn2nut_rSO, same, INCOMPLETE, unchanged, 'unicast rSO NA w/o TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rSO, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rso_tll=(nd_echo_reply); @def_unicast_na_tn2nut_rso_tll= ( unicast_na_tn2nut_rso_tll, same, STALE, unchanged, 'unicast rso NA w/ TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rso_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rsO_tll=(nd_echo_reply); @def_unicast_na_tn2nut_rsO_tll= ( unicast_na_tn2nut_rsO_tll, same, STALE, unchanged, 'unicast rsO NA w/ TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rsO_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rSo_tll=(nd_echo_reply); @def_unicast_na_tn2nut_rSo_tll= ( unicast_na_tn2nut_rSo_tll, same, REACHABLE, unchanged, 'unicast rSo NA w/ TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rSo_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_unicast_na_tn2nut_rSO_tll=(nd_echo_reply); @def_unicast_na_tn2nut_rSO_tll= ( unicast_na_tn2nut_rSO_tll, same, REACHABLE, unchanged, 'unicast rSO NA w/ TLL', \@null, \@null, \@reply_unicast_na_tn2nut_rSO_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_ef_multicast_na_tn2allnode_rso=(nd_echo_reply); @def_multicast_na_tn2allnode_rso= ( multicast_na_tn2allnode_rso, same, INCOMPLETE, unchanged, 'multicast rso NA w/o TLL (INVALID)', \@null, \@null, \@reply_ef_multicast_na_tn2allnode_rso, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rsO=(nd_echo_reply); @def_multicast_na_tn2allnode_rsO= ( multicast_na_tn2allnode_rsO, same, INCOMPLETE, unchanged, 'multicast rsO NA w/o TLL (INVALID)', \@null, \@null, \@reply_multicast_na_tn2allnode_rsO, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rSo=(nd_echo_reply); @def_multicast_na_tn2allnode_rSo= ( multicast_na_tn2allnode_rSo, same, INCOMPLETE, unchanged, 'multicast rSo NA w/o TLL (INVALID)', \@null, \@null, \@reply_multicast_na_tn2allnode_rSo, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rSO=(nd_echo_reply); @def_multicast_na_tn2allnode_rSO= ( multicast_na_tn2allnode_rSO, same, INCOMPLETE, unchanged, 'multicast rSO NA w/o TLL (INVALID)', \@null, \@null, \@reply_multicast_na_tn2allnode_rSO, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rso_tll=(nd_echo_reply); @def_multicast_na_tn2allnode_rso_tll= ( multicast_na_tn2allnode_rso_tll, same, STALE, unchanged, 'multicast rso NA w/ TLL', \@null, \@null, \@reply_multicast_na_tn2allnode_rso_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rsO_tll=(nd_echo_reply); @def_multicast_na_tn2allnode_rsO_tll= ( multicast_na_tn2allnode_rsO_tll, same, STALE, unchanged, 'multicast rsO NA w/ TLL', \@null, \@null, \@reply_multicast_na_tn2allnode_rsO_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rSo_tll=(nd_echo_reply); @def_multicast_na_tn2allnode_rSo_tll= ( multicast_na_tn2allnode_rSo_tll, same, INCOMPLETE, unchanged, 'multicast rSo NA w/ TLL (INVALID)', \@null, \@null, \@reply_multicast_na_tn2allnode_rSo_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @reply_multicast_na_tn2allnode_rSO_tll=(nd_echo_reply); @def_multicast_na_tn2allnode_rSO_tll= ( multicast_na_tn2allnode_rSO_tll, same, INCOMPLETE, unchanged, 'multicast rSO NA w/ TLL (INVALID)', \@null, \@null, \@reply_multicast_na_tn2allnode_rSO_tll, \@null, \@null, \@null, \@null, \@null, \@null ); # @defs= ( \@def_unicast_na_tn2nut_rso, \@def_unicast_na_tn2nut_rsO, \@def_unicast_na_tn2nut_rSo, \@def_unicast_na_tn2nut_rSO, \@def_unicast_na_tn2nut_rso_tll, \@def_unicast_na_tn2nut_rsO_tll, \@def_unicast_na_tn2nut_rSo_tll, \@def_unicast_na_tn2nut_rSO_tll, \@def_multicast_na_tn2allnode_rso, \@def_multicast_na_tn2allnode_rsO, \@def_multicast_na_tn2allnode_rSo, \@def_multicast_na_tn2allnode_rSO, \@def_multicast_na_tn2allnode_rso_tll, \@def_multicast_na_tn2allnode_rsO_tll, \@def_multicast_na_tn2allnode_rSo_tll, \@def_multicast_na_tn2allnode_rSO_tll, ); # # # vCapture($IF); # # # $idx=0; foreach(@defs) { $exp=@$_[$idx_exp]; $explla=@$_[$idx_explla]; $msg=@$_[$idx_msg]; vLogHTML("
TN NUT ----------------------=end html =head1 JUDGMENT =begin html
State: INCOMPLETE (for TN)
==== NA ===> src=TN's link-local dst=NUT's link-local or all-node w/o or w/ TLLA r=0, s=0/1, o=0/1
Judgment: Examining NUT's neighbor cache state
=end html =head1 TERMINATION N/A =head1 NOTE The test does not invoke any remote command. =head1 SEE ALSO perldoc V6evalTool perldoc V6evalRemote =cut
7.2.5. Receipt of Neighbor Advertisements
If the target's Neighbor Cache entry is in the INCOMPLETE state when the advertisement is received, one of two things happens. IF(no TLLA option) { If the link layer has addresses and no Target Link-Layer address option is included, the receiving node SHOULD silently discard the received advertisement. } ELSE { Otherwise, the receiving node performs the following steps: - It records the link-layer address in the Neighbor Cache entry.
- IF(Solicited flag == 1) { If the advertisement's Solicited flag is set, the state of the entry is set to REACHABLE, } ELSE { otherwise it is set to STALE. }
- It sets the IsRouter flag in the cache entry based on the Router flag in the received advertisement.
- It sends any packets queued for the neighbor awaiting address resolution. }
Note that the Override flag is ignored if the entry is in the INCOMPLETE state.
===============================+===============+============= NA |New State |cached LLA --------------+-+--+-+---------+ | Destination |r| s|o|TLLA | | ==============+=+==+=+=========+===============+============= Unicast 0 0 0 none INCOMPLETE unchanged --------------+-+--+-+---------+---------------+------------- Unicast 0 0 1 none INCOMPLETE unchanged --------------+-+--+-+---------+---------------+------------- Unicast 0 1 0 none INCOMPLETE unchanged --------------+-+--+-+---------+---------------+------------- Unicast 0 1 1 none INCOMPLETE unchanged ==============+=+==+=+=========+===============+============= Unicast 0 0 0 exist STALE *updated --------------+-+--+-+---------+---------------+------------- Unicast 0 0 1 exist STALE *updated --------------+-+--+-+---------+---------------+------------- Unicast 0 1 0 exist REACHABLE *updated --------------+-+--+-+---------+---------------+------------- Unicast 0 1 1 exist REACHABLE *updated ==============+=+==+=+=========+===============+============= *Multicast 0 0 0 *none INCOMPLETE unchanged *invalid --------------+-+--+-+---------+---------------+------------- *Multicast 0 0 1 *none INCOMPLETE unchanged *invalid --------------+-+--+-+---------+---------------+------------- *Multicast 0 *1 0 *none INCOMPLETE unchanged *invalid --------------+-+--+-+---------+---------------+------------- *Multicast 0 *1 1 *none INCOMPLETE unchanged *invalid ==============+=+==+=+=========+===============+============= Multicast 0 0 0 exist STALE *updated --------------+-+--+-+---------+---------------+------------- Multicast 0 0 1 exist STALE *updated --------------+-+--+-+---------+---------------+------------- *Multicast 0 *1 0 exist INCOMPLETE unchanged *invalid --------------+-+--+-+---------+---------------+------------- *Multicast 0 *1 1 exist INCOMPLETE unchanged *invalid ==============+=+==+=+=========+===============+=============