Print

Configuration Script

Previous page Parent page TOC
Structure   (1.1.2)   Home Page  »  Projects  »  IPv6  »  Configuration Script

At the top of the script, you will see several variables:
  • SIT - The name of the tunnel device. Usually 'sit1'
  • ETH0IPV6 - ipv6 address for 'eth0'. This is contructed from the tunnel routed 64 prefix
  • ETH1IPV6 - ipv6 address for 'eth1'. This is contructed from the tunnel routed 64 prefix
  • GATEWAY - The default IPv6 gateway. For 6to4 tunnels, this is always ::192.88.99.1.
  • IPV6MYEND - Client endpoint of tunnel
Here is the main input information for my firewall:
ETH0IPV6=2001:470:d:3ff:1::1/64
ETH1IPV6=2001:470:d:3ff:2::1/64
SIT0="sit0"
SIT1="sit1"
GATEWAY=::192.88.99.1
HETUNNEL=::66.220.18.42
IPV6MYEND=2001:470:c:3ff::2/64

and here is the Network and Tunnel configuration script.
#!/bin/sh
# chkconfig: 2345 4 99
# description: Configure an IPv6 tunnel to HE.NET

### BEGIN INIT INFO
# Provides:       ipv6
# Required-Start: boot.udev
# Required-Stop:
# Default-Start:  2 3 5
# Default-Stop:   0 1 6
# Description:    Configure an IPv6 tunnel to HE.NET
### END INIT INFO

# Reference: From HE.NET configs

# Define knowns of tunnel
ETH0IPV6=2001:470:d:3ff:1::1/64
ETH1IPV6=2001:470:d:3ff:2::1/64
SIT0="sit0"
SIT1="sit1"
GATEWAY=::192.88.99.1
HETUNNEL=::66.220.18.42
IPV6MYEND=2001:470:c:3ff::2/64
##########################################################################
start() {
# Configuring sit0 define tunnel to HE.NET 
# (ourkopu-1.tunnel.tserv15.lax1.ipv6.he.net) using
# the Server IPv4 endpoint address
        	ifconfig $SIT0 up
        	ifconfig $SIT0 inet6 tunnel $HETUNNEL
# Define external interface using Client IPv6 address
        	ifconfig $SIT1 up
        	ifconfig $SIT1 inet6 add $IPV6MYEND
# Define ipv6 addresses for internal network interfaces for advertising by RADVD
        	ifconfig eth0 up
		ifconfig eth0 inet6 add $ETH0IPV6
		ifconfig eth1 up
		ifconfig eth1 inet6 add $ETH1IPV6
# Configure Route for ipv6 traffic using the global gateway for 6to4 tunnels
		route -A inet6 add $GATEWAY/ dev $SIT1
	}
##########################################################################
stop() {
# sit1 Device
		ifconfig $SIT0 down
		ifconfig $SIT1 down
# Delete NIC intercaes
		ip addr del $ETH0IPV6 dev eth0
		ip addr del $ETH1IPV6 dev eth1
	}
restart() {
	        stop
        	start
	}
# See how we were called.
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        status)
               ip -f inet6 addr 
                ;;
        restart)
                restart
                ;;
        condrestart)
                if [ -f /var/lock/subsys/radvd ]; then
                stop
                start
	fi
	;;
*)
        echo "Usage: {start|stop|status|restart|condrestart}" 
        exit 1
esac
exit $RETVAL


Page last modified on Monday 24 of May, 2010 13:41:11 CKT

IPv6 Certification

IPv6 Certification Badge for moip

Menu

gogoNET

Shoutbox

timoti, 12:39 CKT, Mon 07 of June, 2010: Considering of hosting the mapserver on a VS at the local ISP.
timoti, 14:28 CKT, Mon 17 of May, 2010: Installed conntrack to track tcp connections.
timoti, 10:20 CKT, Sun 16 of May, 2010: ...need to investigate ipv6 tunnel timeouts on firewall...
timoti, 07:41 CKT, Sun 28 of Mar., 2010: Observed Earth Hour ([Link] last night...so, the server was powered down between 20:00 and 21:00 CKT.
timoti, 15:49 CKT, Sat 27 of Mar., 2010: It still shows the webservers ipv6 address rather than the PC client ipv6 address.

IPv4 Exhaustion