summaryrefslogtreecommitdiffstats
path: root/share/examples/IPv6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-06-11 12:39:29 +0000
committerume <ume@FreeBSD.org>2001-06-11 12:39:29 +0000
commit832f8d224926758a9ae0b23a6b45353e44fbc87a (patch)
treea79fc7ad2b97862c4a404f352f0211ad93a7b5f1 /share/examples/IPv6
parent2693854b01a52b0395a91322aa3edf926bddff38 (diff)
downloadFreeBSD-src-832f8d224926758a9ae0b23a6b45353e44fbc87a.zip
FreeBSD-src-832f8d224926758a9ae0b23a6b45353e44fbc87a.tar.gz
Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT. Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
Diffstat (limited to 'share/examples/IPv6')
-rw-r--r--share/examples/IPv6/USAGE526
1 files changed, 196 insertions, 330 deletions
diff --git a/share/examples/IPv6/USAGE b/share/examples/IPv6/USAGE
index 5a02037..d9191899 100644
--- a/share/examples/IPv6/USAGE
+++ b/share/examples/IPv6/USAGE
@@ -1,12 +1,12 @@
- USAGE
-
- KAME Project
- http://www.kame.net/newsletter/
- $FreeBSD$
+ USAGE
+ KAME Project
+ $KAME: USAGE,v 1.33 2000/11/22 10:22:57 itojun Exp $
+ $FreeBSD$
This is a introduction of how to use the commands provided in the KAME
kit. For more information, please refer to each man page.
+
<<<ifconfig>>>
A link-local address is automatically assigned to each interface, when
@@ -14,6 +14,11 @@ the interface becomes up for the first time. Even if you find an interface
without a link-local address, do not panic. The link-local address will be
assigned when it becomes up (with "ifconfig IF up").
+If you do not see a link-local address assigned to an interface on "ifconfig
+up", the interface does not support IPv6 for some reasons - for example,
+if the interface does not support link-layer multicast (IFF_MULTICAST is not
+set), the interface cannot be used for IPv6.
+
Some network drivers allow an interface to become up even without a
hardware address (for example, PCMCIA network cards). In such cases, it is
possible that an interface has no link-local address even if the
@@ -21,190 +26,187 @@ interface is up. If you see such situation, please disable the
interface once and then re-enable it (i.e. do `ifconfig IF down;
ifconfig IF up').
-Pseudo interfaces (like "gif" tunnel device) will borrow IPv6 interface
-identifier (lowermost 64bit of the address) from EUI64/IEEE802 sources,
-like ethernet cards. Pseudo interfaces will be able to get IPv6 link-local
-address, if you have other "real" interface configured beforehand.
-If you have no EUI64/IEEE802 sources on the node, you may need to configure
-link-local address manually. Though we have last-resort code in the kernel,
-which generates interface identifier from MD5(hostname), it may not suitable
-for your usage (for example, if you configure same hostname on both sides
-of gif tunnel, you will be doomed).
+Pseudo interfaces (like "gif" tunnel device) will borrow IPv6
+interface identifier (lowermost 64bit of the address) from
+EUI64/IEEE802 sources, like ethernet cards. Pseudo interfaces will be
+able to get an IPv6 link-local address, if you have other "real"
+interface configured beforehand. If you have no EUI64/IEEE802 sources
+on the node, we have last-resort code in the kernel, which generates
+interface identifier from MD5(hostname). MD5(hostname) may not be suitable
+for your usage (for example, if you configure same hostname on both sides of
+gif tunnel, you will be doomed), and if so, you may need to configure
+link-local address manually.
+See RFC2472 for more discussion on how to generate an interface ID for
+pseudo interfaces.
If you have a router announcing Router Advertisement,
-global addresses will be assigned automatically. So, "ifconfig" is not
-necessary for your *host*. (Please refer to "sysctl" section for configuring
-a host to accept Router Advertisement.)
+global addresses will be assigned automatically. So, neither
+"ifconfig" nor "prefix" is necessary for your *host* (non-router node).
+(Please refer to "sysctl" section for configuring a host to accept
+Router Advertisement.)
If you want to set up a router, you need to assign global addresses
-for two or more interfaces by "ifconfig" or "prefix". (prefix command
-is described at next section)
+for two or more interfaces by "ifconfig" or "prefix" (prefix command
+is described at next section).
If you want to assign a global address by "ifconfig", don't forget to
specify the "alias" argument to keep the link-local address.
-# ifconfig de0 inet6 fec0:0:0:1000:200:f8ff:fe01:6317 alias
+# ifconfig de0 inet6 3ffe:501:808:1:200:f8ff:fe01:6317 prefixlen 64 alias
# ifconfig de0
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.202.12 netmask 0xffffff00 broadcast 172.16.202.255
- inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64
- inet6 fec0:0:0:1000:200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:1000:: prefixlen 64 anycast
- ether 00:00:f8:01:63:17
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
+ inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64 scopeid 0x1
+ inet 163.221.202.12 netmask 0xffffff00 broadcast 163.221.202.255
+ inet6 3ffe:501:808:1:200:f8ff:fe01:6317 prefixlen 64
+ ether 00:00:f8:01:63:17
+ media: 100baseTX status: active
See also "/etc/rc.network6" for actual examples.
<<prefix>>
-In IPv6 architecture, an IPv6 address of an interface can be generated
-from a prefix assigned to it, and a link-dependent identifier for the
-interface. Assigning a full IPv6 address by ifconfig is not
-necessary anymore, because, user can only take care of prefix, by letting
-system take care of interface identifier.
+In the IPv6 architecture, an IPv6 address of an interface can be
+generated from a prefix assigned to the interface, and a
+link-dependent identifier for the interface. So assigning a full IPv6
+address by ifconfig is not necessary anymore, because user can only
+take care of prefix, by letting system take care of interface
+identifier.
The newly added "prefix" command enables user to just assign prefixes
for interfaces, and let your system automatically generate IPv6
addresses. Prefixes added by the "prefix" command is maintained in
the kernel consistently with prefixes assigned by Router
-Renumbering(in case of routers).
-
-But "prefix" command can only be used on router, because host should be
-able to configure its addr automatically. Prefixes added by the "prefix"
-command are maintained independently from prefixes assigned by
-Router Advertisement. Those two type of prefixes should not coexist on
-a machine at the same time, and when it happens, it is considered to be
-miss configuration.
+Advertisement (in case of hosts) and with prefixes assigned by Router
+Renumbering (in case of routers). Manual assignment of prefixes or
+change of prefix properties take precedence over ones assigned by
+Router Advertisement or Router Renumbering.
-Manual assignment of prefixes or change of prefix properties take
-precedence over ones assigned by Router Renumbering.
+prefix command works only on routers.
-If you want to assign a prefix(and consequently an address) manually, do
+If you want to assign a prefix (and consequently address) manually, do
as follows:
-# prefix de0 fec0:0:0:1000::
# ifconfig de0
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.202.12 netmask 0xffffff00 broadcast 172.16.202.255
- inet6 fe80:1::200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:1000:200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:1000:: prefixlen 64 anycast
- ether 00:00:f8:01:63:17
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
+ inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64 scopeid 0x1
+ inet 163.221.202.12 netmask 0xffffff00 broadcast 163.221.202.255
+ ether 00:00:f8:01:63:17
+ media: 100baseTX status: active
+# prefix de0 3ffe:501:808:1::
+# ifconfig de0
+de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
+ inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64 scopeid 0x1
+ inet 163.221.202.12 netmask 0xffffff00 broadcast 163.221.202.255
+ inet6 3ffe:501:808:1:200:f8ff:fe01:6317 prefixlen 64
+ ether 00:00:f8:01:63:17
+ media: 100baseTX status: active
-To check assigned prefix, use the "ndp" command. (See description of
-ndp command about its usage)
+To check assigned prefix, use the "ndp" command (See description of
+ndp command about its usage).
# ndp -p
-fec0:0:0:1000::/64 if=de0
- flags=LA, vltime=2592000, pltime=604800, expire=Never
+3ffe:501:808:1::/64 if=de0
+ flags=LA, vltime=2592000, pltime=604800, expire=Never, origin=RR
No advertising router
The "prefix" command also has node internal prefix renumbering
ability.
-If you have multiple prefixes which have fec0:0:0:1000:/56 at the top,
-and would like to renumber them to fec0:0:0:2000:/56, then use the
+If you have multiple prefixes which have 3ffe:501:808:/48 at the top,
+and would like to renumber them to 3ffe:501:4819:/48, then use the
"prefix" command with the "matchpr" argument and the "usepr" argument.
Suppose that current state of before renumbering as follows:
# ifconfig de0
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.202.12 netmask 0xffffff00 broadcast 172.16.202.255
- inet6 fe80:1::200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:1000:200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:1000:: prefixlen 64 anycast
- ether 00:00:f8:01:63:17
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
-
+ inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64 scopeid 0x1
+ inet 163.221.202.12 netmask 0xffffff00 broadcast 163.221.202.255
+ inet6 3ffe:501:808:1:200:f8ff:fe01:6317 prefixlen 64
+ ether 00:00:f8:01:63:17
+ media: 100baseTX status: active
# ifconfig de1
de1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.203.12 netmask 0xffffff00 broadcast 172.16.203.255
- inet6 fe80:1::200:f8ff:fe55:7011 prefixlen 64
- inet6 fec0:0:0:1001:200:f8ff:fe55:7011 prefixlen 64
- inet6 fec0:0:0:1001:: prefixlen 64 anycast
+ inet6 fe80::200:f8ff:fe55:7011%de1 prefixlen 64 scopeid 0x2
+ inet 163.221.203.12 netmask 0xffffff00 broadcast 163.221.203.255
+ inet6 3ffe:501:808:2:200:f8ff:fe55:7011 prefixlen 64
ether 00:00:f8:55:70:11
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
-
+ media: 100baseTX status: active
# ndp -p
-fec0:0:0:1000::/64 if=de0
- flags=LA, vltime=2592000, pltime=604800, expire=Never
+3ffe:501:808:1::/64 if=de0
+ flags=LA, vltime=2592000, pltime=604800, expire=Never, origin=RR
No advertising router
-fec0:0:0:1001::/64 if=de1
- flags=LA, vltime=2592000, pltime=604800, expire=Never
+3ffe:501:808:2::/64 if=de1
+ flags=LA, vltime=2592000, pltime=604800, expire=Never, origin=RR
No advertising router
Then do as follows:
-# prefix -a matchpr fec0:0:0:1000:: mp_len 56 usepr fec0:0:0:2000:: up_uselen 56 change
+# prefix -a matchpr 3ffe:501:808:: mp_len 48 usepr 3ffe:501:4819:: up_uselen 48 change
If command is successful, prefixes and addresses will be renumbered as
follows.
# ifconfig de0
de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.202.12 netmask 0xffffff00 broadcast 172.16.202.255
- inet6 fe80:1::200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:2000:200:f8ff:fe01:6317 prefixlen 64
- inet6 fec0:0:0:2000:: prefixlen 64 anycast
- ether 00:00:f8:01:63:17
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
+ inet6 fe80::200:f8ff:fe01:6317%de0 prefixlen 64 scopeid 0x1
+ inet 163.221.202.12 netmask 0xffffff00 broadcast 163.221.202.255
+ inet6 3ffe:501:4819:1:200:f8ff:fe01:6317 prefixlen 64
+ ether 00:00:f8:01:63:17
+ media: 100baseTX status: active
# ifconfig de1
de1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
- inet 172.16.203.12 netmask 0xffffff00 broadcast 172.16.203.255
- inet6 fe80:1::200:f8ff:fe55:7011 prefixlen 64
- inet6 fec0:0:0:2001:200:f8ff:fe55:7011 prefixlen 64
- inet6 fec0:0:0:2001:: prefixlen 64 anycast
+ inet6 fe80::200:f8ff:fe55:7011%de0 prefixlen 64 scopeid 0x2
+ inet 163.221.203.12 netmask 0xffffff00 broadcast 163.221.203.255
+ inet6 3ffe:501:4819:2:200:f8ff:fe55:7011 prefixlen 64
ether 00:00:f8:55:70:11
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
+ media: 100baseTX status: active
# ndp -p
-fec0:0:0:2000::/64 if=de0
- flags=LA, vltime=2592000, pltime=604800, expire=Never
+3ffe:501:4819:1::/64 if=de0
+ flags=LA, vltime=2592000, pltime=604800, expire=Never, origin=RR
No advertising router
-fec0:0:0:2001::/64 if=de1
- flags=LA, vltime=2592000, pltime=604800, expire=Never
+3ffe:501:4819:2::/64 if=de1
+ flags=LA, vltime=2592000, pltime=604800, expire=Never, origin=RR
No advertising router
See also "/etc/rc.network6" for actual examples.
+
<<<route>>>
-If there is a router announcing Router Advertisement on the subnet,
-you don't need to add a default route for your host by yourself.
-(Please refer to "sysctl" section to accept Router Advertisement.)
+If there is a router announcing Router Advertisement on a subnet,
+you need not to add a default route for your host by hand
+(Please refer to "sysctl" section to accept Router Advertisement).
+
+If you want to add a default route manually, do like:
-If you want to add a default route manually, do as follows:
+# route add -inet6 default fe80::200:a2ff:fe0e:7543%ed0
-# route add -inet6 default fe80::200:a2ff:fe0e:7543%de0
+"default" means ::/0. In other cases, if "prefixlen" is omitted, 64
+is assumed for "prefixlen" to get along with the aggregatable address.
-"default" means ::/0.
+Note that, in IPv6, a link-local address should be used as gateway
+("fe80::200:a2ff:fe0e:7543%ed0" in the above). If you use global addresses,
+ICMPv6 redirect will not work properly. Also note that we use a special form
+of link-local address as gateway. See Section 1.3 of IMPLEMENTATION for
+more details.
+For ease of configuration we recommend you to avoid static routes and run
+a routing daemon (route6d for example) instead.
-Note that, in IPv6, link-local address should be used as gateway
-("fe80::200:a2ff:fe0e:7543%de1" in the above). If you use global addresses,
-icmp6 redirect may not work properly. For ease of configuration we recommend
-you to avoid static routes and run a routing daemon (route6d for example)
-instead.
-<<<ping6>>> (This might be integrated into "ping" as "ping -6" in the future.)
+<<<ping6>>>
Reachability can be checked by "ping6". This "ping6" allows multicast
for its argument.
-% ping6 -I xl0 ff02::1
-or
-% ping6 ff02::1%xl0
+% ping6 -n -I ed0 ff02::1
+
+PING6(56=40+8+8 bytes) fe80::5254:ff:feda:cb7d --> ff02::1%ed0
+56 bytes from fe80::5254:ff:feda:cb7d%lo0, icmp_seq=0 hlim=64 time=0.25 ms
+56 bytes from fe80::2a0:c9ff:fe84:ed6c%ed0, icmp_seq=0 hlim=64 time=1.333 ms(DUP!)
+56 bytes from fe80::5254:ff:feda:d161%ed0, icmp_seq=0 hlim=64 time=1.459 ms(DUP!)
+56 bytes from fe80::260:97ff:fec2:80bf%ed0, icmp_seq=0 hlim=64 time=1.538 ms(DUP!)
+56 bytes from 3ffe:501:4819:2000:5054:ff:fedb:aa46, icmp_seq=0 hlim=255 time=1.615 ms(DUP!)
-PING6(56=40+8+8 bytes) fe80::5254:ff:feda:cb7d --> ff02::1
-56 bytes from fe80::5254:ff:feda:cb7d, icmp_seq=0 hlim=64 time=0.25 ms
-56 bytes from fe80::2a0:c9ff:fe84:ed6c, icmp_seq=0 hlim=64 time=1.333 ms(DUP!)
-56 bytes from fe80::5254:ff:feda:d161, icmp_seq=0 hlim=64 time=1.459 ms(DUP!)
-56 bytes from fe80::260:97ff:fec2:80bf, icmp_seq=0 hlim=64 time=1.538 ms(DUP!)
<<<ping6 -w>>>
@@ -212,13 +214,14 @@ Name resolution is possible by ICMPv6 node information query message.
This is very convenient for link-local addresses whose host name cannot be
resolved by DNS. Specify the "-w" option to "ping6".
-% ping6 -I xl0 -w ff02::1
+% ping6 -n -I ed0 -w ff02::1
-64 bytes from fe80::5254:ff:feda:cb7d: fto.kame.net
-67 bytes from fe80::5254:ff:feda:d161: banana.kame.net
-69 bytes from fe80::2a0:c9ff:fe84:ebd9: paradise.kame.net
-66 bytes from fe80::260:8ff:fe8b:447f: taroh.kame.net
-66 bytes from fe80::2a0:c9ff:fe84:ed6c: ayame.kame.net
+64 bytes from fe80::5254:ff:feda:cb7d%lo0: fto.kame.net
+67 bytes from fe80::5254:ff:feda:d161%ed0: banana.kame.net
+69 bytes from fe80::2a0:c9ff:fe84:ebd9%ed0: paradise.kame.net
+66 bytes from fe80::260:8ff:fe8b:447f%ed0: taroh.kame.net
+66 bytes from fe80::2a0:c9ff:fe84:ed6c%ed0: ayame.kame.net
+
<<<traceroute6>>>
@@ -239,60 +242,59 @@ traceroute to tokyo.v6.wide.ad.jp (3ffe:501:0:401:200:e8ff:fed5:8923), 30 hops m
2 otemachi.v6.wide.ad.jp (3ffe:501:0:1802:260:97ff:feb6:7ff0) 27.345 ms 26.706 ms 26.563 ms
3 tokyo.v6.wide.ad.jp (3ffe:501:0:401:200:e8ff:fed5:8923) 26.329 ms 26.36 ms 28.63 ms
+
<<<ndp>>>
To display the current Neighbor cache, use "ndp":
% ndp -a
Neighbor Linklayer Address Netif Expire St Flgs Prbs
-nr60.v6.kame.net 0:60:97:c2:80:bf xl0 expired S R
-fec0:0:0:1000:2c0:cff:fe10 0:c0:c:10:3a:53 xl0 permanent R
-paradise.v6.kame.net 52:54:0:dc:52:17 xl0 expired S R
-fe80:1::200:eff:fe49:f929 0:0:e:49:f9:29 xl0 expired S R
-fe80:1::200:86ff:fe05:80da 0:0:86:5:80:da xl0 expired S
-fe80:1::200:86ff:fe05:c2d8 0:0:86:5:c2:d8 xl0 9s R
+nr60.v6.kame.net 0:60:97:c2:80:bf ed0 expired S R
+3ffe:501:4819:2000:2c0:cff:fe 0:c0:c:10:3a:53 ed0 permanent R
+paradise.v6.kame.net 52:54:0:dc:52:17 ed0 expired S R
+fe80::200:eff:fe49:f929%ed0 0:0:e:49:f9:29 ed0 expired S R
+fe80::200:86ff:fe05:80da%ed0 0:0:86:5:80:da ed0 expired S
+fe80::200:86ff:fe05:c2d8%ed0 0:0:86:5:c2:d8 ed0 9s R
-To flush the all NDP cache, execute the following by root.
+To flush all of the NDP cache entries, execute the following as root.
# ndp -c
-To display the prefix list.
+To display the prefix list:
% ndp -p
-fec0:0:0::1000::/64 if=xl0
- flags=LA, vltime=2592000, pltime=604800, expire=29d23h59m58s
+3ffe:501:4819:2000::/64 if=ed0
+ flags=LA, vltime=2592000, pltime=604800, expire=29d23h59m58s, origin=RA
advertised by
- fe80::5254:ff:fedc:5217
- fe80::260:97ff:fec2:80bf
- fe80::200:eff:fe49:f929
+ fe80::5254:ff:fedc:5217%ed0 (reachable)
+ fe80::260:97ff:fec2:80bf%ed0 (reachable)
+ fe80::200:eff:fe49:f929%ed0 (no neighbor state)
-To display the default router list.
+To display the default router list:
% ndp -r
-fe80::260:97ff:fec2:80bf if=xl0, flags=, expire=29m55s
-fe80::5254:ff:fedc:5217 if=xl0, flags=, expire=29m7s
-fe80::200:eff:fe49:f929 if=xl0, flags=, expire=28m47s
+fe80::260:97ff:fec2:80bf if=ed0, flags=, expire=29m55s
+fe80::5254:ff:fedc:5217 if=ed0, flags=, expire=29m7s
+fe80::200:eff:fe49:f929 if=ed0, flags=, expire=28m47s
+
<<<rtsol>>>
To generate a Router Solicitation message right now to get global
addresses, use "rtsol".
-# ifconfig xl0
-xl0: flags=8a43<UP,BROADCAST,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
- inet6 fe80:2::2a0:24ff:feab:839b%xl0 prefixlen 64
- ether 0:a0:24:ab:83:9b
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
-
-# rtsol xl0
-# ifconfig xl0
-xl0: flags=8a43<UP,BROADCAST,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
- inet6 fe80:2::2a0:24ff:feab:839b%xl0 prefixlen 64
- inet6 fec0:0:0:1000:2a0:24ff:feab:839b prefixlen 64
- ether 0:a0:24:ab:83:9b
- media: autoselect (10baseT/UTP) status: active
- supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
+# ifconfig ef0
+ef0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST>
+ link type ether 0:a0:24:ab:83:9b mtu 1500 speed 10Mbps
+ media 10baseT status active
+ inet6 fe80::2a0:24ff:feab:839b%ef0 prefixlen 64 scopeid 0x2
+# rtsol ef0
+# ifconfig ef0
+ef0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST>
+ link type ether 0:a0:24:ab:83:9b mtu 1500 speed 10Mbps
+ media 10baseT status active
+ inet6 fe80::2a0:24ff:feab:839b%ef0 prefixlen 64 scopeid 0x2
+ inet6 3ffe:501:4819:2000:2a0:24ff:feab:839b prefixlen 64
<<<rtsold>>>
@@ -301,18 +303,23 @@ rtsold is a daemon version of rtsol. If you run KAME IPv6 on a laptop
computer and frequently move with it, the daemon is useful since it watches
the interface and sends router solicitations when the status of the interface
changes. Note, however, that the feature is disabled by default. Please
-add -m option at invocation of rtsold.
+add -m option when invocation of rtsold.
rtsold also supports multiple interfaces. For example, you can
invoke the daemon as follows:
+
# rtsold -m ep0 cnw0
+
<<<netstat>>>
To see routing table:
-
+
# netstat -nr
-# netstat -nrl (long format with Ref and Use)
+# netstat -nrl
+ long format with Ref and Use. Note that bsdi4 does not support the
+ -l option. You should use the -O option instead.
+
<<<sysctl>>>
@@ -324,13 +331,14 @@ as follows:
# sysctl -w net.inet6.ip6.accept_rtadv=1
+
<<<gifconfig>>>
"gif" interface enables you to perform IPv{4,6} over IPv{4,6}
protocol tunneling. To use this interface, you must specify the
outer IPv{4,6} address by using gifconfig, like:
-# gifconfig gif0 172.16.198.61 172.16.11.21
+# gifconfig gif0 163.221.198.61 163.221.11.21
"ifconfig gif0" will configure the address pair used for inner
IPv{4,6} header.
@@ -345,15 +353,14 @@ The following example configures un-numbered IPv6-over-IPv4 tunnel:
The following example configures numbered IPv6-over-IPv4 tunnel:
# gifconfig gif0 10.0.0.1 10.0.0.1 netmask 255.255.255.0
-# ifconfig gif0 inet6 fec0:0:0:3000::1 fec0:0:0:3000::2 prefixlen 64 alias
+# ifconfig gif0 inet6 3ffe:501:808:5::1 3ffe:501:808:5::2 prefixlen 64 alias
IPv6 spec allows you to use point-to-point link without global IPv6
address assigned to the interface. Routing protocol (such as RIPng)
uses link-local addresses only. If you are to configure IPv6-over-IPv4
tunnel, you need not to configure an address pair for inner IPv6
header. We suggest you to use the former example (un-numbered
-IPv6-over-IPv4 tunnel) to connect to 6bone for simplicity,
-for router to router connection.
+IPv6-over-IPv4 tunnel) to connect to 6bone for simplicity.
Note that it is so easy to make an infinite routing loop using gif
interface, if you configure a tunnel using the same protocol family
@@ -361,6 +368,16 @@ for inner and outer header (i.e. IPv4-over-IPv4).
Refer to gifconfig(8) for more details.
+
+<<<6to4>>>
+
+WARNING: malicious party can abuse 6to4 relay routers/sites, read through
+internet draft draft-itojun-ipv6-transition-abuse-xx.txt before configuring it.
+
+"stf" interface enables you to perform 6to4 IPv6-over-IPv4 encapsulation,
+as documented in draft-ietf-ngtrans-6to4-06.txt. See stf(4) for details.
+
+
<<<inetd>>>
Inetd supports AF_INET and AF_INET6 sockets, with IPsec policy
@@ -368,17 +385,18 @@ configuration support.
Refer to inetd(8) for more details.
+
<<<IPsec>>>
-The current KAME supports both transport mode and tunnel mode.
-However, tunnel mode comes with some restrictions.
-http://www.kame.net/newsletter/ has more comprehensive examples.
+IPsec requires fairly complex configuration, so here we show transport
+mode only. http://www.kame.net/newsletter/ has more comprehensive
+examples.
-Let's setup security association to deploy a secure channel between
+Let us setup security association to deploy a secure channel between
HOST A (10.2.3.4) and HOST B (10.6.7.8). Here we show a little
complicated example. From HOST A to HOST B, only old AH is used.
From HOST B to HOST A, new AH and new ESP are combined.
-
+
Now we should choose algorithm to be used corresponding to "AH"/"new
AH"/"ESP"/"new ESP". Please refer to the "setkey" man page to know
algorithm names. Our choice is MD5 for AH, new-HMAC-SHA1 for new AH,
@@ -389,7 +407,7 @@ length must be equal to 16 bytes for MD5, 20 for new-HMAC-SHA1,
and 8 for new-DES-expIV. Now we choose "MYSECRETMYSECRET",
"KAMEKAMEKAMEKAMEKAME", "PASSWORD", respectively.
-OK, let's assign SPI (Security Parameter Index) for each protocol.
+OK, let us assign SPI (Security Parameter Index) for each protocol.
Please note that we need 3 SPIs for this secure channel since three
security headers are produced (one for from HOST A to HOST B, two for
from HOST B to HOST A). Please also note that SPI MUST be greater
@@ -407,7 +425,7 @@ than or equal to 256. We choose, 1000, 2000, and 3000, respectively.
(2.1)
HOST A <------ HOST B
<------
- (2.2)
+ (2.2)
(2.1)
PROTO=AH
@@ -422,7 +440,7 @@ than or equal to 256. We choose, 1000, 2000, and 3000, respectively.
KEY=PASSWORD
SPI=3000
-Now, let's setup security association. Execute "setkey" on both HOST
+Now, let us setup security association. Execute "setkey" on both HOST
A and B:
# setkey -c
@@ -442,9 +460,8 @@ spdadd 10.2.3.4 10.6.7.8 any -P out ipsec
At B:
spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
- esp/transport/10.6.7.8-10.2.3.4/require ;
-spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
- ah/transport/10.6.7.8-10.2.3.4/require ;
+ esp/transport//require
+ ah/transport//require ;
^D
To utilize the security associations installed into the kernel, you
@@ -454,7 +471,7 @@ the "ping" command has the -P option with parameter to enable AH and/or ESP.
For example:
% ping -P "out ipsec \
- ah/transport/10.0.1.1-10.0.2.2/use \
+ ah/transport//use \
esp/tunnel/10.0.1.1-10.0.1.2/require" 10.0.2.2
If there are proper SAs, this policy specification causes ICMP packet
@@ -467,165 +484,6 @@ to be AH transport mode inner ESP tunnel mode like below.
==================== AH ==================
-
-Another example using IPv6.
-
-ESP transport mode is recommended for TCP port number 110 between Host-A and
-Host-B.
-
- ============ ESP ============
- | |
- Host-A Host-B
- fec0::10 -------------------- fec0::11
-
-Encryption algorithm is blowfish-cbc whose key is "kamekame", and
-authentication algorithm is hmac-sha1 whose key is "this is the test key".
-Configuration at Host-A:
-
- # setkey -c <<EOF
- spdadd fec0::10[any] fec0::11[110] tcp -P out ipsec
- esp/transport/fec0::10-fec0::11/use ;
- spdadd fec0::11[110] fec0::10[any] tcp -P in ipsec
- esp/transport/fec0::11-fec0::10/use ;
- add fec0::10 fec0::11 esp 0x10001
- -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- add fec0::11 fec0::10 esp 0x10002
- -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- EOF
-
-and at Host-B:
-
- # setkey -c <<EOF
- spdadd fec0::11[110] fec0::10[any] tcp -P out ipsec
- esp/transport/fec0::11-fec0::10/use ;
- spdadd fec0::10[any] fec0::11[110] tcp -P in ipsec
- esp/transport/fec0::10-fec0::11/use ;
- add fec0::10 fec0::11 esp 0x10001 -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- add fec0::11 fec0::10 esp 0x10002 -m transport
- -E blowfish-cbc "kamekame"
- -A hmac-sha1 "this is the test key" ;
- EOF
-
-Note the direction of SP.
-
-
-Tunnel mode between two security gateways
-
-Security protocol is old AH tunnel mode, i.e. specified by RFC1826, with
-keyed-md5 whose key is "this is the test" as authentication algorithm.
-
- ======= AH =======
- | |
- Network-A Gateway-A Gateway-B Network-B
- 10.0.1.0/24 ---- 172.16.0.1 ----- 172.16.0.2 ---- 10.0.2.0/24
-
-Configuration at Gateway-A:
-
- # setkey -c <<EOF
- spdadd 10.0.1.0/24 10.0.2.0/24 any -P out ipsec
- ah/tunnel/172.16.0.1-172.16.0.2/require ;
- spdadd 10.0.2.0/24 10.0.1.0/24 any -P in ipsec
- ah/tunnel/172.16.0.2-172.16.0.1/require ;
- add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
- -A keyed-md5 "this is the test" ;
- add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
- -A keyed-md5 "this is the test" ;
-
-If port number field is omitted such above then "[any]" is employed. `-m'
-specifies the mode of SA to be used. "-m any" means wild-card of mode of
-security protocol. You can use this SA for both tunnel and transport mode.
-
-and at Gateway-B:
-
- # setkey -c <<EOF
- spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec
- ah/tunnel/172.16.0.2-172.16.0.1/require ;
- spdadd 10.0.1.0/24 10.0.2.0/24 any -P in ipsec
- ah/tunnel/172.16.0.1-172.16.0.2/require ;
- add 172.16.0.1 172.16.0.2 ah-old 0x10003 -m any
- -A keyed-md5 "this is the test" ;
- add 172.16.0.2 172.16.0.1 ah-old 0x10004 -m any
- -A keyed-md5 "this is the test" ;
-
-
-Making SA bundle between two security gateways
-
-AH transport mode and ESP tunnel mode is required between Gateway-A and
-Gateway-B. In this case, ESP tunnel mode is applied first, and AH transport
-mode is next.
-
- ========== AH =========
- | ======= ESP ===== |
- | | | |
- Network-A Gateway-A Gateway-B Network-B
- fec0:0:0:1::/64 --- fec0:0:0:1::1 ---- fec0:0:0:2::1 --- fec0:0:0:2::/64
-
-Encryption algorithm is 3des-cbc, and authentication algorithm for ESP is
-hmac-sha1. Authentication algorithm for AH is hmac-md5.
-Configuration at Gateway-A:
-
- # setkey -c <<EOF
- spdadd fec0:0:0:1::/64 fec0:0:0:2::/64 any -P out ipsec
- esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require
- ah/transport/fec0:0:0:1::1-fec0:0:0:2::1/require ;
- spdadd fec0:0:0:2::/64 fec0:0:0:1::/64 any -P in ipsec
- esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require
- ah/transport/fec0:0:0:2::1-fec0:0:0:1::1/require ;
- add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10001 -m tunnel
- -E 3des-cbc "kamekame12341234kame1234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:1::1 fec0:0:0:2::1 ah 0x10001 -m transport
- -A hmac-md5 "this is the test" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10001 -m tunnel
- -E 3des-cbc "kamekame12341234kame1234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 ah 0x10001 -m transport
- -A hmac-md5 "this is the test" ;
-
-
-Making SAs with the different end
-
-ESP tunnel mode is required between Host-A and Gateway-A. Encryption
-algorithm is cast128-cbc, and authentication algorithm for ESP is hmac-sha1.
-ESP transport mode is recommended between Host-A and Host-B. Encryption
-algorithm is rc5-cbc, and authentication algorithm for ESP is hmac-md5.
-
- ================== ESP =================
- | ======= ESP ======= |
- | | | |
- Host-A Gateway-A Host-B
- fec0:0:0:1::1 ---- fec0:0:0:2::1 ---- fec0:0:0:2::2
-
-Configuration at Host-A:
-
- # setkey -c <<EOF
- spdadd fec0:0:0:1::1[any] fec0:0:0:2::2[80] tcp -P out ipsec
- esp/transport/fec0:0:0:1::1-fec0:0:0:2::2/use
- esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require ;
- spdadd fec0:0:0:2::1[80] fec0:0:0:1::1[any] tcp -P in ipsec
- esp/transport/fec0:0:0:2::2-fec0:0:0:l::1/use
- esp/tunnel/fec0:0:0:2::1-fec0:0:0:1::1/require ;
- add fec0:0:0:1::1 fec0:0:0:2::2 esp 0x10001
- -m transport
- -E cast128-cbc "12341234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:1::1 fec0:0:0:2::1 esp 0x10002
- -E rc5-cbc "kamekame"
- -A hmac-md5 "this is the test" ;
- add fec0:0:0:2::2 fec0:0:0:1::1 esp 0x10003
- -m transport
- -E cast128-cbc "12341234"
- -A hmac-sha1 "this is the test key" ;
- add fec0:0:0:2::1 fec0:0:0:1::1 esp 0x10004
- -E rc5-cbc "kamekame"
- -A hmac-md5 "this is the test" ;
-
<<<EDNS0>>>
EDNS0 is defined in RFC2671. With EDNS0, the resolver library can tell DNS
@@ -660,4 +518,12 @@ Caveats:
- Some of our platforms do not use our extended resolver code in libinet6.
See COVERAGE for detail.
+
+<<Further readings>>
+
+http://www.netbsd.org/Documentation/network/ipv6/
+ Even if you are on non-netbsd operating system, the URL should be
+ useful.
+http://www.kame.net/
+
<end of USAGE>
OpenPOWER on IntegriCloud