NAME

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


TARGET

        Router


SYNOPSIS

        rfc2765_4.1_nextheaderfrag.seq [-tooloption ...] 
        -p rfc2765_4.1_nextheaderfrag.def


INITIALIZATION

	Before this test starts, run initialize.seq.


TEST PROCEDURE

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

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

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

        1.1.
        ===================>
        ICMPv6 Echo Request
                IPv6 Header
                        src address : TN LINK0 IPv4 embedded IPv6 address
                        dst address : TN LINK1 IPv4 embedded IPv6 address
                Fragment Header
                        Next Header = 58
                        Identification = 10000
                ICMPv6 echo request

        1.2.
        <<JUDGMENT>>
                                   ===================>
        ICMPv4 Echo request
                IPv4 Header
                        src address : TN LINK0 IPv4 address
                        dst address : TN LINK1 IPv4 address
                        Don't Fragment = 0
                        Protocol = 1
                        Identifier = 10000
                ICMPv4 echo request

        2.1.
        ===================>
        IPv6 UDP packet
                IPv6 Header
                        src address : TN LINK0 IPv4 embedded IPv6 address
                        dst address : TN LINK1 IPv4 embedded IPv6 address
                Fragment Header
                        Next Header = 17
                        Identification = 20000
                UDP packet
                        Checksum including IPv6 pseudo header
                        data = repeat(0xff,64)

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

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

        3.2.
        <<JUDGMENT>>
                                   ===================>
        IPv4 TCP packet
                IPv4 Header
                        src address : TN LINK0 IPv4 address
                        dst address : TN LINK1 IPv4 address
                        Don't Fragment = 0
                        Protocol = 6
                        Identifier = 30000
                TCP packet
                        Checksum including IPv4 pseudo header
                        data = repeat(0xff,64)

        4.1.
        ===================>
        IPv6 unknown protocol(255) packet
                IPv6 Header
                        src address : TN LINK0 IPv4 embedded IPv6 address
                        dst address : TN LINK1 IPv4 embedded IPv6 address
                Fragment Header
                        Next Header = 255
                        Identification = 40000
                data = repeat(0xff,64)
         

        4.2.
        <<JUDGMENT>>
                                   ===================>
        IPv4 unknown protocol(255) packet
                IPv4 Header
                        src address : TN LINK0 IPv4 address
                        dst address : TN LINK1 IPv4 address
                        Don't Fragment = 1
                        Protocol = 255
                        Identifier = 40000
                data = repeat(0xff,64)


JUDGMENT

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


NOTE


REFERENCE

RFC2765

4.1. Translating IPv6 Headers into IPv4 Headers

   If the IPv6 packet contains a Fragment header the header fields are
   set as above with the following exceptions:

         Identification:
                 Copied from the low-order 16-bits in the
                 Identification field in the Fragment header.

         Protocol:
                 Next Header value copied from Fragment header.


SEE ALSO

        perldoc V6evalTool