#!/usr/bin/perl
#
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# 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_19_R.seq,v 1.4 2009/01/05 06:39:38 akisada Exp $
#
########################################################################
use nd;
BEGIN {}
END {}
my $ereq = 'ndisc_ereq_LL';
startNdiscWorld($Link0);
vLogHTML('Procedure
');
$NEED_COMMON_CLEANUP = 1;
$tn1_cache = 1;
if(ndiscNone2Stale($Link0, $ereq) < 0) {
exitFail();
#NOTREACHED
}
if(ndSendNaReachable2Stale($Link0, $ereq, 'nd_mcast_na_rsO') < 0) {
exitFail();
#NOTREACHED
}
$NEED_COMMON_CLEANUP = 0;
$tn1_cache = 0;
exitPass();
#NOTREACHED
#
# perldoc
#
########################################################################
__END__
=head1 Title
Test v6LC.2.1.19: Neighbor Advertisement Processing, NCE State STALE
Part R
=head1 Purpose
Verify that a node properly updates its Neighbor Cache from the STALE state upon receipt of
a Neighbor Advertisement.
=head1 References
* [ND] Section 7.3.3 and 7.2.5
=begin html
| Destination |
Solicited flag |
Override flag |
TLLA |
New State |
Update Link-Layer Address |
Part |
| Multicast |
clear |
set |
none |
STALE |
no |
R |
=end html
=head1 Resource Requirements
* Packet generator
* Monitor to capture packets
=head1 Test Setup
No Common Test Setup is performed. Wait at least 3 seconds
(MAX_MULTICAST_SOLICIT * RETRANS_TIMER) after any previous cleanup to make sure all
previous NCE's are in state No NCE. The Common Test Cleanup procedure is performed after each part.
=begin html
Echo Request A
IPv6 Header
Next Header: 58
Source Address: TN1's Link-local Address
Destination Address: NUT's Link-local Address
|
|
ICMPv6 Echo Request
|
Neighbor Adv. (A-P)
IPv6 Header
Next Header: 58
Source Address: TN1's Link-local Address
Destination Address: see table
|
Neighbor Adv.
Solicited flag: see table
Override flag: see table
|
Target LLA Option: see table
|
=end html
=head1 Procedure
1. TN1 transmits Echo Request A.
2. Observe the packets transmitted by the NUT and the NCE of TN1.
3. TN1 transmits a solicited Neighbor Advertisement to the NUT.
4. Observe the packets transmitted by the NUT and the NCE of TN1.
5. Wait (REACHABLE_TIME * MAX_RANDOM_FACTOR) seconds.
6. Check the NCE of TN1 on the NUT.
7. TN1 transmits Neighbor Advertisement A. The Solicited and Override flags are set according to
Part A entry of the table in the discussion above. Similarly, the address in the Target Link Layer
Address Option is provided as it is indicated.
8. TN1 transmits an Echo Request.
9. Check the NCE of TN1 on the NUT and observe the packets transmitted by the NUT.
10. Perform the common cleanup procedure.
11. Repeat Steps 1 through 10 for Parts B through R.
=head1 Observable Results
Parts A through R
Step 2:
The NUT should create a Neighbor Cache Entry for TN1 and set the state of the
Entry to INCOMPLETE. The NUT should send a multicast Neighbor Solicitation to TN1.
Step 4:
Because the NUT is now in state REACHABLE, after receiving the Echo Request
from TN1, the NUT should send an Echo Reply. After DELAY_FIRST_PROBE_TIME, the
NUT should not send a unicast Neighbor Solicitation to TN1.
Step 6:
The NUT should change the state of TN1's NCE to STALE. (See Note in Section 2
title page.)
Step 9:
The NUT MUST update the state of TN1's NCE and the LLA according to the table
in the discussion above. After receiving the Echo Request from TN1 in step 8, the NUT
should react according to the following:
=begin html
Parts C,D,G,H and L to REACHABLE
After receiving the Echo Request from TN1, the NUT should send an Echo
Reply. After DELAY_FIRST_PROBE_TIME, the NUT should not send a
unicast Neighbor Solicitation to TN1.
Part L
The NUT's Echo Reply should be sent to the new updated link-layer
destination address of TN1.
|
Parts A,B,E,F,I-K, and M-R to STALE
After receiving the Echo Request from TN1, the NUT should send an Echo
Reply. After DELAY_FIRST_PROBE_TIME, the NUT should send a unicast
Neighbor Solicitation to TN1.
Parts J and P
The NUT's Echo Reply should be sent to the new updated link-layer
destination address of TN1. The Neighbor Solicitation should use the new link-
layer address in the Target field.
|
=end html
=head1 Possible Problems
* This test will be inaccurate if the NUT Failed Test v6LC.2.1.6 testing
(REACHABLE_TIME*MAX_RANDOM_FACTOR).
=cut