Subject: Re: ipv6 over ipv4 troubles
To: Tomasz Luchowski <zuntum@eik.pl>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: current-users
Date: 02/07/2001 18:03:54
>btw, one can use my simple shell script to produce "ipv6.sh" - script to
>launch the tunnel -- http://zuntum.eik.pl/makev6.sh

	some corrections here.
	- openbsd uses "ifconfig gif* giftunnel", not "gifconfig"
	- routing setup should be done without peer's address
	- prefixlen for p2p must be 128 if you specify local and remote address

itojun


--- makev6.sh-	Wed Feb  7 18:01:06 2001
+++ makev6.sh	Wed Feb  7 18:02:58 2001
@@ -5,9 +5,9 @@
 
 progname=`basename $0`
 
-if [ $# -ne 6 ]
+if [ $# -ne 5 ]
 then
-	echo echo Usage: $progname gif_interface localv4 remotev4 localv6 remotev6 prefixlen >&2
+	echo echo Usage: $progname gif_interface localv4 remotev4 localv6 remotev6 >&2
 	exit 1
 fi
 
@@ -20,7 +20,7 @@
 remotev4=$3
 localv6=$4
 remotev6=$5
-prefixlen=$6
+prefixlen=128
 
 if [ `uname -s` = "NetBSD" ];
 then
@@ -30,7 +30,7 @@
 	echo $gifconfig $gif_interface $localv4 $remotev4
 elif [ `uname -s` = "OpenBSD" ];
 then
-	echo $gifconfig $gif_interface giftunnel $localv4 $localv4
+	echo $ifconfig $gif_interface giftunnel $localv4 $localv4
 else
 	echo "OS != FreeBSD/NetBSD/OpenBSD, program terminated"
 	exit 1
@@ -41,4 +41,5 @@
 else
 	echo $ifconfig $gif_interface inet6 $localv6 $remotev6 prefixlen $prefixlen
 fi
-echo $route add -inet6 default $remotev6
+echo $route add -inet6 default ::1
+echo $route change -inet6 default -ifp $remotev6