# NAME

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

# TARGET

            Router

# SYNOPSIS

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

# INITIALIZATION

    	Before this test starts, run initialize.seq.

# TEST PROCEDURE

            This test verifies that NUT translated an IPv4 fragment
            or IPv4 package with DF=0, to an IPv6 package with 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
                            More fragments = 0
                            Offset = 0
                    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
                            NextHeader = 58
                            PayloadLength = 14
                    ICMPv6 echo request

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

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

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

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

# JUDGMENT

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

            << FAIL >>
                    NUT fails the translation.

# NOTE

# REFERENCE

RFC2765

3.1. Translating IPv4 Headers into IPv6 Headers

       If there is need to add a fragment header (the DF bit is not set or
       the packet is a fragment) the header fields are set as above with the
       following exceptions:

          IPv6 fields:

              Payload Length:
                      Total length value from IPv4 header, plus 8 for the
                      fragment header, minus the size of the IPv4 header
                      and IPv4 options, if present.

              Next Header:
                      Fragment Header (44).

          Fragment header fields:

              Fragment Offset:
                      Fragment Offset copied from the IPv4 header.

              M flag:
                      More Fragments bit copied from the IPv4 header.

# SEE ALSO

            perldoc V6evalTool