NAME

        rfc2765_3.1_nextheader.seq - Verify IPv6 <-> IPv4 header 
        translation in accordance with RFC2765 [SIIT]


TARGET

        Router


SYNOPSIS

        rfc2765_3.1_nextheader.seq [-tooloption ...] 
        -p rfc2765_3.1_nextheader.def


INITIALIZATION

	Before this test starts, run initialize.seq.


TEST PROCEDURE

        This test verifies that NUT can translates IPv4 Protocol field 
        to IPv6 Next Header field.
        
        Network Topology

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

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

        1.1.
                                   <===================
        ICMPv4 Echo request
                IPv4 Header
                        src address : TN LINK1 IPv4 address
                        dst address : TN LINK0 IPv4 address
                        Don't Fragment = 1
                        More fragments = 0
                        Offset = 0
                        Protocol = 1
                ICMPv4 echo request

        1.2.
        <<JUDGMENT>>
        <===================
        ICMPv6 Echo Request
                IPv6 Header
                        src address : TN LINK1 IPv4 embedded IPv6 address
                        dst address : TN LINK0 IPv4 embedded IPv6 address
                        Next Header = 58
                ICMPv6 echo request

        2.1.
                                   <===================
        IPv4 UDP packet
                IPv4 Header
                        src address : TN LINK1 IPv4 address
                        dst address : TN LINK0 IPv4 address
                        Don't Fragment = 1
                        More fragments = 0
                        Offset = 0
                        Protocol = 17
                UDP packet
                        Checksum including IPv4 pseudo header
                        data = repeat(0xff,64)
        2.2.
        <<JUDGMENT>>
        <===================
        IPv6 UDP packet
                IPv6 Header
                        src address : TN LINK1 IPv4 embedded IPv6 address
                        dst address : TN LINK0 IPv4 embedded IPv6 address
                        Next Header = 17
                UDP packet
                        Checksum including IPv6 pseudo header
                        data = repeat(0xff,64)

        3.1.
                                   <===================
        IPv4 TCP packet
                IPv4 Header
                        src address : TN LINK1 IPv4 address
                        dst address : TN LINK0 IPv4 address
                        Don't Fragment = 1
                        More fragments = 0
                        Offset = 0
                        Protocol = 6
                TCP packet
                        Checksum including IPv4 pseudo header
                        data = repeat(0xff,64)

        3.2.
        <<JUDGMENT>>
        <===================
        IPv6 UDP packet
                IPv6 Header
                        src address : TN LINK1 IPv4 embedded IPv6 address
                        dst address : TN LINK0 IPv4 embedded IPv6 address
                        Next Header = 6
                TCP packet
                        Checksum including IPv6 pseudo header
                        data = repeat(0xff,64)

        4.1.
                                   <===================
        IPv4 unknown protocol(255) packet
                IPv4 Header
                        src address : TN LINK1 IPv4 address
                        dst address : TN LINK0 IPv4 address
                        Don't Fragment = 1
                        More fragments = 0
                        Offset = 0
                        Protocol = 255
                data = repeat(0xff,64)

        4.2.
        <<JUDGMENT>>
        <===================
        IPv6 unknown protocol(255) packet
                IPv6 Header
                        src address : TN LINK1 IPv4 embedded IPv6 address
                        dst address : TN LINK0 IPv4 embedded IPv6 address
                        Next Header = 255
                data = repeat(0xff,64)
         


JUDGMENT

        << PASS >>
                NUT translates ICMPv4 to ICMPv6, recalculates header
                checksum for UDP and TCP, and let other protocols
                pass through unchanged.
                
        << FAIL >>      
                TN (Link0) does not receive an ICMPv6, an UDP, a TCP
                and an IPv6 packet with Next Header = 255.


NOTE


REFERENCE

RFC2765

3.1. Translating IPv4 Headers into IPv6 Headers

         Next Header:
                 Protocol field copied from IPv4 header

3.3. Translating ICMPv4 Headers into ICMPv6 Headers

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


SEE ALSO

        perldoc V6evalTool