#!/usr/bin/perl # # $Copyright$ # # $TAHI: ct/natpt/rfc2765_3.1_options.seq,v 1.4 2001/10/11 01:41:47 akisada Exp $ # BEGIN { $V6evalTool::TestVersion = '$Name: $'; } use V6evalTool; use natpt; checkNUT(router); # Interface $IF="Link0"; $IF1="Link1"; vCapture($IF); vCapture($IF1); %pktdesc = ( ipv4_looserouteexpired => 'Send IPv4 option Loose Source Route (Route Expired)', ipv4_looseroute => 'Send IPv4 option Loose Source Route (NUT is last step)', ipv4_strictrouteexpired => 'Send IPv4 option Strict Source Route (Route Expired)', ipv4_strictroute => 'Send IPv4 option Strict Source Route (NUT is last step)', ipv4_timestamp => 'Send IPv4 option Timestamp', ipv4_recordroute => 'Send IPv4 option Record Route', ipv4_multipass => 'Send IPv4 with many different options', ipv6_echo => 'Recv IPv6 Translated Packet', arp_nut2tn_request => 'Recv ARP request on Link1 (TN IPv4addr)', arp_tn2nut_reply => 'Send ARP reply on Link1 (TN IPv4addr)', ns_nut2tn_siit0 => 'Recv Neighbor Solicitation on Link0 (SIIT V6addr)', na_tn2nut_siit0 => 'Send Neighbor Advertisement on Link0 (SIIT V6addr)', ); $result = $V6evalTool::exitPass; $result += send_recv($IF1, 'ipv4_timestamp', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_recordroute', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_looserouteexpired', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_looseroute', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_strictrouteexpired', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_strictroute', $IF, 'ipv6_echo'); $result += send_recv($IF1, 'ipv4_multipass', $IF, 'ipv6_echo'); if($result == $V6evalTool::exitPass) { vLogHTML("

OK

"); exit $V6evalTool::exitPass; } error: vLogHTML("

NG

"); exit $V6evalTool::exitFail; ######################################################################## __END__ =head1 NAME rfc2765_3.1_options.seq - Verify IPv6 <-> IPv4 header translation in accordance with RFC2765 [SIIT] =head1 TARGET Router =head1 SYNOPSIS rfc2765_3.1_options.seq [-tooloption ...] -p rfc2765_3.1_options.def =head1 INITIALIZATION =begin html
	Before this test starts, run initialize.seq.
=end html =head1 TEST PROCEDURE This test verifies that NUT ignores IPv4 header options (except unexpired Source Route options, which are not tested here.) Network Topology Link0 -------------------------- | | TN NUT | | -------------------------- Link1 TN -- (Link0) -- NUT NUT -- (Link1) -- TN --------------------- ------------------------ =begin html
1.1.[1-6]. <=================== 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 Option = Timestamp or Record Route or Loose Source Route (Route expired) or Loose Source Route (NUT is last step) or Strict Source Route (Route expired) or Strict Source Route (NUT is last step) ICMPv4 echo request 1.2.[1-6]. <> <=================== ICMPv6 Echo Request IPv6 Header src address : TN LINK1 IPv4 embedded IPv6 address dst address : TN LINK0 IPv4 embedded IPv6 address ICMPv6 echo request =begin html
2.1.1 <=================== ICMPv4 Echo request IPv4 Header src address : TN LINK1 IPv4 address dst address : NUT LINK1 IPv4 address Don't Fragment = 1 More fragments = 0 Offset = 0 option = Timestamp option = NOP option = Loose Source Route (Route expired) option = NOP option = Strict Source Route (NUT is last step) option = NOP option = Record Route option = End of OptionList Padding = 0; Padding = 0; Padding = 0; ICMPv4 echo request 2.2.1. <> <=================== ICMPv6 Echo Request IPv6 Header src address : TN LINK1 IPv4 embedded IPv6 address dst address : TN LINK0 IPv4 embedded IPv6 address ICMPv6 echo request =head1 JUDGMENT << PASS >> NUT ignores all options and translates the echo request. << FAIL >> NUT doesn't translate the ICMPv4 echo request to ICMPv6 echo requests. =head1 NOTE =head1 REFERENCE B 3.1. Translating IPv4 Headers into IPv6 Headers If IPv4 options are present in the IPv4 packet, they are ignored i.e., there is no attempt to translate them. However, if an unexpired source route option is present then the packet MUST instead be discarded, and an ICMPv4 "destination unreachable/source route failed" (Type 3/Code 5) error message SHOULD be returned to the sender. =head1 SEE ALSO perldoc V6evalTool =cut