Add a section on IPv6 as required.
PR: 41109
This commit is contained in:
parent
510bc475c4
commit
ccb57dc1af
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14028
1 changed files with 293 additions and 0 deletions
|
@ -64,6 +64,10 @@
|
|||
<listitem>
|
||||
<para>How to connect two computers via PLIP.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to setup IPv6 on a FreeBSD machine.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Before reading this chapter, you should:</para>
|
||||
|
@ -5883,6 +5887,295 @@ round-trip min/avg/max/stddev = 2.530/2.643/2.774/0.103 ms</screen>
|
|||
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ipv6">
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Aaron</firstname>
|
||||
<surname>Kaplan</surname>
|
||||
<contrib>Originally Written by </contrib>
|
||||
</author>
|
||||
</authorgroup>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Tom</firstname>
|
||||
<surname>Rhodes</surname>
|
||||
<contrib>Restructured and Added by </contrib>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect1info>
|
||||
|
||||
<title>IPv6</title>
|
||||
<para>IPv6 (also know as IPng <quote>IP next generation</quote>) is
|
||||
the new version of the well known IP protocol (also know as
|
||||
<acronym>IPv4</acronym>). Like the other current *BSD systems,
|
||||
FreeBSD includes the <acronym>KAME</acronym> 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.</para>
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Running out of addresses. Today this is not so much of a concern
|
||||
anymore since private address spaces (10.0.0.0/8, 192.168.0.0/24,
|
||||
etc.) and natd address translation are being employed.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Router table entries were getting to large. This is still a concern
|
||||
today.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>IPv6 deals with these and many other issues:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>128 bit address space. In other words theoretically there are
|
||||
340,282,366,920,938,463,463,374,607,431,768,211,456 addresses
|
||||
available. This means there are approximately. 6.67 * 10^27 IPv6 addresses
|
||||
per square meter on our planet.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Routers will only store network aggregation addresses in their routing
|
||||
tables thus reducing the average space of a routing table to 8192
|
||||
entries.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>There are also lots of other useful features of IPv6 such as:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Address autoconfiguration (RFC2462)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Anycast addresses (<quote>one-out-of many</quote>)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Mandatory multicast addresses</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>IPSec (IP Security)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Simplified header structure</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Mobile <acronym>IP</acronym></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>IPv4-to-IPv6 transition mechanisms</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
<para>For more information see:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>IPv6 overview at <ulink url="http://www.sun.com">Sun.com</ulink></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><ulink url="http://www.ipv6.org">IPv6.org</ulink></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><ulink url="http://www.kame.net">KAME.net</ulink></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><ulink url="http://www.6bone.net">6bone.net</ulink></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<sect2>
|
||||
<title>Background on IPv6 Addresses</title>
|
||||
<para>There are different types of IPv6 addresses: Unicast, Anycast and
|
||||
Multicast.<para>
|
||||
|
||||
<para>Unicast addresses are the well known addresses. A packet sent
|
||||
to a unicast address arrives exactly at the interface belonging to
|
||||
the address.</para>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>Multicast addresses identify a group of interfaces. A packet destined
|
||||
for a multicast address will arrive at all interfaces belonging to the
|
||||
multicast group.</para>
|
||||
|
||||
<note><para>The IPv4 broadcast address (usually xxx.xxx.xxx.255) is expressed
|
||||
by multicast addresses in IPv6.</para></note>
|
||||
|
||||
<para>Reserved IPv6 addresses:</para>
|
||||
|
||||
<screen>ipv6-address prefixlength(Bits) description Notes
|
||||
|
||||
:: 128 Bits unspecified cf. 0.0.0.0 in IPv4 address
|
||||
::1 128 Bits loopback address cf. 127.0.0.1 in IPv4
|
||||
::00:xx:xx:xx:xx 96 Bits embedded IPv4 The lower 32 bits are the
|
||||
address IPv4 address. Also called
|
||||
<quote>IPv4 compatible IPv6
|
||||
address</quote>
|
||||
::ff:xx:xx:xx:xx 96 Bits IPv4 mapped The lower 32 bits are the
|
||||
IPv6 address IPv4 address. For hosts
|
||||
which do not support IPv6
|
||||
fe80:: - feb:: 10 Bits link-local cf. loopback address in
|
||||
IPv4
|
||||
fec0:: - fef:: 10 Bits site-local
|
||||
ff:: 8 Bits multicast
|
||||
001 (base 2) 3 Bits global unicast All global unicast
|
||||
addresses are assigned from
|
||||
this pool. The first 3 Bits
|
||||
are <quote>001</quote>.</screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Reading IPv6 Addresses</title>
|
||||
<para>The canonical form is represented as: x:x:x:x:x:x:x:x, each
|
||||
<quote>x</quote> being a 16 Bit hex value. For example
|
||||
FEBC:A574:382B:23C1:AA49:4592:4EFE:9982</para>
|
||||
|
||||
<para>Often an address will have long substrings of all zeros therefore each
|
||||
such substring can be abbreviated by <quote>::</quote>. For example fe80::1
|
||||
corresponds to the canonical form fe80:0000:0000:0000:0000:0000:0000:0001</para>
|
||||
|
||||
<para>A third form is to write the last 32 Bit part in the well known (decimal)
|
||||
IPv4 style with dots <quote>.</quote> as separators. For example 2002::10.0.0.1
|
||||
corresponds to the (hexadecimal) canonical representation
|
||||
2002:0000:0000:0000:0000:0000:000a:0001 which in turn is equivalent to
|
||||
writing 2002::a:1</para>
|
||||
|
||||
<para>By now the reader should be able to understand the following:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ifconfig</userinput></screen>
|
||||
|
||||
<programlisting>rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
|
||||
inet 10.0.0.10 netmask 0xffffff00 broadcast 10.0.0.255
|
||||
inet6 fe80::200:21ff:fe03:8e1%rl0 prefixlen 64 scopeid 0x1
|
||||
ether 00:00:21:03:08:e1
|
||||
media: Ethernet autoselect (100baseTX )
|
||||
status: active</programlisting>
|
||||
|
||||
<para>fe80::200:21ff:fe03:8e1%rl0 is an auto configured link-local address. It
|
||||
includes the enscrambled Ethernet MAC as part of the auto configuration.</para>
|
||||
|
||||
<para>For further information on the structure of IPv6 addresses see RFC2373</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Getting Connected</title>
|
||||
|
||||
<para>Currently there are four ways to connect to other IPv6 hosts and networks:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Join the experimental 6bone</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Getting an IPv6 network from your upstream provider. Talk to your
|
||||
Internet provider for instructions.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Tunnel via 6-to-4</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Use the freenet6 port if you are on a dial-up connection.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Here we will talk on how to connect to the 6bone since it currently seems
|
||||
to be the most popular way.</para>
|
||||
|
||||
<para>First take a look at the 6bone site and find a 6bone connection nearest to
|
||||
you. Write to the responsible person and with a little bit of luck you
|
||||
will be given instructions on how to set up your connection. Usually this
|
||||
involves setting up a GRE (gif) tunnel.</para>
|
||||
|
||||
<para>Here is a typical example on setting up a &man.gif.4; tunnel:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>ifconfig create gif0</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>ifconfig gif0</userinput></screen>
|
||||
<screen>gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280</screen>
|
||||
<screen>&prompt.root; <userinput>ifconfig tunnel MY_IPv4_ADDR HIS_IPv4_ADDR</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>ifconfig gif0 inet6 alias MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR</userinput></screen>
|
||||
|
||||
<para>Replace the capitalized words by the information you received from the
|
||||
upstream 6bone node</para>
|
||||
|
||||
<para>This establishes the tunnel. Check if the tunnel is working by &man.ping6.8;
|
||||
'ing ff02::1%gif0. You should receive two ping replies.</para>
|
||||
|
||||
<note><para>In case you are intrigued by the address ff02:1%gif0, this is a
|
||||
multicast address. %gif0 states that the multicast address at network
|
||||
interface gif0 is to be used. Since we <command>ping</command> a multicast address the
|
||||
other endpoint of the tunnel should reply as well).</para></note>
|
||||
|
||||
<para>By now setting up a route to your 6bone uplink should be rather
|
||||
straightforward:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>route add -inet6 default -interface gif0</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>ping6 -n MY_UPLINK</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>traceroute6 www.jp.freebsd.org</userinput></screen>
|
||||
<programlisting>(3ffe:505:2008:1:2a0:24ff:fe57:e561) from 3ffe:8060:100::40:2, 30 hops max, 12 byte packets
|
||||
1 atnet-meta6 14.147 ms 15.499 ms 24.319 ms
|
||||
2 6bone-gw2-ATNET-NT.ipv6.tilab.com 103.408 ms 95.072 ms *
|
||||
3 3ffe:1831:0:ffff::4 138.645 ms 134.437 ms 144.257 ms
|
||||
4 3ffe:1810:0:6:290:27ff:fe79:7677 282.975 ms 278.666 ms 292.811 ms
|
||||
5 3ffe:1800:0:ff00::4 400.131 ms 396.324 ms 394.769 ms
|
||||
6 3ffe:1800:0:3:290:27ff:fe14:cdee 394.712 ms 397.19 ms 394.102 ms</programlisting>
|
||||
|
||||
<para>This output will differ from machine to machine. By now you should be
|
||||
able to reach the IPv6 site <ulink url="http://www.kame.net">www.kame.net</ulink>
|
||||
and see the dancing tortoise - that is if you have a IPv6 enabled browser such as
|
||||
<filename role="package">mozilla+ipv6</filename>.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>DNS in the IPv6 World</title>
|
||||
<para>There are two new types of DNS records for IPv6:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>AAAA records,</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>A6records</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Using AAAA records is straightforward. Assign your hostname to the new
|
||||
IPv6 address you just got by adding:</para>
|
||||
|
||||
<programlisting>MYHOSTNAME AAAA MYIPv6ADDR</programlisting>
|
||||
|
||||
<para>To your primary zone DNS file. In case you don't serve your own
|
||||
<acronym>DNS</acronym> zones ask your <acronym>DNS</acronym> provider.
|
||||
Current versions of <application>bind</application> (version 8.3 and 9)
|
||||
support AAAA records.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in a new issue