#!/usr/bin/perl
#
# $Copyright$
#
# $TAHI: ct/tunnel/initialize.seq,v 1.4 2001/10/15 02:09:28 tanaka 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 IPv4 routing !!");
goto error_fatal;
}else {
vLogHTML("--- NUT can be configured IPv4 routing ---
");
}
$ret=config_host_v6($IF_IPV6);
if( $ret !=0) {
vLogHTML("NUT can not be configured IPv6 routing !!");
goto error_fatal;
}else {
vLogHTML("--- NUT can be configured IPv6 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