Skip to content

APANA Melbourne

Sections
Personal tools
You are here: Home » APANA® Melbourne Wiki » IPv6: Configuration for Debian
Views
FrontPage >> MelbProjects >> IPv6 >>

IPv6: Configuration for Debian

Document Actions
last edited 1 year ago by lenehan

Some good debian IPv6 documenttion here:

Loading IPv6

Some debian kernels don't have IPv6 enabled, and some do. You'll need to check your kernel and change to a different one if it doesn't. A /sbin/modprobe ipv6 should load IPv6 if it's configured. You need to add ipv6 to /etc/modules to force IPv6 to be loaded on boot.

If the machine is to be on a LAN and autoconfigured, then that's all you need to do. As soon as it sees the router advertisments it'll auto configured it's IP address and can then be used to talk IPv6 to the rest of the world.

Statically setting an IPv6 address

The standard /etc/network/interfaces network configuration supports IPv6 just fine. A typical entry would be:

# IPv6 address
iface eth0 inet6 static
        address 2002:c0a8:241:1::13
        netmask 64

Note that if the static IP address does not get configured correcty on boot then it is likely that ipv6 is not being loaded early enough. Either of the following solutions should work:

  1. Adding ipv6 to /etc/modules
  2. Adding pre-up modprobe ipv6 to the definition of iface eth0 inet6 static.

Additional static IPv6 addresses

To add addtional IPv6 addresses you need to use either /sbin/ip or /sbin/ifconfig commands to configure additional addresses on the interface. You cannot use virtual interface style nameing such as eth0:1 with IPv6. The following example shows the addition of a secondary address using the /sbin/ip command:

# IPv6 address
iface eth0 inet6 static
        address 2002:c0a8:241:1::13
        netmask 64
        up /sbin/ip addr add dev $IFACE 2002:c0a8:241:1::a/64

Configuring 6to4 tunneling

The sit0 device needs to be configured with the address ::1 under your 6to4 prefix. This is the standard gateway address and should be used. So if your 6to4 prefix is 2002:c0a8:241 then the sit0 device should be configured with the address 2002:c0a8:241::1/48:

iface sit0 inet6 static
        address 2002:c0a8:241::1
        netmask 48
        up   ip -6 route add 2000::/3 via ::192.88.99.1
        down ip -6 route del 2000::/3

Note the standard IPv6 gateway is 192.88.99.1 - this should automatically find the nearest gateway.

Using the tun6to4 device instead of sit0

The IPV6 HOWTo recommends using the tun6to4 device instead of the sit0 device. Setting this up is almost as simple. Using the same addresses as in the previous example (192.168.2.65 is the IP4 address of the gateway, giving 6to4 address 2002:c0a8:241::1)

iface tun6to4 inet6 v4tunnel
        address 2002:c0a8:241::1
        netmask 16
        remote 192.88.99.1
        endpoint any
        local 129.168.2.65
        ttl     255
        up   ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4
        down ip -6 route flush dev tun6to4

wrong netmask --2004/10/08 06:55 AEST
Shouldn't the netmask for "Configuring 6to4 tunneling" be 16 instead of 48? This wouldn't matter is this is the sole machine on sit0, but if the machine is a router trying trying to get packets to some other 2002:c0a8:241:xxx address then it won't work. Dan.
If the routes/subnet uses for the other networks have a netmask >48 then they take precendence and it will work. But anyway 16 is correct - we shouldn't be trying to send those packets out of the network. Updated.

 
 

Powered by Plone