rfc2766_ping.seq - Verify IPv6 <-> IPv4 header translation in accordance with RFC2766 [NATPT]
Router
rfc2766_ping.seq [-tooloption ...] -p rfc2766_ping.def
Before this test starts, run initialize_natpt.seq.
This test verifies that NUT translates between IPv6 (no fragment hdr) and IPv4 (DF=1). It also tests ICMPv6 echo <-> ICMPv4 echo translation. 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 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 ICMPv4 echo request
2.1 <=================== ICMPv4 Echo Reply IPv4 Header src address : TN LINK1 IPv4 address dst address : TN LINK0 IPv4 address Don't Fragment = 1 More fragments = 0 ICMPv4 echo reply
2.2 <<JUDGMENT>> <=================== ICMPv6 Echo Reply IPv6 Header src address : TN LINK1 IPv4 embedded IPv6 address dst address : TN LINK0 IPv4 embedded IPv6 address FlowLabel = 0 ICMPv6 echo reply
3.1 ===================> ICMPv6 Echo Request IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address Fragment Header More fragments = 0 ICMPv6 echo request
3.2 <<JUDGMENT>> ===================> ICMPv4 Echo request IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address Don't Fragment = 0 More fragments = 0 ICMPv4 echo request
4.1 <=================== ICMPv4 Echo Reply IPv4 Header src address : TN LINK1 IPv4 address dst address : TN LINK0 IPv4 address Don't Fragment = 0 More fragments = 0 ICMPv4 echo reply
4.2 <<JUDGMENT>> <=================== ICMPv6 Echo Reply IPv6 Header src address : TN LINK1 IPv4 embedded IPv6 address dst address : TN LINK0 IPv4 embedded IPv6 address Fragment Header More fragments = 0 ICMPv6 echo reply
<< PASS >> TN (Link1) received ICMPv4 echo request, with DF=1 in IPv4 header. TN (Link0) received ICMPv6 echo reply, with no fragment header after IPv6 header. TN (Link1) received ICMPv4 echo request, with DF=0 in IPv4 header. TN (Link0) received ICMPv6 echo reply, with a fragment header after IPv6 header.
<< FAIL >> NUT did not translate between ICMPv6 echo and ICMPv4 echo, or NUT did not translate between IPv6 fragment header and IPv4 DF option.
RFC2766
5.1 Translating IPv4 headers to IPv6 headers
This is done exactly the same as in SIIT apart from the following fields:
Source Address: The low-order 32 bits is the IPv4 source address. The high- order 96 bits is the designated PREFIX for all v4 communications. Addresses using this PREFIX will be routed to the NAT-PT gateway (PREFIX::/96)
Destination Address: NAT-PT retains a mapping between the IPv4 destination address and the IPv6 address of the destination node. The IPv4 destination address is replaced by the IPv6 address retained in that mapping.
5.2 Translating IPv6 headers to IPv4 headers
This is done exactly the same as in SIIT apart from the Source Address which should be determined as follows:
Source Address: The NAT-PT retains a mapping between the IPv6 source address and an IPv4 address from the pool of IPv4 addresses available. The IPv6 source address is replaced by the IPv4 address retained in that mapping.
Destination Address: IPv6 packets that are translated have a destination address of the form PREFIX::IPv4/96. Thus the low-order 32 bits of the IPv6 destination address is copied to the IPv4 destination address.
perldoc V6evalTool