IPv6 router guide/ko

기본 커널 설정
젠투에 있는 임의의 2.6 버전대 커널 트리에는 IPv6 연결을 손쉽게 지원합니다. 새 USAGI IPv6 스택을 리눅스 커널 버전 2.6.0부터 통합했습니다.

이제 커널 소스 디렉터리에 들어갈 준비가 끝났으니 실제 커널 설정을 진행하겠습니다.

IPv6 지원 시험
추천 옵션을 활성화한 다음 커널을 다시 활성화하고 IPv6를 활성화한 커널로 다시 부팅하십시오.

iproute2를 아직 설치하지 않았다면, 지금 진행하는것이 좋습니다. iproute2는 ip가 들어있는 네트워크 설정 도구 모음이며, ifconfig, route, iptunnel 등을 대체하는 유명한 프로그램입니다.

IPv6rk 동작한다면, 루프백 장치에서 IPv6 주소를 보여줘야 합니다:

Before going any further, make sure that you add ipv6 to your list of USE variables in, so that future emerges of packages will include IPv6 support.

기본 설정
Most ISPs still do not offer any native IPv6 connections. To get around this limitation, there are several "tunnel brokers" around the globe that offer free IPv6 tunnels. This will allow you to tunnel all your IPv6 connections through an IPv4 connection.

Below are two examples for setting up a tunnel with two popular North American tunnels, Hurricane Electric (applies for non-heartbeat tunnels from sixxs.net as well) and Freenet6.

Hurricane Electric
Hurricane Electric (HE for short) offers free IPv6 tunnels and allocates a /64 block of addresses for you. It also allows configuration of reverse DNS. Getting a tunnel from HE is as easy as going to https://www.tunnelbroker.net/ and filling out a one page form.

After you have a tunnel approved and have a /64 block allocated, you can configure your Gentoo box. HE provides sample configurations based on ifconfig and the iproute utilities. The following two examples assume you have the following configuration:

Using the iproute2 package and the  command, you would do the following.

Create a tunnel between the local (eth0) IPv4 and HE's remote IPv4 address:

Extract the tunneling overhead from the MTU:

Bring the tunnel up:

Assign the IPv6 address to it:

Route all global unicast IPv6 addresses through our 'sixbone' tunnel device:

The following example shows how to establish this at boot time:

To make this device start on boot:

When tunneling IPv6 over IPv4, the packets will first come through the IPv4 chain before being passed to the IPv6 chain.

Freenet6
Freenet6 is another free tunnel broker. Optional registration only requires a username and a valid email address. They have chosen to turn the tunnel management into a client/server setup and have created the  client. The client is available in Portage. To install it do:

Now if you chose to connect with authentication, you need to configure  by editing. You should only have to change the userid and passwd fields to match those assigned from Freenet6 and change the gateway server. Below is a sample config file.

연결 시험
Now that your tunnel is configured, you can test your connection. The easiest way to do this is to use the  utility and try to ping an IPv6 host.

Further work is currently in progress to add better IPv6 support to the network init scripts. If you'd like to know the status of this and/or help out, email.

꾸러미 재 이머지
Unless you had USE="ipv6" in your previously, you probably need to re-emerge a bunch of packages to compile in IPv6 support for them. To get a list of all the installed packages which are affected by USE flag changes, use Portage's   option:

If you have changed a lot of USE flags, the list could be quite long. It's suggested to keep your system up-to-date, so it won't hurt if you recompile all affected packages.

IPv6 전용 꾸러미
There are a few packages which specifically deal with IPv6 items. Most of these are located in.

IPv6과 DNS
Just as DNS for IPv4 uses A records, DNS for IPv6 uses AAAA records. (This is because IPv4 is an address space of 2^32 while IPv6 is an address space of 2^128). For reverse DNS, the INT standard is deprecated but still widely supported. ARPA is the latest standard. Support for the ARPA format will be described here.

연결 시험
Recent versions of BIND include excellent IPv6 support. This section will assume you have at least minimal knowledge about the configuration and use of BIND. We will assume you are not running bind in a chroot. If you are, simply append the chroot prefix to most of the paths in the following section.

First you need to add entries for both forward and reverse DNS zone files in.

Now we must create those zone files and add entries for all of our hosts:

DJBDNS configuration
There are currently some third-party patches to DJBDNS available at http://www.fefe.de/dns/ that allow it to do IPv6 nameserving. DJBDNS can be installed with these patches by emerging it with ipv6 in your USE variables.

After djbdns is installed, it can be setup by running  and answering a few questions about which IP addresses to bind to, where to install tinydns, etc.

Assuming we've installed  into, we can now edit. This file will contain all the data needed to get tinydns handling DNS for your IPv6 delegation.

Lines prefixed with a  will have both an AAAA and a PTR record created. Those prefixed with a  will only have an AAAA record created. Besides manually editing the file, you can use the scripts   and   to add new entries. After changes are made to the file, you simply need to run   from. This will create, which tinydns will use as its source of information for DNS requests.

라우팅 설정
Further configuration is required if we want to use our system as a router for other clients wishing to connect to the outside world with IPv6. We need to enable forwarding of IPv6 packets. We can do this in one of two ways.

Either we set the value 1 in the forwarding pseudo-file:

Or we use the  command:

To enable forwarding at boot, you'll need to edit and add the following line.

Traffic should now be forwarded from this box through the tunnel we've established with our broker.

To assign IPv6 addresses to clients, the IPv6 specification allows for both stateless and stateful IP assignment. Stateless assignment uses a process called Router Advertisement and allows clients to obtain an IP and a default route by simply bringing an interface up. It is called "stateless" because there is no record of IPs assigned and the host they are assigned to. Stateful assignment is handled by DHCPv6. It is "stateful" because the server keeps a state of the clients who've requested IPs and received them.

Stateless Configuration
Stateless configuration is easily accomplished using the Router Advertisement Daemon, or.

After having emerged, we need to create  that contains information about what IP block to assign IPs from. Here is a sample file using the prefix we've been assigned from our tunnel broker.

Further information is available in. We can now start  and set it to start at boot.

Stateful Configuration
If you'd like to have stateful configuration, you'll need to install and configure.

Now we must configure the dibbler client by editing.

We can now start the dibbler client, and configure it to start at boot.

radvd 사용하기
Clients behind this router should now be able to connect to the rest of the net via IPv6. If using radvd, configuring hosts should be as easy as bringing the interface up. (This is probably already done by your net.ethX init scripts).

Should this not work ensure that your IPv6 firewall is allowing ICMPv6 packets through:

Other Resources
There are many excellent resources online pertaining to IPv6.

On IRC, you can try  on Freenode. You can connect to the Freenode servers using an IPv6 enabled client by connecting to irc.ipv6.freenode.net.