#!/usr/bin/perl # # $Copyright$ # # $Id: acceptRAwithMTUOption.seq,v 1.1.1.1 2000/10/31 22:39:04 sekiya Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: $'; } use V6evalTool; use PMTU; checkNUT(host); $IF=Link0; %pktdesc = ( frag_smaller_1st_1300 => 'TN --1st Fragmented 800/1259--> NUT', frag_smaller_2nd_1300 => 'TN --2nd Fragmented 459/1259--> NUT', receive_smaller_reply_1300 => 'TN <--A Echo Reply-- NUT', frag_even_1st_1300 => 'TN --1st Fragmented 800/1260--> NUT', frag_even_2nd_1300 => 'TN --2nd Fragmented 460/1260--> NUT', receive_even_reply_1300 => 'TN <--A Echo Reply-- NUT', frag_bigger_1st_1300 => 'TN --1st Fragmented 800/1261--> NUT', frag_bigger_2nd_1300 => 'TN --2nd Fragmented 461/1261--> NUT', frag_bigger_reply_1st_1300 => 'TN <--1st Fragmented 1248/1261-- NUT', frag_bigger_reply_2nd_1300 => 'TN <--2nd Fragmented 13/1261-- NUT', frag_smaller_1st_1400 => 'TN --1st Fragmented 800/1359--> NUT', frag_smaller_2nd_1400 => 'TN --2nd Fragmented 559/1359--> NUT', receive_smaller_reply_1400 => 'TN <--A Echo Reply-- NUT', frag_even_1st_1400 => 'TN --1st Fragmented 800/1360--> NUT', frag_even_2nd_1400 => 'TN --2nd Fragmented 560/1360--> NUT', receive_even_reply_1400 => 'TN <--A Echo Reply-- NUT', frag_bigger_1st_1400 => 'TN --1st Fragmented 800/1361--> NUT', frag_bigger_2nd_1400 => 'TN --2nd Fragmented 561/1361--> NUT', frag_bigger_reply_1st_1400 => 'TN <--1st Fragmented 1352/1361-- NUT', frag_bigger_reply_2nd_1400 => 'TN <--2nd Fragmented 9/1361-- NUT', ); # # Test for MTU1400 # #vLog("initialized NUT for PMTU test -- MTU 1400"); $ret=pmtuClearNCE(); if( $ret != 0) { vLog("NUT'NCE can not be cleared"); goto error; } $ret=pmtuClearGlobalNCE(); if( $ret != 0) { vLog("NUT'NCE can not be cleared"); goto error; } $ret=makeNCE(); if( $ret !=0) { vLog("NUT can not be initialized !!"); goto error; } sendPacketWithMTU("1400",($PMTU::sendRA)); if( $ret != 0) { vLog("NUT can not set MTU(1400)"); goto error; } $ret=checkSizeOfPathMTU("1400",\%packet_log_1400); if( $ret != 0) { vLog("TN can not chack size of NUT's MTU"); goto error; } vLog("Finish check size of NUT's MTU(1400)"); # # Test for MTU1300 # #vLog("initialized NUT for PMTU test -- MTU 1300"); sendPacketWithMTU("1300",($PMTU::sendRA)); if( $ret != 0) { vLog("NUT can not set MTU(1300)"); goto error; } $ret=checkSizeOfPathMTU("1300",\%packet_log_1300); if( $ret != 0) { vLog("TN can not chack size of NUT's MTU"); goto error; } vLog("Finish check size of NUT's MTU(1300)"); # # check NUT ignore invalid MTU # vLog("check NUT ignore invalid MTU"); # Check that a node increse the Path MTU in response to a # Packet Too Big message or not . sendPacketWithMTU("1400",$PMTU::sendRA); if( $ret != 0) { vLog("NUT can not set MTU(1400)"); goto error; } $ret=checkSizeOfPathMTU("1300",\%packet_log_1400_invalid); if( $ret != 0) { $ret=checkSizeOfPathMTU("1400",\%packet_log_1400_invalid); if( $ret == 0) { vLog("TN can not chack size of NUT's MTU"); goto error; } }else { vLog("NUT don't increse Path MTU"); } # Check taht a node set its Path MTU below IPv6 minimum # link MTU. sendPacketWithMTU("1200",$PMTU::sendRA); if( $ret != 0) { vLog("NUT can not set MTU(1200)"); goto error; } vClear($IF); sendFragmentEchoRequest($IF, [frag_1280_1st,frag_1280_2nd], ['1st Fragmented 800/1240', '2nd Fragmented 439/1240'] ); %ret=vRecv($IF,5,0,0, ('frag_1280_reply_1st','frag_1280_reply_2nd','reply_1280')); if( $ret{status} !=0) { vLog("Can not receive smaller Echo Reply !!"); goto error; }elsif ( $ret{recvFrame} eq 'reply_1280') { vLog("NUT don't set its Path MTU below IPv6 minimum"); }else { vLog("** Test is FALL **"); vLog("TN sets its Path MTU below the IPv6 minimum link MTU"); goto error; } # # NUT's MTU change to 1500(Ethenet defalut MTU) # sendPacketWithMTU("1500",($PMTU::sendRA)); if( $ret != 0) { vLog("NUT can not set MTU(1500)"); vLog("Failed initializetation"); exit $V6evalTool::exitFail; } vLog("OK"); exit $V6evalTool::exitPass; # # Error # error: # # NUT's MTU change to 1500(Ethenet defalut MTU) # sendPacketWithMTU("1500",($PMTU::sendRA)); if( $ret != 0) { vLog("NUT can not set MTU(1500)"); vLog("Failed initializetation"); exit $V6evalTool::exitFail; } vLog("FAIL"); exit $V6evalTool::exitFail; ######################################################################## __END__ =head1 NAME acceptRAwithMTUOption - Verify changing Path MTU received RA with MTU option =head1 TARGET Host =head1 SYNOPSIS acceptRAwithMTUOptin.seq [-tooloption ...] -p acceptRAwithMTUOption.def =head1 NETWORK CONFIGURATION This test is OFF-LINK Network Configuration test. In this test, TN play a Roll of the Router. Physical Network configuration --------------------------------------- | | NUT TN Logical Network Configuration HOST A (globaladdress:A) | ---------------------------------- | Router | ---------------------------------- | NUT (globaladdress:B) NUT < --- Router --- > HOST A In this configuration, Packets are send and received. for example, In Logical HOST A -- Echo Reply --> NUT Actually, in physical TN (as Router X) -- Echo Reply --> NUT =head1 INITIALIZATION There are 2 patterns for initialize. -- Test for host -- The TN send a RA to assign global address prefix. TN NUT ------------------- ===multicast RA===> src=TN's link-local dst=LinkLocal-all-node M=0, O=0, Lifetime=3600, ReachableTime=60000, RetransTimer=1005 Prefix: L=1, A=1, Valid Lifetime=3600005, Preferred Lifetime=3600005 Prefix=3ffe:501:ffff:100::, PrefixLength=64 Wait (5 sec.) Ignoring DAD packets for global address. -- Test for router -- TN attempt to execute remote command 'vRemote(route.rmt)'. 'route add -inet6 3ffe:501:ffff:109 TN'slink-local-address' =head1 TEST PROCEDURE "acceptRAwithMTUOption" verify that changing Path MTU when node receives RA with MTU option. This test includes 2 patterns which MTU is 1300 and 1400. sample is MTU = 1300. TN NUT --------------------------- 1. TN send RA which include MTU option (MTU = 1300). === RA with MTU = 1300 ===> 2.1 TN send Echo Request which is fragmented. orignal packet's size is 1299. === echo request 1st ===> === echo request 2nd ===> 2.2 NUT send Echo Reply << JUDGMENT 1 >> <=== echo reply === 3.1 TN send Echo Request which is fragmented. orignal packet's size is 1300. === echo request 1st ===> === echo request 2nd ===> 3.2 NUT send Echo Reply << JUDGMENT 1 >> <=== echo reply === 4.1 TN send Echo Request which is fragmented. orignal packet's size is 1301. === echo request 1st ===> === echo request 2nd ===> 4.2 NUT send Echo Reply which is fragmented. << JUDGMENT 1 >> <=== echo reply 1st === <=== echo reply 2nd === and, this parts (1-6) test in MTU 1400 -------------------------------------------------------- verify that NUT ignore invalid MTU. NUT must not increase its estimate of the Path MTU in response to the contents of a Too Big Message 1. TN send RA which include MTU option (MTU = 1450). === RA with MTU = 1450 ===> 2.1 TN send Echo Request which is fragmented. orignal packet's size is 1399. === echo request 1st ===> === echo request 2nd ===> 2.2 NUT send Echo Reply << JUDGMENT 2 >> <=== echo reply === 3.1 TN send Echo Request which is fragmented. orignal packet's size is 1400. === echo request 1st ===> === echo request 2nd ===> 3.2 NUT send Echo Reply << JUDGMENT 2 >> <=== echo reply === 4.1 TN send Echo Request which is fragmented. orignal packet's size is 1401. === echo request 1st ===> === echo request 2nd ===> 4.2 NUT send Echo Reply which is fragmented. << JUDGMENT 2 >> <=== echo reply 1st === <=== echo reply 2nd === -------------------------------------------------------- verify that NUT ignore invalid MTU. NUT must not reduce its estimate of the Path MTU below the IPv6 minimum link MTU. 1. TN send RA which include MTU option (MTU = 1300). === RA with MTU = 1300 ===> 2.1 TN send Echo Request which is fragmented. orignal packet's size is 1299. === echo request 1st ===> === echo request 2nd ===> 2.2 NUT send Echo Reply << JUDGMENT 3 >> <=== echo reply === =head1 JUDGMENT << JUDGMENT 1 -PASS- >> NUT send 3 Echo Reply ( no fragment, no fragment, fragmented) "PASS" means that NUT set valid MTU in response to accept Packet too big message. In first test, NUT's Path MTU of this path can be set 1300 In second test, NUT's Path MTU of this path can be set 1400. << JUDGMENT 2 -PASS- >> NUT send 3 Echo Reply ( no fragment, no fragment, fragmented ) "PASS" means that NUT don't increase Path MTU in response to accept invalid Packet Too Big Message << JUDGMENT 3 -PASS- >> NUT send 1 Echo Reply ( no fragment) "PASS" means that NUT don't set its Path MTU below IPv6 mini mum =head1 SEE ALSO perldoc V6evalTool perldoc V6evalRemote =cut