Skip to topic | Skip to bottom
Home
Freebsd
Freebsd.IpV6Howtor1.4 - 13 Sep 2002 - 20:43 - KirkStrausertopic end

Start of topic | Skip to actions



Mirrored from the original page hosted by Robert at http://www.quantum-radio.net/Admin/ipv6howto.html with only minimal markup (so far) by KirkStrauser.

6to4, or IPv6 to IPv4 How To information for FreeBSD 4.5 and 5.0. (6Bone?)

Disclaimer:

The setups and texts on this page are not claimed to be "the last word". What it is, is the configurations and setups discoverd in my road to establishing a 6to4 network that was operable. The main goal? To begin the learning curve to successful IPv6 implementation. I chose the 6to4 route, because I already have a "C" class IP block, and IPv4 will certainly still be around long after I'm not. IPv6 will however steadily make it's presence felt, and it seems like a good idea to get to know it sooner - rather than later. Or even too late!

There are thousands of places with information on IPv6 - not all of it comprehensible. There are NO sites that I could find with WORKING config files on display, especially for the FreeBSD community.

There are also lots of mailing lists, but these are thinly populated and can take ages to solve immediate problems. IPv6 is really NEW territory still.

There is a NEW FreeBSD oriented mailing list now: 6to4@chalmers.com.au

To Subscribe send the message subscribe 6to4 your@email.address

To majordomo@chalmers.com.au

Introduction

You may not know this, but you already have IPv6 addresses. There is a feature called 6 to 4 which means any IPv4 address can be translated not only into one IPv6 address but many.

A 6 to 4 IPv6 address looks like 2002:hhhh:hhhh::1 The hhhh:hhhh is the hexadecimal equivalent of your IPv4 address.

How it works

To explain how this protocol works, imagine you have your computer, a gateway, an IPv6 server and a 6to4 router. You setup a one-way tunnel from your computer to the gateway. This gateway will see IPv6 in IPv4 packets from you and route them normally to the server. The IPv6 server sees a "normal" IPv6 host (yours) and sends the reply.

Now the magic! Certain routers out on the Internet understand 6to4 packets, everyone else just sees normal IPv6 packets. These routers advertise routes for either the whole 2002::/16 block or parts of it (for example if they are close to some IPv4 address blocks they may advertise the 6to4 equivalents). Standard ipv6 routers see these advertisements and send your reply to a 6to4 router. The 6to4 router knows this is a special packet, so then creates a IPv6 over IPv4 tunnel to your host and sends the packet.

The whole point is, if you can get your IPv6 packets into the IPv6 network somehow, then if you use 6to4 you're connected. Great for dialup users.

See my setups, for 4.5 and for 5.0 FreeBSD.

See an excellent article at http://www.onlamp.com/pub/a/bsd/2002/02/22/ipv6.html Be aware though that this article - like my howto, will almost certainly differ slightly from what you have on YOUR machine.

How to do it First, convert your IPv4 address into a 6to4 address. Using sh for address 10.1.2.3:

$ printf "%02x%02x:%02x%02x\n" 10 1 2 3; 0a01:0203

So I've got the block 2002:0a01:0203::/48 to play with, a whole 2^80 addresses, which should be plenty for you. We'll assume you take the first ipv6 address, 2002:0a01:0203::1

This will all become clear when you install and start freenet6's tspc sctipt.

Freenet6 Installation and Setup. A small HowTo?

The package tspc is on FreeBSD already - /usr/ports/net/tspc. But before you blindly install it, just follow a few simple steps.

Make sure your Kernel is IPv6 ready. Edit your kernel config file. Versions earlier than 4.5 I think handle the gif interface differently. You have to put in the number of devices to enable. Later versions handle it automatically. *** Check this. I can't find any definative answers on the subject.

# cd /usr/src/sys/i386/conf # $EDITOR MYKERNEL

options INET6 pseudo-device gif pseudo-device faith 1 pseudo-device stf

(In case you use a Firewall and wish to test the firewall with ipv6, add these strings )

options IPV6FIREWALL options IPV6FIREWALL_VERBOSE options IPV6FIREWALL_VERBOSE_LIMIT=100 options IPV6FIREWALL_DEFAULT_TO_ACCEPT

Save your kernel file.

# config MYKERNEL # cd ../../compile/MYKERNEL # make clean depend all install

Or - with the newer FreeBSD releases, simply,

#cd /usr/src #make buildkernel KERNEL=MYKERNEL #make installkernel KERNEL=MYKERNEL

Ok, now you have an IPv6 ready kernel.

Now, install the tcpc package. This may in fact ask you to manually download the latest tspc package. It's available here. Or you can locate it easily here. http://www.freenet6.net/

If your ports version doesn't retrieve it for you, you will need to download it manually, and put the package into the /usr/ports/distfiles directory. You can then do

#cd /usr/ports/net/freenet6 #make install

Edit the tspc.conf file, which you will find usually in /usr/local/etc/tspc

The only thing you need to add initially is your username, and password issued by email from freenet6.

The package installs a startup script into /usr/local/etc/rc.d as well, but intitially it is advisable to start up manually. As the root user of course.

#/usr/local/bin/tspc -v

This will take a few moments to complete, and produce the output to your screen. It's a good idea to capture this output and print it out. You will need it to try and figure out what's happening.

You should be aware that the tspc.conf man page that lives at freenet6 is later - and slightly different to the one packaged with the tspc package. Just another of the smalll gotchas.

http://www.freenet6.net/tspc.conf.shtml http://www.freenet6.net/tspc.shtml

An excellent IPv6 FAQ for NetBSD? that covers much of the basics for FreeBSD as well. http://www.netbsd.org/Documentation/network/ipv6/ Don't let it confuse you from the above.

IPv6 Packages. No doubt there are others.

Packages can be grouped into several lists depending on how they are effected by IPv6. By publishing the lists, it is hoped there will be a co-ordinated effort and no duplication.

Non-networked

The first list, is packages that don't care at all about IPv6. These packages are not network aware so the fact that an addressing scheme has changed doesn't conern them at all. Packages that fall into this category include bash and textutils. They are no described any more here as you can just keep using the normal packages.

Mainstream IPv6

Secondly, there are packages that have been already fully converted for IPv6. This means the standard package you can get from any Debian CD or FTP site already understands IPv6. The aim of Debian-IPv6 is for the packages in the lists below to eventually be in this category.

  • apt
  • bind
  • bitchx
  • bsd-ftpd
  • exim
  • g2s
  • ifupdown
  • iproute
  • iputils-ping
  • iputils-tracepath
  • ircII
  • leafnode
  • liece-dcc
  • lftp
  • libc6
  • libpcap
  • lukemftp
  • lynx
  • mrt
  • mule2
  • net-tools
  • oidentd
  • pchar
  • pdnsd
  • ppp
  • radvd
  • rlinetd
  • rsync
  • sendip
  • sendmail
  • ssh
  • strace
  • tcpdump
  • telnet
  • emacs20-dl
  • w3m
  • w3mmee
  • whois
  • zebra

IPv6 Specific

Next are packages which don't have IPv6 support in their mainstream flavours, but someone has made a special IPv6 version.

Under Construction

There is also packages that currently don't work with IPv6, but there is someone working on making a package. These are put here so that you don't start working on something someone else is already doing.

Work Needed

Last of all are the packages that don't work with IPv6 and no-one has offered to fix them yet.

  • xinetd
  • ipgrab (In the upstream TODO list)


You are here: Freebsd > IpV6Howto

to top

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Subwiki? Send feedback