Enabling IPv6 in 2.4.xx kernels |
Created Thu, 13 Feb 2003 18:01:51 +0200 Last edited |
Debian Woody and kernel 2.4.20 was used while writing this article. Depending on your Linux distribution the steps needed to make the kernel IPv6 aware might be a bit different.
First off make sure that your kernel tree is clean. Copy your .config over to a temporary directory, then issue a "make mrproper". Now copy back your .config into the root of the kernel tree and issue a "make oldconfig". Now depending on what you prefer issue a "make config", "make menuconfig" or "make xconfig".
Scroll down to the network specific options. If for your kernel version IPv6 (CONFIG_IPV6) is marked as experimental, you will have to switch on that as well. You can make the IPv6 either modular (=m) or monolithic (=y), either way works. If you chose the modular way be aware that the IPv6 module can't be unloaded.
In addition to switching on IPv6 you will want to enable iptables to work with IPv6. Switch on the IPv6 features you have on for IPv4.
When finished issue a "make dep", "make bzImage", "make modules" and "make modules_install". If you made IPv6 modular, you might want to add ipv6.o to /etc/modules so that it gets loaded automatically on startup. Now you will have to reboot to enable the IPv6 support.
Just type "ifconfig eth0 add xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx" to add one IPv6 address to your ethernet interface. Replace eth0 with whatever your ethernet interface is. If you want the address to be automatically added on startup, edit /etc/network/interfaces and enter the following:
iface eth0 inet6 static address xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx netmask 64
Since it seldomly is possible to use native IPv6 connections outside your LAN, you will want to look at some of the available IPv4 in IPv6 tunneling options. Two most used options are: Freenet 6 and 6-to-4.
You should also remember to install ip6tables since the IPv6 packets have different characteristics from the traditional IPv4 packets and need to be filtered with ip6tables. You might want to check out the article I wrote on the subject.