![]() |
Now serving 108 guides. |
|
Configuring An IPv6 Router And Client General Information This is part 1 of our upcoming series on IPv6. In this article we will explain how to setup and configure a FreeBSD router and client for IPv6. In upcoming articles you will learn how to configure and setup Windows Clients as well as OpenBSD routers and clients.What is IPv6? By now, you've probably heard of the next generation Internet Protocol, IPv6. While it provides many improvements and new capabilities, the driving force behind its adoption is likely to be the much larger (and more flexible) address space that it defines. Continuing growth in the population of IP enabled devices has already put severe stress on address allocation and the routing infrastructure. The roll out of new enabling technologies, such as 3G wireless and broadband to the home, will predictably create a new wave of demand. Now the scope of this article is just going to cover how to setup IPv6 on various BSD platforms. This is going to be a very basic how-to on getting it setup and properly working.Now let's learn a little bit about IPv6. Here's what the FreeBSD Handbook has to say: "IPv6 (also know as IPng "IP next generation") is the new version of the well known IP protocol (also known as IPv4). Like the other current *BSD systems, FreeBSD includes the KAME IPv6 reference implementation. So your FreeBSD system comes with all you will need to experiment with IPv6. This section focuses on getting IPv6 configured and running." In the early 1990s, people became aware of the rapidly diminishing address space of IPv4. Given the expansion rate of the Internet there were two major concerns:
IPv6 Background Information There are different types of IPv6 addresses: Unicast, Anycast and Multicast.Unicast addresses are the well known addresses. A packet sent to a unicast address arrives exactly at the interface belonging to the address. Anycast addresses are syntactically indistinguishable from unicast addresses but they address a group of interfaces. The packet destined for an anycast address will arrive at the nearest (in router metric) interface. Anycast addresses may only be used by routers. Multicast addresses identify a group of interfaces. A packet destined for a multicast address will arrive at all interfaces belonging to the multicast group. Note: The IPv4 broadcast address (usually xxx.xxx.xxx.255) is expressed by multicast addresses in IPv6. Reserved IPv6 addresses:
Reading IPv6 Addresses The canonical form is represented as: x:x:x:x:x:x:x:x, each "x" being a 16 Bit hex value. For example, FEBC:A574:382B:23C1:AA49:4592:4EFE:9982Often an address will have long substrings of all zeros; therefore, each such substring can be abbreviated by "::". For example, fe80::1 corresponds to the canonical form fe80:0000:0000:0000:0000:0000:0000:0001 A third form is to write the last 32-bit part in the well known (decimal) IPv4 style with dots "." as separators. For example, 2002::10.0.0.1 corresponds to the (hexadecimal) canonical representation 2002:0000:0000:0000:0000:0000:0a00:0001 which in turn is equivalent to writing 2002::a00:1 By now the reader should be able to understand the following:
For further information on the structure of IPv6 addresses see RFC2373. Picking Your Broker Ok so now this is where things get fun. First of all, let's talk for a second about your choices of tunnel brokers. You're going to need one of these to get your IPv6 connection going.Freenet6 is a quick and easy way to get an IPv6 address and establish a tunnel. What makes it so easy is its Tunnel Setup Protocol (TSP) client. The program, available here, automatically gets your IPv6 address and establishes a tunnel with the Freenet6 servers. The program can be run without registering, but registration lets you get a /48 prefix (anonymous connections are given /64 addresses), and it lets you keep the same address, regardless of IPv4 address changes. he.net tunnel service runs by a Business ISP with 24 x 7 staff at multiple locations and a national US backbone (to find out more about IPv6 at Hurricane Electric visit http://ipv6.he.net/). Gain the ability to get your own /64 prefix once your tunnel is up and get a full view of the IPv6 BGP4+ routing table. Now I've played around with both of these tunnel providers. Although Freenet6 offers a /48 prefix he.net has much better tools. They also offer usage graphs on their site. So in this article were going to utilize the he.net service. So, let's get our account shall we? Head over to he.net and register down there on the bottom. Don't forget to tell them you heard about us on bsdhound.com. Once you get your email back, log back into their servers and you need to tell them your IPv4 address. This is important since IPv6 is not the current standard you're going to need to embed your 6 packets inside 4 packets. Once you get your email around the next day or two saying your tunnel is approved you can continue on. And don't forget to sign up for the /64 prefix. Your going to need that if you wish to do any kind of routing. Configuration Know Your Network We're going to make a basic 2 computer network here: Your server and your client.Now we're going to setup the gateway as a nice friendly FreeBSD box and the client we're going to go over setting it up as a FreeBSD client. In later articles I will cover how to do this in OpenBSD and also setup a Windows 2000 client. First here's our tunnel information given to us from tunnelbroker:
Configuring the Gateway on FreeBSD Now let's start with the fun. Let's go and edit our/etc/rc.conf so our system knows about our new toy.
/etc/rc.local and add something like this:
/etc/sysctl.conf and add these lines in there:
/etc/rtadvd.conf and file it should contain something like the following:
Inside your /etc/ipf.rules you should have a pass our in and out rule for each interface to allow the IPv6 packets.
/etc/ipf6.rules
/etc/hosts file. Here we have something like this:
When your system comes back online, try pinging and if you get a return response your good to go. You should see something similar to this:
Configuring A FreeBSD IPv6 Client Now the hard part is done you have a routing IPv6 stack. So we just need to tell our clients there is an address available and to use it. First, we need to tell our client to accept RA broadcasts. Go and edit your/etc/sysctl.conf file and add in the following:
Note: Replace
ping6 www.6bone.net from the client. Now I would suggest you add the rtsol command to your /etc/rc.local to avoid future headache's. Some other configurations you will need to do are (these are not required but nice to have):
References OnlampDaemon News FreeBSD Handbook Author: Leigh Renfrow |
Copyright 2003 - 2010 BSD Guides. All rights reserved. |
About | Terms of Use | Privacy | Contact |

