# NAME

            rfc2765_4.2_icmpv6query.seq - Verify IPv6 <-> IPv4 header
            translation in accordance with RFC2765 [SIIT]

# TARGET

            Router

# SYNOPSIS

            rfc2765_4.2_icmpv6query.seq [-tooloption ...]
            -p rfc2765_4.2_icmpv6query.def

# INITIALIZATION

    	Before this test starts, run initialize.seq.

# TEST PROCEDURE

            This test verifies that NUT can translates ICMPv6 query messages
            in accordance to RFC2765.

            Network Topology

            Link0
            --------------------------
                |               |
               TN              NUT
                |               |
            --------------------------
            Link1

            TN -- (Link0) -- NUT        NUT -- (Link1) -- TN

            ---------------------      ------------------------

            1.1.[1-2]
            ===================>
            ICMPv6 packet
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    ICMPv6 Echo Request/Reply (Type 128 and Type 129)

            1.2.[1-2]
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 packet
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                            DF = 1
                    ICMPv4 Echo Request/Reply (Type 8 and Type 0)

            2.1.[1-3]
            ===================>
            ICMPv6 packet
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    MLD Multicast Listener Query/Report/Done (Type 130, 131, 132)

            2.2.[1-3]
            <<JUDGMENT>>
                    Packet is silently dropped

            3.1.[1-5]
            ===================>
            ICMPv6 packet
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Neighbor Discover messages (Type 133 through 137)

            3.2.[1-5]
            <<JUDGMENT>>
                    Packet is silently dropped

            4.1
            ===================>
            ICMPv6 packet
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                    Unknown informational messages (Type 255)

            4.2
            <<JUDGMENT>>
                    Packet is silently dropped

# JUDGMENT

            << PASS >>
                    NUT translates ICMPv6 echo request/reply to ICMPv4 echo
                    request/reply and silently drops other ICMPv6 query types.

            << FAIL >>
                    NUT fails to translate ICMPv6 echo request/reply, or doesn't
                    drop other ICMPv6 query types.

# NOTE

# REFERENCE

RFC2765

4.2. Translating ICMPv6 Headers into ICMPv4 Headers

       All ICMP messages that are to be translated require that the ICMP
       checksum field be updated as part of the translation since ICMPv6,
       unlike ICMPv4, has a pseudo-header checksum just like UDP and TCP.

       In addition all ICMP packets need to have the Type value translated
       and for ICMP error messages the included IP header also needs
       translation.

       The actions needed to translate various ICMPv6 messages are:

          ICMPv6 informational messages:

            Echo Request and Echo Reply (Type 128 and 129)
               Adjust the type to 0 and 8, respectively, and adjust the ICMP
               checksum both to take the type change into account and to
               exclude the ICMPv6 pseudo-header.

            MLD Multicast Listener Query/Report/Done (Type 130, 131, 132)
               Single hop message.  Silently drop.

            Neighbor Discover messages (Type 133 through 137)
               Single hop message.  Silently drop.

            Unknown informational messages
               Silently drop.

# SEE ALSO

            perldoc V6evalTool