ipaddrsel.8 (bbf215553c7233fbab8a0afdf1fac74c44781867) ipaddrsel.8 (c55633c3b85a97a093b3f79f341aee08eb6bd15b)
1'\" te
2.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved
3.\" Copyright (C) 2017, Sebastian Wiedenroth
4.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
1'\" te
2.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved
3.\" Copyright (C) 2017, Sebastian Wiedenroth
4.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7.TH IPADDRSEL 8 "Nov 4, 2017"
7.TH IPADDRSEL 8 "March 30, 2022"
8.SH NAME
9ipaddrsel \- configure IPv6 default address selection
10.SH SYNOPSIS
8.SH NAME
9ipaddrsel \- configure IPv6 default address selection
10.SH SYNOPSIS
11.LP
12.nf
13\fB/usr/sbin/ipaddrsel\fR
14.fi
15
16.LP
17.nf
18\fB/usr/sbin/ipaddrsel\fR \fB-f\fR \fIfile\fR
19.fi
20
21.LP
22.nf
23\fB/usr/sbin/ipaddrsel\fR \fB-d\fR
24.fi
25
26.SH DESCRIPTION
11.nf
12\fB/usr/sbin/ipaddrsel\fR
13.fi
14
15.LP
16.nf
17\fB/usr/sbin/ipaddrsel\fR \fB-f\fR \fIfile\fR
18.fi
19
20.LP
21.nf
22\fB/usr/sbin/ipaddrsel\fR \fB-d\fR
23.fi
24
25.SH DESCRIPTION
27.LP
28Use the \fBipaddrsel\fR utility to configure the IPv6 default address selection
29policy table. The policy table is a longest-matching-prefix lookup table that
30is used for IPv6 source address selection and for destination address ordering
31when resolving names to \fBAF_INET6\fR addresses. For a description of how the
32policy table is used for source address selection, see \fBinet6\fR(4P). For a
33description of how the policy table is used for destination address ordering,
34see \fBgetaddrinfo\fR(3SOCKET).
35.sp

--- 16 unchanged lines hidden (view full) ---

52.RS 2
53If the \fBusesrc\fR subcommand to \fBifconfig\fR(8) is applied to a particular
54physical interface, the selection policy specified by \fBusesrc\fR overrides
55the source address selection policies specified by \fBipaddrsel\fR. This is
56true for packets that are locally generated and for applications that do not
57choose a non-zero source address using \fBbind\fR(3SOCKET).
58.RE
59.SS "The Configuration File"
26Use the \fBipaddrsel\fR utility to configure the IPv6 default address selection
27policy table. The policy table is a longest-matching-prefix lookup table that
28is used for IPv6 source address selection and for destination address ordering
29when resolving names to \fBAF_INET6\fR addresses. For a description of how the
30policy table is used for source address selection, see \fBinet6\fR(4P). For a
31description of how the policy table is used for destination address ordering,
32see \fBgetaddrinfo\fR(3SOCKET).
33.sp

--- 16 unchanged lines hidden (view full) ---

