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