# NAME

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

# TARGET

            Router

# SYNOPSIS

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

# INITIALIZATION

    	Before this test starts, run initialize.seq.

# TEST PROCEDURE

            This test verifies that NUT force fragmentation if the resulting
            IPv6 package is larger than 1232 bytes + IPv6 header and
            optional fragment header.

            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
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1224)

            1.2.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    ICMPv6 echo request
                            Payload = repeat(0xff, 1224)

            2.1.
                                       <===================
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK1 IPv4 address
                            dst address : TN LINK0 IPv4 address
                            Don't Fragment = 1
                            Timestamp Option
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1224)

            2.2.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    ICMPv6 echo request
                            Payload = repeat(0xff, 1224)

            3.1.
                                       <===================
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK1 IPv4 address
                            dst address : TN LINK0 IPv4 address
                            Don't Fragment = 1
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1226)

            3.2.
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Destination Unreachable
                    IPv4 Header
                            src address : NUT LINK1 IPv4 address
                            dst address : TN LINK1 IPv4 address
                    ICMPv4 Destination Unreachable
                            Type = 3
                            Code = 2
                            MTU = 1252

            4.1.
                                       <===================
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK1 IPv4 address
                            dst address : TN LINK0 IPv4 address
                            Don't Fragment = 0
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1224)

            4.2.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    Fragment Header
                    ICMPv6 echo request
                            Payload = repeat(0xff, 1224)

            5.1.
                                       <===================
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK1 IPv4 address
                            dst address : TN LINK0 IPv4 address
                            Don't Fragment = 0
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1226)

            5.2.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    Fragment Header
                            Offset = 0
                            More Fragments = 1
                    ICMPv6 echo request
                            Payload = repeat(0xff, 1224)

            5.3.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    Fragment Header
                            Offset = 1232
                            More Fragments = 0
                    Payload = repeat(0xff, 2)

            6.1.
                                       <===================
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK1 IPv4 address
                            dst address : TN LINK0 IPv4 address
                            Don't Fragment = 0
                            FragmentOffset = 500
                            MF = 1
                    ICMPv4 echo request
                            Payload = repeat(0xff, 1226)

            6.2.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    Fragment Header
                            Offset = 500
                            More Fragments = 1
                    ICMPv6 echo request
                            Payload = repeat(0xff, 1224)

            6.3.
            <<JUDGMENT>>
            <===================
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK1 IPv4 embedded IPv6 address
                            dst address : TN LINK0 IPv4 embedded IPv6 address
                    Fragment Header
                            Offset = 1732
                            More Fragments = 1
                    Payload = repeat(0xff, 2)

# JUDGMENT

            << PASS >>
                    NUT translates IPv4 packages smaller than 1252 bytes.
                    If DF flag is set on IPv4 packages larger than 1254 bytes,
                    an ICMPv4 Destination Unreachable (packet too big) is
                    returned, otherwise the packet is fragmentet prior to
                    translation.

            << FAIL >>
                    NUT doesn't to forced fragmentation properly.

# NOTE

# REFERENCE

RFC2765

3.1. Translating IPv4 Headers into IPv6 Headers

       If the DF flag is not set and the IPv4 packet will result in an IPv6
       packet larger than 1280 bytes the IPv4 packet MUST be fragmented
       prior to translating it.  Since IPv4 packets with DF not set will
       always result in a fragment header being added to the packet the IPv4
       packets must be fragmented so that their length, excluding the IPv4
       header, is at most 1232 bytes (1280 minus 40 for the IPv6 header and
       8 for the Fragment header).

# SEE ALSO

            perldoc V6evalTool