• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Main Menu

Linux Auto IPv6 Tunneling

Started by badcrc, November 23, 2008, 12:33:58 AM

Previous topic - Next topic

badcrc

I am running Ubuntu Linux 8.10 on one of my desktop systems not provided an IP from the server in my last thread. What I would like to know, is there a way to make an auto connection at boot?

Here is my '/etc/network/interfaces' file:


john@earth:~$ cat /etc/network/interfaces
auto he-tunnel
iface he-tunnel inet static
address 2001:470:a:1ec::2/64
netmask 64
gateway 2001:470:a:1ec::1/64
up ip -6 route add ::/0 dev he-tunnel
down ip -6 route del ::/0 dev he-tunnel
mtu 1500

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
endpoint 216.218.226.238
address 2001:470:a:1ec::1/64
netmask 64
up ip -6 route add default dev he-ipv6
down ip -6 route del default dev he-ipv6
mtu 1500

auto ath0
iface ath0 inet static
address 192.168.1.69
netmask 255.255.255.0
gateway 192.168.1.1
mtu 1500

auto lo
iface lo inet loopback


Here is the output of 'ifconfig':


john@earth:~$ ifconfig
ath0      Link encap:Ethernet  HWaddr 00:15:e9:89:1a:ce 
          inet addr:192.168.1.69  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:e9ff:fe89:1ace/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3399 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1446 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:241789 (241.7 KB)  TX bytes:123804 (123.8 KB)

he-ipv6   Link encap:IPv6-in-IPv4 
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:296 errors:0 dropped:0 overruns:0 frame:0
          TX packets:296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:19068 (19.0 KB)  TX bytes:19068 (19.0 KB)

wifi0     Link encap:UNSPEC  HWaddr 00-15-E9-89-1A-CE-00-00-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:155260 errors:0 dropped:0 overruns:0 frame:125103
          TX packets:1808 errors:3 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:18130621 (18.1 MB)  TX bytes:170544 (170.5 KB)
          Interrupt:20


What is going on here is that the IPv4 setup on 'ath0' is working fine and the logical device 'he-ipv6' is being created, but the link to the Tunnel Server on 'he-tunnel' as defined in the interfaces file is not being created and established.

Any ideas how I can easily make this happen? Thank you.

elc

Try bringing the interface up/down manually to see what error messages are displayed (you may want to bring it down first if it got started automatically):
# ifdown he-ipv6
# ifup he-ipv6


If you want to setup a tunnel, something like this should work (note that there's no '/64' behind the address):

auto he-ipv6
iface he-ipv6 inet6 v4tunnel
        endpoint 216.218.226.238
        address  2001:470:a:1ec::2
        netmask  64
        up       ip route add 2000::/3 via 2001:470:a:1ec::1

I'm not sure what you want with the he-tunnel interface, but you probably don't need it.