summaryrefslogtreecommitdiffstats
path: root/usr.sbin/prefix/prefix.8
blob: e3a35d0bd6bd4e4c1fbec93ce7e5f536f788e860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the project nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     $Id: prefix.8,v 1.1.1.1 1999/08/08 23:31:13 itojun Exp $
.\"	$FreeBSD$
.\"
.Dd October 10, 1998
.Dt PREFIX 8
.Os KAME
.Sh NAME
.Nm prefix
.Nd configure network interface prefixes
.Sh SYNOPSIS
.Nm prefix
.Ar interface prefix
.Op Ar parameters
.Op Cm set|delete
.Nm prefix
.Ar interface
.Cm matchpr
.Ar match_prefix
.Cm mp_len
.Ar match_prefix_len
.Cm usepr
.Ar use_prefix
.Cm up_uselen
.Ar use_prefix_len
.Op Ar parameters
.Op Cm add|change|setglobal
.Nm prefix
.Fl a
.Op Fl d
.Op Fl u
.Cm matchpr
.Ar match_prefix
.Cm mp_len
.Ar match_prefix_len
.Cm usepr
.Ar use_prefix
.Cm up_uselen
.Ar use_prefix_uselen
.Op Ar parameters
.Op Cm add|change|setglobal
.Sh DESCRIPTION
.Nm Prefix
is used to assign an prefix
to a network interface and/or renumbering
network interface prefixes.
.Nm Prefix
must be used at boot time to define the network prefix
of each interface present on a machine; it may also be used at
a later time to renumbering multiple interface's prefixes
and other prefix related parameters.
.Nm Prefix
is router-only command, so you must do following to use it.
.Dl % sysctl -w net.inet6.ip6.forwarding=1
If net.inet6.ip6.forwarding is set to 0,
.Nm Prefix
command fails by EPERM error.
.Pp
The following options are available:
.Bl -tag -width indent
.It Ar interface
Specify an
.Ar interface
for which
.Ar prefix
is/are assigned or renumbered to.
This parameter is a string of the form
.Dq name unit ,
for example,
.Dq en0 .
.It Ar prefix
Assign/Delete an
.Ar prefix
to a network interface.
.It Cm prefixlen Ar len
Specify that
.Ar len
bits are reserved as identifier for IPv6 sub-networks in
.Ar prefix.
The
.Ar len
must be integer, and for syntactical reason it must be between 0 to 128.
It is almost always 64 under the current IPv6 assignment rule.
If the parameter is ommitted, 64 is used.
.It Cm matchpr Ar match_prefix
Specify
.Ar match_prefix
that is used for matching with preassigned prefixes to which
.Cm add|change|setglobal
command should be applied.
.It Cm mp_len Ar match_prefix_len
Specify the starting part of
.Ar match_prefix
to be used for matching with preassigned prefixes, as decimal bit number.
.It Cm mp_minlen Ar match_prefix_minlen
Specify the minimum length of prefixes which is allowed to be matched to
.Ar match_prefix ,
as decimal bit number.
.Cm add|change|setglobal
is not applied to preassigned prefixes with smaller prefix len than
.Ar match_prefix_minlen .
.It Cm mp_maxlen Ar match_prefix_maxlen
Specify the maximum length of prefixes which is allowed to be matched to
.Ar match_prefix ,
as decimal bit number.
.Cm add|change|setglobal
is not applied to preassigned prefixes with bigger prefix len than
.Ar match_prefix_maxlen .
.It Cm usepr Ar use_prefix
Specify
.Ar use_prefix
that is used for prefixes to be added on
.Cm add|change|setglobal
command.
.It Cm up_uselen Ar use_prefix_uselen
Specify the starting part of
.Ar use_prefix
copied to the starting part of prefixes to be added on
.Cm add|change|setglobal
command, as decimal bit number.
.It Cm up_keeplen Ar use_prefix_keeplen
Specify the midium part of
.Ar use_prefix
just next to the starting part specified by
.Ar use_prefix_uselen
, as decimal bit number.
Contiguous bits part in the same bit position of an existent prefix
matched with
.Ar match_prefix
is copied to the same bit position of prefixes to be added.
.It Cm pltime Ar time
Assign an
.Ar time
as prefix preferred life time for a prefix to be added.
Valid value for
.Ar time
is decimal seconds number or special format as "d00h00m00s00",
where 00 can take any decimal number, and "d" means days, "h" means hours,
"m" means minutes, "s" means seconds. And alternatively, special keyword
"infinity" can be also be specified.
.It Cm vltime Ar time
Assign an
.Ar time
as prefix valid life time for a prefix to be added.
Valid value for
.Ar time
is same as for
.Cm pltime.
.It Cm raf_auto
Enable the autonomous address auto configuration for the prefix to be
added.
.It Fl raf_auto
Disable the autonomous address auto configuration for the prefix to be
added.
.It Cm raf_onlink
Let the prefix to be added to have onlink nature for the assigned
interface.
.It Fl raf_onlink
Let the prefix to be added not to have onlink nature for the assigned
interface.
.It Cm rrf_decrprefd
Enable the decrementation of the pltime.
.It Fl rrf_decrprefd
Disable the decrementation of the pltime.
.It Cm rrf_decrvalid
Enable the decrementation of the vltime.
.It Fl rrf_decrvalid
Disable the decrementation of the vltime.
.El
.Sh DIAGNOSTICS
Messages indicating the specified interface does not exist, the
requested prefix is unknown, or the user is not privileged and
tried to alter an interface's configuration.
.Sh SEE ALSO
M. Crawford,
Router Renumbering for IPv6,
internet-draft,
draft-ietf-ipngwg-router-renum-05.txt
.Pp
.Xr ifconfig 8 ,
.Xr netstat 1 ,
.Xr netintro 4 ,
.Xr rc 8 ,
.Xr routed 8
.Sh HISTORY
The
.Nm
command first appeared in WIDE/KAME IPv6 protocol stack kit.
.\"
.\" .Sh BUGS
.\" (to be written)
OpenPOWER on IntegriCloud