# NAME

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

# TARGET

            Router

# SYNOPSIS

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

# INITIALIZATION

    	Before this test starts, run initialize.seq.

# TEST PROCEDURE

            This test verifies that NUT translates an IPv6 package with Fragment
            header to an IPv4 package with DF=0, and copies Offset and MF flag.

            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
                            NextHeader = 58
                            PayloadLength = 14
                    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 = 1
                            More fragments = 0
                            Offset = 0
                    ICMPv4 echo request

            2.1.[1-2]
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                            NextHeader = 44
                            PayloadLength = 22
                    Fragment Header
                            More fragments = (0)
                                          or (1)
                            FragmentOffset = 0
                    ICMPv6 echo request

            2.2.[1-2]
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                            (DF,MF,Offset) = (0, 0, 0)
                                          or (0, 1, 0)
                    ICMPv4 echo request

            3.1.[1-2]
            ===================>
            ICMPv6 Echo Request
                    IPv6 Header
                            src address : TN LINK0 IPv4 embedded IPv6 address
                            dst address : TN LINK1 IPv4 embedded IPv6 address
                            NextHeader = 44
                            PayloadLength = 22
                    Fragment Header
                            More fragments = (0)
                                          or (1)
                            FragmentOffset = 20
                    Payload data = ICMPv4 echo request

            3.2.[1-2]
            <<JUDGMENT>>
                                       ===================>
            ICMPv4 Echo request
                    IPv4 Header
                            src address : TN LINK0 IPv4 address
                            dst address : TN LINK1 IPv4 address
                            (DF,MF,Offset) = (0, 0, 20)
                                          or (0, 1, 20)
                    Payload data = ICMPv4 echo request

# JUDGMENT

            << PASS >>
                    NUT translates IPv6 packages to IPv4 packages, including
                    Fragment header when needed.

            << FAIL >>
                    NUT fails the translation.

# 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:

             Total Length:
                     Payload length value from IPv6 header, minus 8 for
                     the Fragment header, plus the size of the IPv4
                     header.

             Flags:
                     The More Fragments flag is copied from the M flag in
                     the Fragment header.  The Don't Fragments flag is set
                     to zero allowing this packet to be fragmented by IPv4
                     routers.

             Fragment Offset:
                     Copied from the Fragment Offset field in the Fragment
                     Header.

# SEE ALSO

            perldoc V6evalTool