#!/usr/bin/perl # # $Copyright$ # # $TAHI: ct/tunnel/hoplimit.seq,v 1.10 2001/10/05 06:39:23 masaxmasa Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: $'; } use V6evalTool; use tunnel; checkNUT(router); $IF=$tunnel::IF_ID_0; $IF1=$tunnel::IF_ID_1; vCapture($IF); vCapture($IF1); $ret=makeNCE_TN_LLA(); if( $ret !=0) { vLogHTML("

NUT can not be initialized !!

"); goto error; }else { vLogHTML("

--- TN can make TN's link local address NCE in TN ---

"); } $ret=makeNCE_TN_GA(); if( $ret !=0) { vLogHTML("

NUT can not be initialized !!

"); goto error; }else { vLogHTML("

--- TN can make TN's global address NCE in TN ---

"); } $ret=makeARPTable_LINK1(); if( $ret !=0) { vLogHTML("

NUT can not convert v4 address to ethernet address !!

"); goto error; }else { vLogHTML("

--- NUT can convert v4 address to ethernet address ---

"); } vSend($IF, v6_echo_request_LINK0_tn2nut_OFFLINK); %ret=vRecv($IF1,5,0,0,v6overv4_echo_request_LINK1_nut2tn); if( $ret{status} !=0) { vLogHTML("

TN can not receive Echo Reply from NUT


"); goto error; }else { vLogHTML("

NUT decremets the hop limit


"); } ###################################### vSend($IF1, v6overv4_echo_request_LINK1_tn2nut); %ret=vRecv($IF,5,0,0,v6_echo_request_LINK0_nut2tn_OFFLINK); if( $ret{status} !=0) { vLogHTML("

TN can not receive Echo Reply from NUT

"); goto error; }else { vLogHTML("

NUT decremets the hop limit

"."
"); vLogHTML("

TN can receive Echo Reply from NUT

"."
"); vLogHTML("

OK

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

NG

"); exit $V6evalTool::exitFail; ######################################################################## __END__ =head1 NAME hoplimit.seq - Verify that decrease hoplimt when the encapulating packet is forwarded =head1 TARGET Router =head1 SYNOPSIS hoplimt.seq [-tooloption ...] -p hoplimit.def =head1 INITIALIZATION =begin html
	Before this test starts, run initialize.seq.
=end html =head1 TEST PROCEDURE This test verifies that NUT decrease hoplimit when forward through tnnnel. Network Topology Link0 -------------------------- | | TN NUT | | -------------------------- Link1 TN -- (Link0) -- NUT TN -- (Link1) -- NUT --------------------- ------------------------ - encapsulation, and forwarding a packet 1. ===================> ICMPv6 Echo Request IPv6 Header src address : TN LINK0 IPv6 global address dst address : Off-link IPv6 global address hoplimit : 64 2. In NUT, received ICMPv6 Echo Request packet is encapsulated, and forward IPv4 packet 3. <> <=================== IPv4 packet encapsulating IPv6 packet Outer Header (IPv4) src address : NUT Link1 IPv4 address dst address : Off-link IPv4 address Inner Header (IPv6) src address : TN LINK0 IPv6 global address dst address : Off-link IPv6 global address hoplimit : 63 (for ISDN router, 62) - decapsulation, and forwarding a packet 4. ===================> IPv4 packet encapsulating IPv6 packet Outer Header (IPv4) src address : Off-link IPv4 address dst address : NUT Link1 IPv4 address Inner Header (IPv6) src address : Off-link IPv6 global address dst address : TN LINK0 IPv6 global address hoplimit : 64 5. In NUT, received IPv4 packet is decapsulated, and forward ICMPv6 Echo Request packet. 6. << JUDGMENT >> <=================== ICMPv6 Echo Reply IPv6 Header src address : Off-link IPv6 global address dst address : TN LINK0 IPv6 global address hoplimit : 63 (for ISDN router, 62) =head1 JUDGMENT << PASS >> NUT decreased hoplimit << FAIL >> NUT did not decrease hoplimit =head1 SEE ALSO perldoc V6evalTool =cut