xref: /xnu-10002.41.9/bsd/man/man4/inet6.4 (revision 699cd48037512bf4380799317ca44ca453c82f57)
1*699cd480SApple OSS Distributions.\"	$FreeBSD: src/share/man/man4/inet6.4,v 1.4.2.8 2001/12/17 11:30:12 ru Exp $
2*699cd480SApple OSS Distributions.\"	$KAME: inet6.4,v 1.21 2001/04/05 01:00:18 itojun Exp $
3*699cd480SApple OSS Distributions.\"
4*699cd480SApple OSS Distributions.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5*699cd480SApple OSS Distributions.\" All rights reserved.
6*699cd480SApple OSS Distributions.\"
7*699cd480SApple OSS Distributions.\" Redistribution and use in source and binary forms, with or without
8*699cd480SApple OSS Distributions.\" modification, are permitted provided that the following conditions
9*699cd480SApple OSS Distributions.\" are met:
10*699cd480SApple OSS Distributions.\" 1. Redistributions of source code must retain the above copyright
11*699cd480SApple OSS Distributions.\"    notice, this list of conditions and the following disclaimer.
12*699cd480SApple OSS Distributions.\" 2. Redistributions in binary form must reproduce the above copyright
13*699cd480SApple OSS Distributions.\"    notice, this list of conditions and the following disclaimer in the
14*699cd480SApple OSS Distributions.\"    documentation and/or other materials provided with the distribution.
15*699cd480SApple OSS Distributions.\" 3. Neither the name of the project nor the names of its contributors
16*699cd480SApple OSS Distributions.\"    may be used to endorse or promote products derived from this software
17*699cd480SApple OSS Distributions.\"    without specific prior written permission.
18*699cd480SApple OSS Distributions.\"
19*699cd480SApple OSS Distributions.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20*699cd480SApple OSS Distributions.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*699cd480SApple OSS Distributions.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*699cd480SApple OSS Distributions.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23*699cd480SApple OSS Distributions.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24*699cd480SApple OSS Distributions.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25*699cd480SApple OSS Distributions.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26*699cd480SApple OSS Distributions.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27*699cd480SApple OSS Distributions.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28*699cd480SApple OSS Distributions.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*699cd480SApple OSS Distributions.\" SUCH DAMAGE.
30*699cd480SApple OSS Distributions.\"
31*699cd480SApple OSS Distributions.Dd January 29, 1999
32*699cd480SApple OSS Distributions.Dt INET6 4
33*699cd480SApple OSS Distributions.Os
34*699cd480SApple OSS Distributions.Sh NAME
35*699cd480SApple OSS Distributions.Nm inet6
36*699cd480SApple OSS Distributions.Nd Internet protocol version 6 family
37*699cd480SApple OSS Distributions.Sh SYNOPSIS
38*699cd480SApple OSS Distributions.In sys/types.h
39*699cd480SApple OSS Distributions.In netinet/in.h
40*699cd480SApple OSS Distributions.Sh DESCRIPTION
41*699cd480SApple OSS DistributionsThe
42*699cd480SApple OSS Distributions.Nm
43*699cd480SApple OSS Distributionsfamily is an updated version of
44*699cd480SApple OSS Distributions.Xr inet 4
45*699cd480SApple OSS Distributionsfamily.
46*699cd480SApple OSS DistributionsWhile
47*699cd480SApple OSS Distributions.Xr inet 4
48*699cd480SApple OSS Distributionsimplements Internet Protocol version 4,
49*699cd480SApple OSS Distributions.Nm
50*699cd480SApple OSS Distributionsimplements Internet Protocol version 6.
51*699cd480SApple OSS Distributions.Pp
52*699cd480SApple OSS Distributions.Nm
53*699cd480SApple OSS Distributionsis a collection of protocols layered atop the
54*699cd480SApple OSS Distributions.Em Internet Protocol version 6
55*699cd480SApple OSS Distributions.Pq Tn IPv6
56*699cd480SApple OSS Distributionstransport layer, and utilizing the IPv6 address format.
57*699cd480SApple OSS DistributionsThe
58*699cd480SApple OSS Distributions.Nm
59*699cd480SApple OSS Distributionsfamily provides protocol support for the
60*699cd480SApple OSS Distributions.Dv SOCK_STREAM , SOCK_DGRAM ,
61*699cd480SApple OSS Distributionsand
62*699cd480SApple OSS Distributions.Dv SOCK_RAW
63*699cd480SApple OSS Distributionssocket types; the
64*699cd480SApple OSS Distributions.Dv SOCK_RAW
65*699cd480SApple OSS Distributionsinterface provides access to the
66*699cd480SApple OSS Distributions.Tn IPv6
67*699cd480SApple OSS Distributionsprotocol.
68*699cd480SApple OSS Distributions.Sh ADDRESSING
69*699cd480SApple OSS DistributionsIPv6 addresses are 16 byte quantities, stored in network standard byteorder.
70*699cd480SApple OSS DistributionsThe include file
71*699cd480SApple OSS Distributions.Aq Pa netinet/in.h
72*699cd480SApple OSS Distributionsdefines this address
73*699cd480SApple OSS Distributionsas a discriminated union.
74*699cd480SApple OSS Distributions.Pp
75*699cd480SApple OSS DistributionsSockets bound to the
76*699cd480SApple OSS Distributions.Nm
77*699cd480SApple OSS Distributionsfamily utilize the following addressing structure:
78*699cd480SApple OSS Distributions.Bd -literal -offset indent
79*699cd480SApple OSS Distributionsstruct sockaddr_in6 {
80*699cd480SApple OSS Distributions	u_int8_t	sin6_len;
81*699cd480SApple OSS Distributions	u_int8_t	sin6_family;
82*699cd480SApple OSS Distributions	u_int16_t	sin6_port;
83*699cd480SApple OSS Distributions	u_int32_t	sin6_flowinfo;
84*699cd480SApple OSS Distributions	struct in6_addr	sin6_addr;
85*699cd480SApple OSS Distributions	u_int32_t	sin6_scope_id;
86*699cd480SApple OSS Distributions};
87*699cd480SApple OSS Distributions.Ed
88*699cd480SApple OSS Distributions.Pp
89*699cd480SApple OSS DistributionsSockets may be created with the local address
90*699cd480SApple OSS Distributions.Dq Dv ::
91*699cd480SApple OSS Distributions(which is equal to IPv6 address
92*699cd480SApple OSS Distributions.Dv 0:0:0:0:0:0:0:0 )
93*699cd480SApple OSS Distributionsto affect
94*699cd480SApple OSS Distributions.Dq wildcard
95*699cd480SApple OSS Distributionsmatching on incoming messages.
96*699cd480SApple OSS Distributions.Pp
97*699cd480SApple OSS DistributionsThe IPv6 specification defines scoped addresses,
98*699cd480SApple OSS Distributionslike link-local or site-local addresses.
99*699cd480SApple OSS DistributionsA scoped address is ambiguous to the kernel,
100*699cd480SApple OSS Distributionsif it is specified without a scope identifier.
101*699cd480SApple OSS DistributionsTo manipulate scoped addresses properly from the userland,
102*699cd480SApple OSS Distributionsprograms must use the advanced API defined in RFC2292.
103*699cd480SApple OSS DistributionsA compact description of the advanced API is available in
104*699cd480SApple OSS Distributions.Xr ip6 4 .
105*699cd480SApple OSS DistributionsIf a scoped address is specified without an explicit scope,
106*699cd480SApple OSS Distributionsthe kernel may raise an error.
107*699cd480SApple OSS DistributionsNote that scoped addresses are not for daily use at this moment,
108*699cd480SApple OSS Distributionsboth from a specification and an implementation point of view.
109*699cd480SApple OSS Distributions.Pp
110*699cd480SApple OSS DistributionsThe KAME implementation supports an extended numeric IPv6 address notation
111*699cd480SApple OSS Distributionsfor link-local addresses,
112*699cd480SApple OSS Distributionslike
113*699cd480SApple OSS Distributions.Dq Li fe80::1%de0
114*699cd480SApple OSS Distributionsto specify
115*699cd480SApple OSS Distributions.Do
116*699cd480SApple OSS Distributions.Li fe80::1
117*699cd480SApple OSS Distributionson
118*699cd480SApple OSS Distributions.Li de0
119*699cd480SApple OSS Distributionsinterface
120*699cd480SApple OSS Distributions.Dc .
121*699cd480SApple OSS DistributionsThis notation is supported by
122*699cd480SApple OSS Distributions.Xr getaddrinfo 3
123*699cd480SApple OSS Distributionsand
124*699cd480SApple OSS Distributions.Xr getnameinfo 3 .
125*699cd480SApple OSS DistributionsSome of normal userland programs, such as
126*699cd480SApple OSS Distributions.Xr telnet 1
127*699cd480SApple OSS Distributionsor
128*699cd480SApple OSS Distributions.Xr ftp 1 ,
129*699cd480SApple OSS Distributionsare able to use this notation.
130*699cd480SApple OSS DistributionsWith special programs
131*699cd480SApple OSS Distributionslike
132*699cd480SApple OSS Distributions.Xr ping6 8 ,
133*699cd480SApple OSS Distributionsyou can specify the outgoing interface by an extra command line option
134*699cd480SApple OSS Distributionsto disambiguate scoped addresses.
135*699cd480SApple OSS Distributions.Pp
136*699cd480SApple OSS DistributionsScoped addresses are handled specially in the kernel.
137*699cd480SApple OSS DistributionsIn kernel structures like routing tables or interface structures,
138*699cd480SApple OSS Distributionsa scoped address will have its interface index embedded into the address.
139*699cd480SApple OSS DistributionsTherefore,
140*699cd480SApple OSS Distributionsthe address in some kernel structures is not the same as that on the wire.
141*699cd480SApple OSS DistributionsThe embedded index will become visible through a
142*699cd480SApple OSS Distributions.Dv PF_ROUTE
143*699cd480SApple OSS Distributionssocket, kernel memory accesses via
144*699cd480SApple OSS Distributions.Xr kvm 3
145*699cd480SApple OSS Distributionsand on some other occasions.
146*699cd480SApple OSS DistributionsHOWEVER, users should never use the embedded form.
147*699cd480SApple OSS DistributionsFor details please consult
148*699cd480SApple OSS Distributions.Pa IMPLEMENTATION
149*699cd480SApple OSS Distributionssupplied with KAME kit.
150*699cd480SApple OSS Distributions.Sh PROTOCOLS
151*699cd480SApple OSS DistributionsThe
152*699cd480SApple OSS Distributions.Nm
153*699cd480SApple OSS Distributionsfamily is comprised of the
154*699cd480SApple OSS Distributions.Tn IPv6
155*699cd480SApple OSS Distributionsnetwork protocol, Internet Control
156*699cd480SApple OSS DistributionsMessage Protocol version 6
157*699cd480SApple OSS Distributions.Pq Tn ICMPv6 ,
158*699cd480SApple OSS DistributionsTransmission Control Protocol
159*699cd480SApple OSS Distributions.Pq Tn TCP ,
160*699cd480SApple OSS Distributionsand User Datagram Protocol
161*699cd480SApple OSS Distributions.Pq Tn UDP .
162*699cd480SApple OSS Distributions.Tn TCP
163*699cd480SApple OSS Distributionsis used to support the
164*699cd480SApple OSS Distributions.Dv SOCK_STREAM
165*699cd480SApple OSS Distributionsabstraction while
166*699cd480SApple OSS Distributions.Tn UDP
167*699cd480SApple OSS Distributionsis used to support the
168*699cd480SApple OSS Distributions.Dv SOCK_DGRAM
169*699cd480SApple OSS Distributionsabstraction.
170*699cd480SApple OSS DistributionsNote that
171*699cd480SApple OSS Distributions.Tn TCP
172*699cd480SApple OSS Distributionsand
173*699cd480SApple OSS Distributions.Tn UDP
174*699cd480SApple OSS Distributionsare common to
175*699cd480SApple OSS Distributions.Xr inet 4
176*699cd480SApple OSS Distributionsand
177*699cd480SApple OSS Distributions.Nm .
178*699cd480SApple OSS DistributionsA raw interface to
179*699cd480SApple OSS Distributions.Tn IPv6
180*699cd480SApple OSS Distributionsis available
181*699cd480SApple OSS Distributionsby creating an Internet socket of type
182*699cd480SApple OSS Distributions.Dv SOCK_RAW .
183*699cd480SApple OSS DistributionsThe
184*699cd480SApple OSS Distributions.Tn ICMPv6
185*699cd480SApple OSS Distributionsmessage protocol is accessible from a raw socket.
186*699cd480SApple OSS Distributions.\" .Pp
187*699cd480SApple OSS Distributions.\" The 128-bit IPv6 address contains both network and host parts.
188*699cd480SApple OSS Distributions.\" However, direct examination of addresses is discouraged.
189*699cd480SApple OSS Distributions.\" For those programs which absolutely need to break addresses
190*699cd480SApple OSS Distributions.\" into their component parts, the following
191*699cd480SApple OSS Distributions.\" .Xr ioctl 2
192*699cd480SApple OSS Distributions.\" commands are provided for a datagram socket in the
193*699cd480SApple OSS Distributions.\" .Nm
194*699cd480SApple OSS Distributions.\" domain; they have the same form as the
195*699cd480SApple OSS Distributions.\" .Dv SIOCIFADDR
196*699cd480SApple OSS Distributions.\" command (see
197*699cd480SApple OSS Distributions.\" .Xr intro 4 ) .
198*699cd480SApple OSS Distributions.\" .Pp
199*699cd480SApple OSS Distributions.\" .Bl -tag -width SIOCSIFNETMASK
200*699cd480SApple OSS Distributions.\" .It Dv SIOCSIFNETMASK
201*699cd480SApple OSS Distributions.\" Set interface network mask.
202*699cd480SApple OSS Distributions.\" The network mask defines the network part of the address;
203*699cd480SApple OSS Distributions.\" if it contains more of the address than the address type would indicate,
204*699cd480SApple OSS Distributions.\" then subnets are in use.
205*699cd480SApple OSS Distributions.\" .It Dv SIOCGIFNETMASK
206*699cd480SApple OSS Distributions.\" Get interface network mask.
207*699cd480SApple OSS Distributions.\" .El
208*699cd480SApple OSS Distributions.\" .Sh ROUTING
209*699cd480SApple OSS Distributions.\" The current implementation of Internet protocols includes some routing-table
210*699cd480SApple OSS Distributions.\" adaptations to provide enhanced caching of certain end-to-end
211*699cd480SApple OSS Distributions.\" information necessary for Transaction TCP and Path MTU Discovery.  The
212*699cd480SApple OSS Distributions.\" following changes are the most significant:
213*699cd480SApple OSS Distributions.\" .Bl -enum
214*699cd480SApple OSS Distributions.\" .It
215*699cd480SApple OSS Distributions.\" All IP routes, except those with the
216*699cd480SApple OSS Distributions.\" .Dv RTF_CLONING
217*699cd480SApple OSS Distributions.\" flag and those to multicast destinations, have the
218*699cd480SApple OSS Distributions.\" .Dv RTF_PRCLONING
219*699cd480SApple OSS Distributions.\" flag forcibly enabled (they are thus said to be
220*699cd480SApple OSS Distributions.\" .Dq "protocol cloning" ).
221*699cd480SApple OSS Distributions.\" .It
222*699cd480SApple OSS Distributions.\" When the last reference to an IP route is dropped, the route is
223*699cd480SApple OSS Distributions.\" examined to determine if it was created by cloning such a route.  If
224*699cd480SApple OSS Distributions.\" this is the case, the
225*699cd480SApple OSS Distributions.\" .Dv RTF_PROTO3
226*699cd480SApple OSS Distributions.\" flag is turned on, and the expiration timer is initialized to go off
227*699cd480SApple OSS Distributions.\" in net.inet.ip.rtexpire seconds.  If such a route is re-referenced,
228*699cd480SApple OSS Distributions.\" the flag and expiration timer are reset.
229*699cd480SApple OSS Distributions.\" .It
230*699cd480SApple OSS Distributions.\" A kernel timeout runs once every ten minutes, or sooner if there are
231*699cd480SApple OSS Distributions.\" soon-to-expire routes in the kernel routing table, and deletes the
232*699cd480SApple OSS Distributions.\" expired routes.
233*699cd480SApple OSS Distributions.\" .El
234*699cd480SApple OSS Distributions.\" .Pp
235*699cd480SApple OSS Distributions.\" A dynamic process is in place to modify the value of
236*699cd480SApple OSS Distributions.\" net.inet.ip.rtexpire if the number of cached routes grows too large.
237*699cd480SApple OSS Distributions.\" If after an expiration run there are still more than
238*699cd480SApple OSS Distributions.\" net.inet.ip.rtmaxcache unreferenced routes remaining, the rtexpire
239*699cd480SApple OSS Distributions.\" value is multiplied by 3/4, and any routes which have longer
240*699cd480SApple OSS Distributions.\" expiration times have those times adjusted.  This process is damped
241*699cd480SApple OSS Distributions.\" somewhat by specification of a minimum rtexpire value
242*699cd480SApple OSS Distributions.\" (net.inet.ip.rtminexpire), and by restricting the reduction to once in
243*699cd480SApple OSS Distributions.\" a ten-minute period.
244*699cd480SApple OSS Distributions.\" .Pp
245*699cd480SApple OSS Distributions.\" If some external process deletes the original route from which a
246*699cd480SApple OSS Distributions.\" protocol-cloned route was generated, the ``child route'' is deleted.
247*699cd480SApple OSS Distributions.\" (This is actually a generic mechanism in the routing code support for
248*699cd480SApple OSS Distributions.\" protocol-requested cloning.)
249*699cd480SApple OSS Distributions.\" .Pp
250*699cd480SApple OSS Distributions.\" No attempt is made to manage routes which were not created by protocol
251*699cd480SApple OSS Distributions.\" cloning; these are assumed to be static, under the management of an
252*699cd480SApple OSS Distributions.\" external routing process, or under the management of a link layer
253*699cd480SApple OSS Distributions.\" (e.g.,
254*699cd480SApple OSS Distributions.\" .Tn ARP
255*699cd480SApple OSS Distributions.\" for Ethernets).
256*699cd480SApple OSS Distributions.\" .Pp
257*699cd480SApple OSS Distributions.\" Only certain types of network activity will result in the cloning of a
258*699cd480SApple OSS Distributions.\" route using this mechanism.  Specifically, those protocols (such as
259*699cd480SApple OSS Distributions.\" .Tn TCP
260*699cd480SApple OSS Distributions.\" and
261*699cd480SApple OSS Distributions.\" .Tn UDP )
262*699cd480SApple OSS Distributions.\" which themselves cache a long-lasting reference to route for a destination
263*699cd480SApple OSS Distributions.\" will trigger the mechanism; whereas raw
264*699cd480SApple OSS Distributions.\" .Tn IP
265*699cd480SApple OSS Distributions.\" packets, whether locally-generated or forwarded, will not.
266*699cd480SApple OSS Distributions.Ss MIB Variables
267*699cd480SApple OSS DistributionsA number of variables are implemented in the net.inet6 branch of the
268*699cd480SApple OSS Distributions.Xr sysctl 3
269*699cd480SApple OSS DistributionsMIB.
270*699cd480SApple OSS DistributionsIn addition to the variables supported by the transport protocols
271*699cd480SApple OSS Distributions(for which the respective manual pages may be consulted),
272*699cd480SApple OSS Distributionsthe following general variables are defined:
273*699cd480SApple OSS Distributions.Bl -tag -width IPV6CTL_MAXFRAGPACKETS
274*699cd480SApple OSS Distributions.It Dv IPV6CTL_FORWARDING
275*699cd480SApple OSS Distributions.Pq ip6.forwarding
276*699cd480SApple OSS DistributionsBoolean: enable/disable forwarding of
277*699cd480SApple OSS Distributions.Tn IPv6
278*699cd480SApple OSS Distributionspackets.
279*699cd480SApple OSS DistributionsAlso, identify if the node is acting as a router.
280*699cd480SApple OSS DistributionsDefaults to off.
281*699cd480SApple OSS Distributions.It Dv IPV6CTL_SENDREDIRECTS
282*699cd480SApple OSS Distributions.Pq ip6.redirect
283*699cd480SApple OSS DistributionsBoolean: enable/disable sending of
284*699cd480SApple OSS Distributions.Tn ICMPv6
285*699cd480SApple OSS Distributionsredirects in response to unforwardable
286*699cd480SApple OSS Distributions.Tn IPv6
287*699cd480SApple OSS Distributionspackets.
288*699cd480SApple OSS DistributionsThis option is ignored unless the node is routing
289*699cd480SApple OSS Distributions.Tn IPv6
290*699cd480SApple OSS Distributionspackets,
291*699cd480SApple OSS Distributionsand should normally be enabled on all systems.
292*699cd480SApple OSS DistributionsDefaults to on.
293*699cd480SApple OSS Distributions.It Dv IPV6CTL_DEFHLIM
294*699cd480SApple OSS Distributions.Pq ip6.hlim
295*699cd480SApple OSS DistributionsInteger: default hop limit value to use for outgoing
296*699cd480SApple OSS Distributions.Tn IPv6
297*699cd480SApple OSS Distributionspackets.
298*699cd480SApple OSS DistributionsThis value applies to all the transport protocols on top of
299*699cd480SApple OSS Distributions.Tn IPv6 .
300*699cd480SApple OSS DistributionsThere are APIs to override the value.
301*699cd480SApple OSS Distributions.It Dv IPV6CTL_MAXFRAGPACKETS
302*699cd480SApple OSS Distributions.Pq ip6.maxfragpackets
303*699cd480SApple OSS DistributionsInteger: default maximum number of fragmented packets the node will accept.
304*699cd480SApple OSS Distributions0 means that the node will not accept any fragmented packets.
305*699cd480SApple OSS Distributions-1 means that the node will accept as many fragmented packets as it receives.
306*699cd480SApple OSS DistributionsThe flag is provided basically for avoiding possible DoS attacks.
307*699cd480SApple OSS Distributions.It Dv IPV6CTL_ACCEPT_RTADV
308*699cd480SApple OSS Distributions.Pq ip6.accept_rtadv
309*699cd480SApple OSS DistributionsBoolean: enable/disable receiving of
310*699cd480SApple OSS Distributions.Tn ICMPv6
311*699cd480SApple OSS Distributionsrouter advertisement packets,
312*699cd480SApple OSS Distributionsand autoconfiguration of address prefixes and default routers.
313*699cd480SApple OSS DistributionsThe node must be a host
314*699cd480SApple OSS Distributions(not a router)
315*699cd480SApple OSS Distributionsfor the option to be meaningful.
316*699cd480SApple OSS DistributionsDefaults to off.
317*699cd480SApple OSS Distributions.\".It Dv IPV6CTL_KEEPFAITH
318*699cd480SApple OSS Distributions.\".Pq ip6.keepfaith
319*699cd480SApple OSS Distributions.\"Boolean: enable/disable
320*699cd480SApple OSS Distributions.\".Dq FAITH
321*699cd480SApple OSS Distributions.\"TCP relay IPv6-to-IPv4 translator code in the kernel.
322*699cd480SApple OSS Distributions.\"Refer
323*699cd480SApple OSS Distributions.\".Xr faith 4
324*699cd480SApple OSS Distributions.\"and
325*699cd480SApple OSS Distributions.\".Xr faithd 8
326*699cd480SApple OSS Distributions.\"for detail.
327*699cd480SApple OSS Distributions.\"Defaults to off.
328*699cd480SApple OSS Distributions.It Dv IPV6CTL_LOG_INTERVAL
329*699cd480SApple OSS Distributions.Pq ip6.log_interval
330*699cd480SApple OSS DistributionsInteger: default interval between
331*699cd480SApple OSS Distributions.Tn IPv6
332*699cd480SApple OSS Distributionspacket forwarding engine log output
333*699cd480SApple OSS Distributions(in seconds).
334*699cd480SApple OSS Distributions.It Dv IPV6CTL_HDRNESTLIMIT
335*699cd480SApple OSS Distributions.Pq ip6.hdrnestlimit
336*699cd480SApple OSS DistributionsInteger: default number of the maximum
337*699cd480SApple OSS Distributions.Tn IPv6
338*699cd480SApple OSS Distributionsextension headers
339*699cd480SApple OSS Distributionspermitted on incoming
340*699cd480SApple OSS Distributions.Tn IPv6
341*699cd480SApple OSS Distributionspackets.
342*699cd480SApple OSS DistributionsIf set to 0, the node will accept as many extension headers as possible.
343*699cd480SApple OSS Distributions.It Dv IPV6CTL_DAD_COUNT
344*699cd480SApple OSS Distributions.Pq ip6.dad_count
345*699cd480SApple OSS DistributionsInteger: default number of
346*699cd480SApple OSS Distributions.Tn IPv6
347*699cd480SApple OSS DistributionsDAD
348*699cd480SApple OSS Distributions.Pq duplicated address detection
349*699cd480SApple OSS Distributionsprobe packets.
350*699cd480SApple OSS DistributionsThe packets will be generated when
351*699cd480SApple OSS Distributions.Tn IPv6
352*699cd480SApple OSS Distributionsinterface addresses are configured.
353*699cd480SApple OSS Distributions.It Dv IPV6CTL_AUTO_FLOWLABEL
354*699cd480SApple OSS Distributions.Pq ip6.auto_flowlabel
355*699cd480SApple OSS DistributionsBoolean: enable/disable automatic filling of
356*699cd480SApple OSS Distributions.Tn IPv6
357*699cd480SApple OSS Distributionsflowlabel field, for outstanding connected transport protocol packets.
358*699cd480SApple OSS DistributionsThe field might be used by intermediate routers to identify packet flows.
359*699cd480SApple OSS DistributionsDefaults to on.
360*699cd480SApple OSS Distributions.It Dv IPV6CTL_DEFMCASTHLIM
361*699cd480SApple OSS Distributions.Pq ip6.defmcasthlim
362*699cd480SApple OSS DistributionsInteger: default hop limit value for an
363*699cd480SApple OSS Distributions.Tn IPv6
364*699cd480SApple OSS Distributionsmulticast packet sourced by the node.
365*699cd480SApple OSS DistributionsThis value applies to all the transport protocols on top of
366*699cd480SApple OSS Distributions.Tn IPv6 .
367*699cd480SApple OSS DistributionsThere are APIs to override the value as documented in
368*699cd480SApple OSS Distributions.Xr ip6 4 .
369*699cd480SApple OSS Distributions.It Dv IPV6CTL_GIF_HLIM
370*699cd480SApple OSS Distributions.Pq ip6.gifhlim
371*699cd480SApple OSS DistributionsInteger: default maximum hop limit value for an
372*699cd480SApple OSS Distributions.Tn IPv6
373*699cd480SApple OSS Distributionspacket generated by
374*699cd480SApple OSS Distributions.Xr gif 4
375*699cd480SApple OSS Distributionstunnel interface.
376*699cd480SApple OSS Distributions.It Dv IPV6CTL_KAME_VERSION
377*699cd480SApple OSS Distributions.Pq ip6.kame_version
378*699cd480SApple OSS DistributionsString: identifies the version of KAME
379*699cd480SApple OSS Distributions.Tn IPv6
380*699cd480SApple OSS Distributionsstack implemented in the kernel.
381*699cd480SApple OSS Distributions.It Dv IPV6CTL_USE_DEPRECATED
382*699cd480SApple OSS Distributions.Pq ip6.use_deprecated
383*699cd480SApple OSS DistributionsBoolean: enable/disable use of deprecated address,
384*699cd480SApple OSS Distributionsspecified in RFC2462 5.5.4.
385*699cd480SApple OSS DistributionsDefaults to on.
386*699cd480SApple OSS Distributions.It Dv IPV6CTL_RR_PRUNE
387*699cd480SApple OSS Distributions.Pq ip6.rr_prune
388*699cd480SApple OSS DistributionsInteger: default interval between
389*699cd480SApple OSS Distributions.Tn IPv6
390*699cd480SApple OSS Distributionsrouter renumbering prefix babysitting, in seconds.
391*699cd480SApple OSS Distributions.It Dv IPV6CTL_MAPPED_ADDR
392*699cd480SApple OSS Distributions.Pq ip6.mapped_addr
393*699cd480SApple OSS DistributionsBoolean: enable/disable use of
394*699cd480SApple OSS Distributions.Tn IPv4
395*699cd480SApple OSS Distributionsmapped address on
396*699cd480SApple OSS Distributions.Dv AF_INET6
397*699cd480SApple OSS Distributionssockets.
398*699cd480SApple OSS DistributionsDefaults to on.
399*699cd480SApple OSS Distributions.It Dv IPV6CTL_RTEXPIRE
400*699cd480SApple OSS Distributions.Pq ip6.rtexpire
401*699cd480SApple OSS DistributionsInteger: lifetime in seconds of protocol-cloned
402*699cd480SApple OSS Distributions.Tn IP
403*699cd480SApple OSS Distributionsroutes after the last reference drops (default one hour).
404*699cd480SApple OSS Distributions.\"This value varies dynamically as described above.
405*699cd480SApple OSS Distributions.It Dv IPV6CTL_RTMINEXPIRE
406*699cd480SApple OSS Distributions.Pq ip6.rtminexpire
407*699cd480SApple OSS DistributionsInteger: minimum value of ip.rtexpire (default ten seconds).
408*699cd480SApple OSS Distributions.\"This value has no effect on user modifications, but restricts the dynamic
409*699cd480SApple OSS Distributions.\"adaptation described above.
410*699cd480SApple OSS Distributions.It Dv IPV6CTL_RTMAXCACHE
411*699cd480SApple OSS Distributions.Pq ip6.rtmaxcache
412*699cd480SApple OSS DistributionsInteger: trigger level of cached, unreferenced, protocol-cloned routes
413*699cd480SApple OSS Distributionswhich initiates dynamic adaptation (default 128).
414*699cd480SApple OSS Distributions.El
415*699cd480SApple OSS Distributions.Ss Interaction between IPv4/v6 sockets
416*699cd480SApple OSS DistributionsThe behavior of
417*699cd480SApple OSS Distributions.Dv AF_INET6
418*699cd480SApple OSS DistributionsTCP/UDP socket is documented in RFC2553.
419*699cd480SApple OSS DistributionsBasically, it says this:
420*699cd480SApple OSS Distributions.Bl -bullet -compact
421*699cd480SApple OSS Distributions.It
422*699cd480SApple OSS DistributionsA specific bind on an
423*699cd480SApple OSS Distributions.Dv AF_INET6
424*699cd480SApple OSS Distributionssocket
425*699cd480SApple OSS Distributions.Xr ( bind 2
426*699cd480SApple OSS Distributionswith an address specified)
427*699cd480SApple OSS Distributionsshould accept IPv6 traffic to that address only.
428*699cd480SApple OSS Distributions.It
429*699cd480SApple OSS DistributionsIf you perform a wildcard bind
430*699cd480SApple OSS Distributionson an
431*699cd480SApple OSS Distributions.Dv AF_INET6
432*699cd480SApple OSS Distributionssocket
433*699cd480SApple OSS Distributions.Xr ( bind 2
434*699cd480SApple OSS Distributionsto IPv6 address
435*699cd480SApple OSS Distributions.Li :: ) ,
436*699cd480SApple OSS Distributionsand there is no wildcard bind
437*699cd480SApple OSS Distributions.Dv AF_INET
438*699cd480SApple OSS Distributionssocket on that TCP/UDP port, IPv6 traffic as well as IPv4 traffic
439*699cd480SApple OSS Distributionsshould be routed to that
440*699cd480SApple OSS Distributions.Dv AF_INET6
441*699cd480SApple OSS Distributionssocket.
442*699cd480SApple OSS DistributionsIPv4 traffic should be seen as if it came from an IPv6 address like
443*699cd480SApple OSS Distributions.Li ::ffff:10.1.1.1 .
444*699cd480SApple OSS DistributionsThis is called an IPv4 mapped address.
445*699cd480SApple OSS Distributions.It
446*699cd480SApple OSS DistributionsIf there are both a wildcard bind
447*699cd480SApple OSS Distributions.Dv AF_INET
448*699cd480SApple OSS Distributionssocket and a wildcard bind
449*699cd480SApple OSS Distributions.Dv AF_INET6
450*699cd480SApple OSS Distributionssocket on one TCP/UDP port, they should behave separately.
451*699cd480SApple OSS DistributionsIPv4 traffic should be routed to the
452*699cd480SApple OSS Distributions.Dv AF_INET
453*699cd480SApple OSS Distributionssocket and IPv6 should be routed to the
454*699cd480SApple OSS Distributions.Dv AF_INET6
455*699cd480SApple OSS Distributionssocket.
456*699cd480SApple OSS Distributions.El
457*699cd480SApple OSS Distributions.Pp
458*699cd480SApple OSS DistributionsHowever, RFC2553 does not define the ordering constraint between calls to
459*699cd480SApple OSS Distributions.Xr bind 2 ,
460*699cd480SApple OSS Distributionsnor how IPv4 TCP/UDP port numbers and IPv6 TCP/UDP port numbers
461*699cd480SApple OSS Distributionsrelate to each other
462*699cd480SApple OSS Distributions(should they be integrated or separated).
463*699cd480SApple OSS DistributionsImplemented behavior is very different from kernel to kernel.
464*699cd480SApple OSS DistributionsTherefore, it is unwise to rely too much upon the behavior of
465*699cd480SApple OSS Distributions.Dv AF_INET6
466*699cd480SApple OSS Distributionswildcard bind sockets.
467*699cd480SApple OSS DistributionsIt is recommended to listen to two sockets, one for
468*699cd480SApple OSS Distributions.Dv AF_INET
469*699cd480SApple OSS Distributionsand another for
470*699cd480SApple OSS Distributions.Dv AF_INET6 ,
471*699cd480SApple OSS Distributionswhen you would like to accept both IPv4 and IPv6 traffic.
472*699cd480SApple OSS Distributions.Pp
473*699cd480SApple OSS DistributionsIt should also be noted that
474*699cd480SApple OSS Distributionsmalicious parties can take advantage of the complexity presented above,
475*699cd480SApple OSS Distributionsand are able to bypass access control,
476*699cd480SApple OSS Distributionsif the target node routes IPv4 traffic to
477*699cd480SApple OSS Distributions.Dv AF_INET6
478*699cd480SApple OSS Distributionssocket.
479*699cd480SApple OSS DistributionsUsers are advised to take care handling connections
480*699cd480SApple OSS Distributionsfrom IPv4 mapped address to
481*699cd480SApple OSS Distributions.Dv AF_INET6
482*699cd480SApple OSS Distributionssockets.
483*699cd480SApple OSS Distributions.\".Pp
484*699cd480SApple OSS Distributions.\"Because of the above, by default,
485*699cd480SApple OSS Distributions.\"KAME/NetBSD and KAME/OpenBSD
486*699cd480SApple OSS Distributions.\"does not route IPv4 traffic to
487*699cd480SApple OSS Distributions.\".Dv AF_INET6
488*699cd480SApple OSS Distributions.\"sockets.
489*699cd480SApple OSS Distributions.\"Listen to two sockets if you want to accept both IPv4 and IPv6 traffic.
490*699cd480SApple OSS Distributions.\"On KAME/NetBSD, IPv4 traffic may be routed with certain
491*699cd480SApple OSS Distributions.\"per-socket/per-node configuration, however, it is not recommended.
492*699cd480SApple OSS Distributions.\"Consult
493*699cd480SApple OSS Distributions.\".Xr ip6 4
494*699cd480SApple OSS Distributions.\"for details.
495*699cd480SApple OSS Distributions.Sh SEE ALSO
496*699cd480SApple OSS Distributions.Xr ioctl 2 ,
497*699cd480SApple OSS Distributions.Xr socket 2 ,
498*699cd480SApple OSS Distributions.Xr sysctl 3 ,
499*699cd480SApple OSS Distributions.Xr icmp6 4 ,
500*699cd480SApple OSS Distributions.Xr intro 4 ,
501*699cd480SApple OSS Distributions.Xr ip6 4 ,
502*699cd480SApple OSS Distributions.Xr tcp 4 ,
503*699cd480SApple OSS Distributions.Xr udp 4
504*699cd480SApple OSS Distributions.Sh STANDARDS
505*699cd480SApple OSS Distributions.Rs
506*699cd480SApple OSS Distributions.%A Tatsuya Jinmei
507*699cd480SApple OSS Distributions.%A Atsushi Onoe
508*699cd480SApple OSS Distributions.%T "An Extension of Format for IPv6 Scoped Addresses"
509*699cd480SApple OSS Distributions.%R internet draft
510*699cd480SApple OSS Distributions.%D June 2000
511*699cd480SApple OSS Distributions.%N draft-ietf-ipngwg-scopedaddr-format-02.txt
512*699cd480SApple OSS Distributions.%O work in progress material
513*699cd480SApple OSS Distributions.Re
514*699cd480SApple OSS Distributions.Sh HISTORY
515*699cd480SApple OSS DistributionsThe
516*699cd480SApple OSS Distributions.Nm
517*699cd480SApple OSS Distributionsprotocol interfaces are defined in RFC2553 and RFC2292.
518*699cd480SApple OSS DistributionsThe implementation described herein appeared in the WIDE/KAME project.
519*699cd480SApple OSS Distributions.Sh BUGS
520*699cd480SApple OSS DistributionsThe IPv6 support is subject to change as the Internet protocols develop.
521*699cd480SApple OSS DistributionsUsers should not depend on details of the current implementation,
522*699cd480SApple OSS Distributionsbut rather the services exported.
523*699cd480SApple OSS Distributions.Pp
524*699cd480SApple OSS DistributionsUsers are suggested to implement
525*699cd480SApple OSS Distributions.Dq version independent
526*699cd480SApple OSS Distributionscode as much as possible, as you will need to support both
527*699cd480SApple OSS Distributions.Xr inet 4
528*699cd480SApple OSS Distributionsand
529*699cd480SApple OSS Distributions.Nm .
530