rfc2766_5.3.2_checksum_tcp_udp.seq - Verify IPv6 <-> IPv4 header translation in accordance with RFC2766 [NATPT]
Router
rfc2766_5.3.2_checksum_tcp_udp.seq [-tooloption ...] -p rfc2766_5.3.2_checksum_tcp_udp.def
Before this test starts, run initialize_natpt.seq.
This test verifies that NUT adjusts header checksum for TCP/UDP packets. Network Topology
Link0 -------------------------- | | TN NUT | | -------------------------- Link1
TN -- (Link0) -- NUT NUT -- (Link1) -- TN --------------------- ------------------------
1.1. ===================> IPv6 UDP packet IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address UDP packet Checksum including IPv6 pseudo header data = repeat(0xff,128) 1.2. <<JUDGMENT>> ===================> IPv4 UDP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address DF = 1 UDP packet Checksum including IPv4 pseudo header, or zero data = repeat(0xff,128)
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 More fragments = 1 UDP packet Checksum including IPv6 pseudo header, or zero data = repeat(0xff,64) 2.2. <<JUDGMENT>> ===================> IPv4 UDP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address MF = 1 UDP packet Checksum for full UDP packet, including 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 More fragments = 0 NextHeader = 17 Payload data = repeat(0xff,64) 3.2. <<JUDGMENT>> ===================> IPv4 UDP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address MF = 0 Protocol = 17 Payload data = repeat(0xff,64)
4.1. ===================> IPv6 TCP packet IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address TCP packet Checksum including IPv6 pseudo header data = repeat(0xff,128) 4.2. <<JUDGMENT>> ===================> IPv4 TCP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address DF = 1 TCP packet Checksum including IPv4 pseudo header data = repeat(0xff,128)
5.1. ===================> IPv6 TCP packet IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address Fragment Header More fragments = 1 TCP packet Checksum including IPv6 pseudo header data = repeat(0xff,64) 5.2. <<JUDGMENT>> ===================> IPv4 TCP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address MF = 1 TCP packet Checksum including IPv4 pseudo header data = repeat(0xff,64)
6.1. ===================> IPv6 TCP packet IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address Fragment Header More fragments = 0 Payload data = repeat(0xff,64) 6.2. <<JUDGMENT>> ===================> IPv4 TCP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address MF = 0 Payload data = repeat(0xff,64)
<< PASS >> NUT adjusts header checksum for UDP/TCP packets. Optionally NUT sets checksum to zero on UDP packets.
<< FAIL >> NUT send TCP/UDP packets with wrong checksum.
RFC2766
5.3.2 TCP/UDP/ICMP Checksum Update from IPv6 to IPv4
TCP and UDP checksums SHOULD be recalculated to reflect the address change from v6 to v4. The incremental checksum adjustment algorithm may be borrowed from [NAT]. In the case of NAPT-PT, TCP/UDP checksums should be adjusted to account for the address and TCP/UDP port changes, going from V6 to V4 addresses. For UDP packets, optionally, the checksum may simply be changed to zero.
perldoc V6evalTool