#!/usr/bin/perl # # Copyright (C) 1999,2000 Yokogawa Electric Corporation and # YDC Corporation. # All rights reserved. # # Redistribution and use of this software in source and binary # forms, with or without modification, are permitted provided that # the following conditions and disclaimer are agreed and accepted # by the user: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with # the distribution. # # 3. Neither the names of the copyrighters, the name of the project # which is related to this software (hereinafter referred to as # "project") nor the names of the contributors may be used to # endorse or promote products derived from this software without # specific prior written permission. # # 4. No merchantable use may be permitted without prior written # notification to the copyrighters. # # 5. The copyrighters, the project and the contributors may prohibit # the use of this software at any time. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHTERS, THE PROJECT AND # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING # BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHTERS, THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # $Id: initialize.seq,v 1.1.1.1 2000/10/31 22:39:56 sekiya Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: $'; } use V6evalTool; use tunnel; if($tunnel::type eq "host"){ $IF_TUNNEL = $tunnel::IF_ID_0; $IF_IPV6 = $tunnel::IF_ID_0; } else { # router $IF_TUNNEL = $tunnel::IF_ID_1; $IF_IPV6 = $tunnel::IF_ID_0; } vCapture($IF_IPV6); vCapture($IF_TUNNEL); $ret=reboot(); if( $ret !=$V6evalTool::exitIgnore) { vLogHTML("Can not reboot NUT !!"); goto error_fatal; }else { vLogHTML("

--- reboot NUT ---

"); } $ret=config_automatic_tunnel($IF_TUNNEL); if( $ret !=0) { vLogHTML("Can not configure automatic tunnel !!"); }else { vLogHTML("

--- TN can configure tunnel between TN and NUT ---

"); } $ret=config_host_v4($IF_TUNNEL); if( $ret !=0) { vLogHTML("NUT can not be configured v4 routing !!"); goto error_fatal; }else { vLogHTML("

--- NUT can be configured v4 routing ---

"); } $ret=config_host_v6($IF_IPV6); if( $ret !=0) { vLogHTML("NUT can not be configured v6 routing !!"); goto error_fatal; }else { vLogHTML("

--- NUT can be configured v6 routing ---

"); } $ret=config_tunnel_offlink($IF_TUNNEL); if( $ret !=0) { vLogHTML("Can not configure tunnel !!"); goto error_fatal; }else { vLogHTML("

--- TN can configure tunnel between TN and NUT ---

"); } vLogHTML("

OK

"); exit $V6evalTool::exitIgnore; error_fatal: vLogHTML("

NG

"); vErrmsg(%ret); exit $V6evalTool::exitFatal; ######################################################################## __END__ =head1 NAME initialize.seq - initialization tunnel environment test =head1 TARGET Host and Router =head1 SYNOPSIS This script configures for the tunnel. In First, reboot NUT. Configures, - assign IPv4 compatible IPv6 address to NUT - assign IPv4 address and set default route for IPv4 - assign IPv6 address and set default route for IPv6 - set up IPv6 over IPv4 configured tunnel and make TN's address Neighbor Cache Entry and ARP table =head1 SEE ALSO perldoc V6evalTool =cut