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