Categories: Network
Author: Daniel Mueller
Translation: Andrew Green
Wiki: Juergen Daubert
IPv6 is the "next generation" protocol (Sometimes called IPng) designed by the IETF to replace the current version Internet Protocol, IP Version 4 (IPv4).
Features: RFC 8200
More information can you find here: IPv6 Linux Howto
First an IPv4 address:
10.23.53.200/255.0.0.0
Now an IPv6 address:
3ffe:0b90:0a02:815b:0000:0000:0000:0012/128
Nice right ? ;-) But don't worry, you can strip it to: 3ffe:b90:a02:815b::12/128
: | is the separator (like the dot "." in IPv4 addresses) |
---|---|
:: | determines a block of leading and/or trailing zeros "0" in an address (it's a kind of compression ;-) |
/128 | defines the prefix length, also known as "netmask" (RFC 2373 "2.3 Text Representation of Address Prefixes") |
Read RFC 2373 for more information about the IPv6 addressing architecture.
Hehe.. that depends on what you want to do.
normally:
The USAGI (""UniverSAl"" playGround for Ipv6) Project made a lot of patches for well-known applications like netkit, yp-tools or tcp_wrappers to improve the Linux IPv6 support. http://www.linux-ipv6.org
Peter Bieringer has a good Linux-IPv6-Status page for IPv6 enabled applications. http://www.bieringer.de/linux/IPv6/status/IPv6+Linux-status-apps.html
First of all, you need an IPv6 enabled kernel. Go to your kernel source dir (usualy /usr/src/linux) and run your preferred method for kernel configuration.
(make config || make menuconfig || make xconfig) Networking options --> <M> IP: tunneling # believe me - you will need it. <M> The IPv6 protocol (EXPERIMENTAL)
optional: IPv6: Netfilter Configuration
If you chose a kernel module you'll need also an entry in /etc/modules.conf:
alias net-pf-10 ipv6
Beginning with version 1.1 CRUX comes with IPv6 enabled base packages:
ifconfig -a should print inet6 information:
danm@torax#~: /sbin/ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:01:02:06:B6:7F inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:fe06:b67f/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:313180 errors:0 dropped:0 overruns:0 frame:0 TX packets:793034 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:31306615 (29.8 Mb) TX bytes:906202803 (864.2 Mb) Interrupt:5 Base address:0xb800
One missing/incorrect entry in /etc/protocols prevents ping6 from doing it's work.
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
should be:
ipv6-icmp 58 IPv6-ICMP icmpv6 icmp6 # ICMP for IPv6
Without these entries, ping6 says "ping: icmp6: unknown protocol". If you want to use inetd applications like in.telnetd or in.ftpd you will probably need an IPv6 enabled netkit-base too.
A few network daemons use the tcpd library (tcp_wrappers). If the tcp_wrappers are not able to handle ipv6 connections you will get an error message and your application will not work.
There should be some ipv6 specific entries in /etc/hosts:
::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
IP utilities is a nice toolkit of administrative applications like ping6 or traceroute6. I highly recommend you to install this package since tools like ping make live much easier ;-)
These tools are backward compatible.
Did you install the base packages ? Yes ? So then let's setup an ipv6 netlink. The site-local address-range should be used for private networks. The site-local prefix is fec0::0/10.
More information:
First check your current settings:
danm@torax#~: /sbin/ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:01:02:06:B6:7F inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:fe06:b67f/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:313180 errors:0 dropped:0 overruns:0 frame:0 TX packets:793034 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:31306615 (29.8 Mb) TX bytes:906202803 (864.2 Mb) Interrupt:5 Base address:0xb800
My network card has the unique interface id 00:01:02:06:B6:7f (MAC; Media Access Control). The MAC was used to generate the link-local address (Scope:Link).
fe80:0000:0000:0000:0201:02ff:fe06:b67f xxxx:xxxx:xxxx:xxxx:xx01:02xx:xx06:b67f 00:01:02 : 06:B6:7F
The prefix fe80::/10 is reserved for link-local addresses. These addresses are only accessable in your local net-segment. Yes - all components plugged on your switch/hub/bridge can talk to each other with their link-local address. And yes - these addresses are determinated automatically. The site-local address-range is equivalent with the private ""IPv4"" Class A Net 10.0.0.0/8. So you can use it freely.
Let's setup eth0 with fec0:0000:0000:0000:0000:0000:0000:0001/64 (stripped fec0::1/64)
root@torax:~$ ifconfig eth0 add fec0::1/64
Check:
root@torax:~$ ifconfig eth0 | grep inet6 inet6 addr: fec0::1/64 Scope:Site inet6 addr: fe80::201:2ff:fe06:b67f/10 Scope:Link
ifconfig said "inet6 addr: fec0::1/64 Scope:Site" - the site-local address is up and usable.
Please have a look here: http://www.linuxhq.com/IPv6/radvd.html and here: http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/chapter-configuration-route.html