raphnet.net IPv6 stuff
|
Your ip: 38.107.191.83 (What!? still on IPv4?) |
Last Update: Wed Sep 15 21:28:47 EDT 2004
|
What is IPv6
IPv6 is intended to be the replacement protocol for the current internet protocol (IPv4). It enlarges the address space from
32 bits to 128 bits, so this time, there should be enough addresses for everyone (millions for each people on earth).
Having that many addresses available can put an end to Natting, and at the same time all problems created by natting.
IPv6 also provides better auto-configuration of the network hosts. Basically, this is done by building an host IP
address by using a prefix broadcasted by the routers on the link, and the mac address of the nic. With IPv6, only the
IP layer has been modified, so higher level protocols such as UDP and TCP remains the same(well almost).
For more information, visit www.ipv6.org
Configuring IPv6
This section contains basic commands and examples explaining how to configure
IPv6 and setup IPv6-over-IPv4 tunnels on different platforms. It should
be helpful for getting started.
Manual configuration under Linux
Depending on your distribution or the version of the packages you have installed,
the commands you must use may vary.
Setting the IP address:
# setting ip address
ip addr add 2001:470:1f01:115:0:0:0:3/64 dev eth0
# or
ifconfig eth0 inet6 add 2001:470:1f01:115::4
# removing ip address
ip addr del 2001:470:1f01:115:0:0:0:3/64 dev eth0
Setting the default route:
ip route add default via 2001:470:1f01:115::1 dev eth0
or
route --inet6 add default gateway 2001:470:1f01:115::1
Permanant configuration of IPv6 with Debian GNU/Linux
In the /etc/network/interfaces, add something like this:
iface eth0 inet6 static
address 2001:470:1f01:115::2
netmask 64
gateway 2001:470:1f01:115::1
Of course, substitute my addresses with yours. Note that the 'netmask'
keyword is used for the prefix length. For more information, do
a 'man interfaces' on your debian machine.
You will probably want to have the iproute, iputils-ping and
iputils-tracepath.
For more information on IPv6 and Debian, see the
Debian IPv6 Project.
Permanent configuration of IPv6 with Gentoo Linux
In the /etc/conf.d/net, add something similar to this:
inet6_eth0="2001:470:1f01:115::3"
Fixme: How to setup a default ipv6 route other that doing it manually?
See also the Gentoo IPv6 Guide.
Manual configuration under OpenBSD
ifconfig rl0 inet6 2001:470:1f01:115::4 prefixlen 64 # add address
ifconfig rl0 inet6 2001:470:1f01:115::4 delete # remove address
route -n add -inet6 default 2001:470:1f01:115::1 # default route
Manual configuration under NetBSD
Basic config:
ifconfig tlp0 inet6 2001:470:1f01:115::8 prefixlen 64 # add address
ifconfig tlp0 inet6 2001:470:1f01:115::8 delete # remove address
route add -inet6 default default_ip6_gateway_addr # default route
Setting up an IPv6-over-IPv4 tunnel:
ifconfig gif0 create
ifconfig gif0 tunnel local_ip4_addr remove_ip4_addr
ifconfig gif0 inet6 local_ip6_addr remote_ip6_addr prefixlen /128
For more information on IPv6 and NetBSD, please consult
the
NetBSD IPv6 Networking FAQ
Permanent configuration under NetBSD
To have the tunnel configured automatically at boot
time, with router advertisements, add the following lines to /etc/rc.conf:
ip6mode="router"
rtsol="NO"
rtadvd="YES" rtadvd_flags="tlp0" # set interfaces to advertise
Create the file /etc/ifconfig.gif0, with this content:
create
tunnel local_ip4_addr remote_ip4_addr
inet6 local_ip6_addr remote_ip6_addr prefixlen /128
Finally, to set the default route, the simplest way I found is to
add the following lines to /etc/rc.local:
route -n add -inet6 default_ip6_gateway_addr
Manual configuration under Solaris
ifconfig le0 inet6 plumb up
ifconfig le0 inet6 addif 2001:470:1f01:115::4 up
route add -inet6 default 2001:470:1f01:115::1
Here is a good page about IPv6 and Solaris:
http://www.optix.org/~dxy/solaris/ipv6/
IPv6-over-IPv4 tunnels across a firewall
If you want to use a machine inside your lan to route IPv6 traffic through a tunnel, you will need
to allow the ip protocol 41 to pass.
Here is a way to do it with linux iptables:
IFACE_NET=eth0
IP6_ROUTER_ADDR=192.168.1.45
IP6_TUNNEL_REMOTE=64.71.128.82
iptables -t nat -A PREROUTING -s $IP6_TUNNEL_REMOTE -p 41 -i $IFACE_NET -j DNAT --to $IP6_ROUTER_ADDR
iptables -A FORWARD -s $IP6_TUNNEL_REMOTE -p ! ICMP -i $IFACE_NET -j ACCEPT
IPv6 Providers
Your local internet provider probably does not support IPv6. However, there are many free
IPv6 tunnel providers which you can use to get IPv6 connectivity over your IPv4 connection.
Here are a few of them: (in alphabetical order)
IPv6 Sites
Many sites now support both IPv6 and IPv4. To check if a server is accessible by IPv6, you can
use the following command:
host -t AAAA site
eg:
raph@midgar> host -t AAAA raphnet.net
raphnet.net has AAAA address 2001:470:1f01:115:1::2
All websites hosted on my servers are IPv6 Accessible:
www.raphnet.net,
mikmod.raphnet.net,
sdlcam.raphnet.net,
projects.raphnet.net,
ipv6.raphnet.net,
www.topatec.com,
www.azteca-cafe.com,
www.nihilisme.ca.
A list of IPv6 accessible sites is available on IPv6.org.
Page by Raphael Assenat.
Comments and contributions are welcome.