50.RS 2
51If the \fBusesrc\fR subcommand to \fBifconfig\fR(8) is applied to a particular
52physical interface, the selection policy specified by \fBusesrc\fR overrides
53the source address selection policies specified by \fBipaddrsel\fR. This is
54true for packets that are locally generated and for applications that do not
55choose a non-zero source address using \fBbind\fR(3SOCKET).
56.RE
57.SS "The Configuration File"
60.LP
61The configuration file that the \fB-f\fR option accepts can contain either
62comment lines or policy entries. Comment lines have a '\fB#\fR' character as
63the first non-blank character. and they are ignored by the \fBipaddrsel\fR
64utility. Policy entry lines have the following format:
65.sp
66.in +2
67.nf
68\fIprefix\fR/\fIprefix_length\fR \fIprecedence\fR \fIlabel\fR [# \fIcomment\fR]
69.fi
70.in -2
71
72.sp
73.LP
74The \fIprefix\fR must be an IPv6 prefix in a format consistent with
58The configuration file that the \fB-f\fR option accepts can contain either
59comment lines or policy entries. Comment lines have a '\fB#\fR' character as
60the first non-blank character. and they are ignored by the \fBipaddrsel\fR
61utility. Policy entry lines have the following format:
62.sp
63.in +2
64.nf
65\fIprefix\fR/\fIprefix_length\fR \fIprecedence\fR \fIlabel\fR [# \fIcomment\fR]
66.fi
67.in -2
68
69.sp
70.LP
71The \fIprefix\fR must be an IPv6 prefix in a format consistent with
75\fBinet\fR(3SOCKET). The \fIprefix_length\fR is an integer ranging from 0 to
72\fBinet\fR(3C). The \fIprefix_length\fR is an integer ranging from 0 to
76128. The IPv6 source address selection and destination address ordering
77algorithms determine the precedence or label of an address by doing a
78longest-prefix-match lookup using the prefixes in this table, much like
79next-hop determination for a destination is done by doing a
80longest-prefix-match lookup using an IP routing table.
81.sp
82.LP
83The precedence is a non-negative integer that represents how the destination

--- 12 unchanged lines hidden (view full) ---

96.LP
97The label may be followed by an optional comment.
98.sp
99.LP
100The file must contain a default policy entry, which is an entry with
101\fB::0/0\fR as its \fIprefix\fR and \fIprefix_length\fR. This is to ensure that
102all possible addresses match a policy.
103.SH OPTIONS
73128. The IPv6 source address selection and destination address ordering
74algorithms determine the precedence or label of an address by doing a
75longest-prefix-match lookup using the prefixes in this table, much like
76next-hop determination for a destination is done by doing a
77longest-prefix-match lookup using an IP routing table.
78.sp
79.LP
80The precedence is a non-negative integer that represents how the destination

--- 12 unchanged lines hidden (view full) ---

93.LP
94The label may be followed by an optional comment.
95.sp
96.LP
97The file must contain a default policy entry, which is an entry with
98\fB::0/0\fR as its \fIprefix\fR and \fIprefix_length\fR. This is to ensure that
99all possible addresses match a policy.
100.SH OPTIONS
104.LP
105The \fBippadrsel\fR utility supports the following options:
106.sp
107.ne 2
108.na
109\fB\fB-f\fR \fIfile\fR\fR
110.ad
111.RS 11n
112Replace the address selection policy table with the policy specified in the

--- 20 unchanged lines hidden (view full) ---

133example# \fBipaddrsel > /etc/inet/ipaddrsel.conf\fR
134.fi
135.in -2
136.sp
137
138.RE
139
140.SH EXAMPLES
101The \fBippadrsel\fR utility supports the following options:
102.sp
103.ne 2
104.na
105\fB\fB-f\fR \fIfile\fR\fR
106.ad
107.RS 11n
108Replace the address selection policy table with the policy specified in the

--- 20 unchanged lines hidden (view full) ---

129example# \fBipaddrsel > /etc/inet/ipaddrsel.conf\fR
130.fi
131.in -2
132.sp
133
134.RE
135
136.SH EXAMPLES
141.LP
142\fBExample 1 \fRThe Default Policy in \fB/etc/inet/ipaddrsel.conf\fR
143.sp
144.LP
145The following example is the default policy that is located in
146\fB/etc/inet/ipaddrsel.conf\fR:
147
148.sp
149.in +2

--- 98 unchanged lines hidden (view full) ---

248.sp
249
250.sp
251.LP
252This example assumes that the local system has one physical interface, and that
253all global prefixes are assigned to that physical interface.
254
255.SH EXIT STATUS
137\fBExample 1 \fRThe Default Policy in \fB/etc/inet/ipaddrsel.conf\fR
138.sp
139.LP
140The following example is the default policy that is located in
141\fB/etc/inet/ipaddrsel.conf\fR:
142
143.sp
144.in +2

--- 98 unchanged lines hidden (view full) ---

243.sp
244
245.sp
246.LP
247This example assumes that the local system has one physical interface, and that
248all global prefixes are assigned to that physical interface.
249
250.SH EXIT STATUS
256.LP
257\fBipaddrsel\fR returns the following exit values:
258.sp
259.ne 2
260.na
261\fB\fB0\fR\fR
262.ad
263.RS 6n
264\fBipaddrsel\fR successfully completed.

--- 16 unchanged lines hidden (view full) ---

281.ad
282.RS 28n
283The file that contains the IPv6 default address selection policy to be
284installed at boot time. This file is loaded before any Internet services are
285started.
286.RE
287
288.SH ATTRIBUTES
251\fBipaddrsel\fR returns the following exit values:
252.sp
253.ne 2
254.na
255\fB\fB0\fR\fR
256.ad
257.RS 6n
258\fBipaddrsel\fR successfully completed.

--- 16 unchanged lines hidden (view full) ---

275.ad
276.RS 28n
277The file that contains the IPv6 default address selection policy to be
278installed at boot time. This file is loaded before any Internet services are
279started.
280.RE
281
282.SH ATTRIBUTES
289.LP
290See \fBattributes\fR(7) for descriptions of the following attributes:
291.sp
292
293.sp
294.TS
295box;
296c | c
297l | l .
298ATTRIBUTE TYPE ATTRIBUTE VALUE
299_
300Interface Stability Evolving
301.TE
302
303.SH SEE ALSO
283See \fBattributes\fR(7) for descriptions of the following attributes:
284.sp
285
286.sp
287.TS
288box;
289c | c
290l | l .
291ATTRIBUTE TYPE ATTRIBUTE VALUE
292_
293Interface Stability Evolving
294.TE
295
296.SH SEE ALSO
304.LP
297.BR inet (3C),
305.BR getaddrinfo (3SOCKET),
298.BR getaddrinfo (3SOCKET),
306.BR inet (3SOCKET),
307.BR inet6 (4P),
308.BR ipaddrsel.conf (5),
309.BR attributes (7),
310.BR nscd (8)
311.SH NOTES
299.BR inet6 (4P),
300.BR ipaddrsel.conf (5),
301.BR attributes (7),
302.BR nscd (8)
303.SH NOTES
312.LP
313The ipnodes cache kept by \fBnscd\fR(8) contains addresses that are ordered
314using the destination address ordering algorithm, which is one of the reasons
315why \fBipaddrsel\fR is called before \fBnscd\fR in the boot sequence. If
316\fBipaddrsel\fR is used to change the address selection policy after \fBnscd\fR
317has started, you should invalidate the \fBnscd\fR ipnodes cache by invoking the
318following command:
319.sp
320.in +2
321.nf
322example# \fB/usr/sbin/nscd -i ipnodes\fR
323.fi
324.in -2
325.sp
326
304The ipnodes cache kept by \fBnscd\fR(8) contains addresses that are ordered
305using the destination address ordering algorithm, which is one of the reasons
306why \fBipaddrsel\fR is called before \fBnscd\fR in the boot sequence. If
307\fBipaddrsel\fR is used to change the address selection policy after \fBnscd\fR
308has started, you should invalidate the \fBnscd\fR ipnodes cache by invoking the
309following command:
310.sp
311.in +2
312.nf
313example# \fB/usr/sbin/nscd -i ipnodes\fR
314.fi
315.in -2
316.sp
317