#!/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_2_6_B.seq,v 1.4 2005/11/30 09:07:37 akisada Exp $ # ######################################################################## use rdisc; use lib '../'; use AdvancedFunctionality; BEGIN {} END {} if($V6evalTool::NutDef{'Type'} ne 'router') { exitRouterOnly($Link0); #NOTREACHED } unless($AdvancedFunctionality::HAS_MULTIPLE_INTERFACES) { exit($V6evalTool::exitSkip); } register($Link0, $Link1); $pktdesc{'rs_local'} = ' Send RS w/o SLL: '. 'unspecified address -> all-routers multicast address'; unless(v6LC_2_2_6_B($Link0, $Link1)) { exitFail($Link0); #NOTREACHED } exitPass($Link0); #NOTREACHED # # perldoc # ######################################################################## __END__ =head1 NAME =begin html
V6LC_2_2_6_B - Router Does Not Send Router Advertisements on Non-advertising (Advertising interface) =end html =begin html
=end html =head1 TARGET =begin html
Router
=end html =head1 TOPOLOGY =begin html
   TN2
    |
----+-------+--- Link1
            |
   TN1     RUT
    |       |
----+-------+--- Link0

Link0 global 3ffe:501:ffff:100::/64
link-local fe80::/64
RUT global 3ffe:501:ffff:100::<NutDef.Link0_addr>
link-local fe80::<NutDef.Link0_addr>
ether <NutDef.Link0_addr>
TN1 global 3ffe:501:ffff:100::<TnDef.Link0_addr>
link-local fe80::<TnDef.Link0_addr>
ether <TnDef.Link0_addr>
TN2 global 3ffe:501:ffff:100::<TnDef.Link1_addr>
link-local fe80::<TnDef.Link1_addr>
ether <TnDef.Link1_addr>

=end html =head1 SETUP =begin html
none
=end html =head1 TEST PROCEDURE =begin html
- Verify that a router does not send Router Advertisements on non-advertising interfaces.
   TN1     RUT     TN2
    |       |       |
    |       *       | Configure Interface B to be a non-advertising interface.
    |       |       |
    |       *       | Configure Interface A on the RUT to be an advertising interface.
    |       |       |
    |   <-- |       | RA (multicast)
    |   <-- |       | RA (multicast)
    |   <-- |       | RA (multicast)
    |       |       |
    | -->   |       | RS (multicast)
    |   <-- |       | RA (multicast) [Judgment #1]
    |       |       |
    |       |   <-- | RS (multicast)
    |       | --X   | no response    [Judgment #2]
    |       |       |
    V       V       V

1. Configure Interface B to be a non-advertising interface.
2. Configure Interface A on the RUT to be an advertising interface.
3. Observe RA
        RA message format #1
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 1800
                reachable time     = 0
                retrans timer      = 0
            SLL option
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
        RA message format #2
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 1800
                reachable time     = 0
                retrans timer      = 0
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
4. Send RS
        IPv6 header
            hop limit   = 255
            source      = unspecified address
            destination = all-routers multicast address
        RS
5. Observe RA
        RA message format #1
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 1800
                reachable time     = 0
                retrans timer      = 0
            SLL option
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
        RA message format #2
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 1800
                reachable time     = 0
                retrans timer      = 0
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
5. Send RS
        IPv6 header
            hop limit   = 255
            source      = unspecified address
            destination = all-routers multicast address
        RS
6. no response
=end html =head1 JUDGEMENT =begin html
[Judgment #1] The RUT must send Router Advertisements out on Interface A.
[Judgment #2] The RUT must not send Router Advertisements out on Interface B.
=end html =head1 CLEANUP =begin html
The Cleanup procedure should cause the NUT to transition Neighbor Cache entries created in this test to state INCOMPLETE and remove any entries from its Default Router and Prefix Lists.
   TN1     RUT
    |       |
    |       * Ceasing to be an advertising interface
    |       |
    |   <-- | RA (multicast)
    |   <-- | RA (multicast)
    |   <-- | RA (multicast)
    |       |
    V       V

1. Ceasing to be an advertising interface
2. Observe RA
        RA message format #1
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            SLL option
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
        RA message format #2
            IPv6 header
                hop limit          = 255
                source             = RUT (link-local)
                destination        = all-nodes multicast address
            RA
                cur hop limit      = 64
                M                  = 0
                O                  = 0
                router lifetime    = 0
                reachable time     = 0
                retrans timer      = 0
            Prefix Information option
                prefix length      = 64
                L                  = 1
                A                  = 1
                valid Lifetime     = 2592000
                preferred lifetime = 604800
                prefix             = 3ffe:501:ffff:100::
=end html =cut # =head1 REFERENCE # # =begin html #
#
# 6.2.2.  Becoming An Advertising Interface
# 
#
#    The term "advertising interface" refers to any functioning and
#    enabled multicast interface that has at least one unicast IP address
#    assigned to it and whose corresponding AdvSendAdvertisements flag is
#    TRUE.  A router MUST NOT send Router Advertisements out any interface
#    that is not an advertising interface.
# 
#
#    An interface may become an advertising interface at times other than
#    system startup.  For example:
# 
#
#       - changing the AdvSendAdvertisements flag on an enabled interface
#         from FALSE to TRUE, or
# 
#
#       - administratively enabling the interface, if it had been
#         administratively disabled, and its AdvSendAdvertisements flag is
#         TRUE, or
# 
#
#       - enabling IP forwarding capability (i.e., changing the system
#         from being a host to being a router), when the interface's
#         AdvSendAdvertisements flag is TRUE.
# 
#
#    A router MUST join the all-routers multicast address on an
#    advertising interface.  Routers respond to Router Solicitations sent
#    to the all-routers address and verify the consistency of Router
#    Advertisements sent by neighboring routers.
# 
#
# # =end html # =pod =head1 REFERENCE =begin html
RFC 2461 - Neighbor Discovery for IPv6
=end html =cut