xref: /freebsd/usr.sbin/rtadvd/rtadvd.conf.5 (revision fbbd9655e5107c68e4e0146ff22b73d7350475bc)
1.\"	$KAME: rtadvd.conf.5,v 1.50 2005/01/14 05:30:59 jinmei Exp $
2.\"
3.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the project nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\" $FreeBSD$
31.\"
32.Dd June 4, 2011
33.Dt RTADVD.CONF 5
34.Os
35.Sh NAME
36.Nm rtadvd.conf
37.Nd config file for router advertisement daemon
38.Sh DESCRIPTION
39This file describes how the router advertisement packets must be constructed
40for each of the interfaces.
41.Pp
42As described in
43.Xr rtadvd 8 ,
44you do not have to set this configuration file up at all,
45unless you need some special configurations.
46You may even omit the file as a whole.
47In such cases, the
48.Nm rtadvd
49daemon will automatically configure itself using default values
50specified in the specification.
51.Pp
52It obeys the famous
53.Xr termcap 5
54file format.
55Each line in the file describes a network interface.
56Fields are separated by a colon
57.Pq Sq \&: ,
58and each field contains one capability description.
59Lines may be concatenated by the
60.Sq \e
61character.
62The comment marker is the
63.Sq \&#
64character.
65.Sh CAPABILITIES
66Capabilities describe the value to be filled into ICMPv6 router
67advertisement messages and to control
68.Xr rtadvd 8
69behavior.
70Therefore, you are encouraged to read IETF neighbor discovery documents
71if you would like to modify the sample configuration file.
72.Pp
73Note that almost all items have default values.
74If you omit an item, the default value of the item will be used.
75.Pp
76There are two items which control the interval of sending router advertisements.
77These items can be omitted, then
78.Nm rtadvd
79will use the default values.
80.Bl -tag -width indent
81.It Cm \&maxinterval
82(num) The maximum time allowed between sending unsolicited
83multicast router advertisements
84.Pq unit: seconds .
85The default value is 600.
86Its value must be no less than 4 seconds
87and no greater than 1800 seconds.
88.It Cm \&mininterval
89(num) The minimum time allowed between sending unsolicited multicast
90router advertisements
91.Pq unit: seconds .
92The default value is the one third of value of
93.Cm maxinterval .
94Its value must be no less than 3 seconds and no greater than .75 *
95the value of
96.Cm maxinterval .
97.El
98.Pp
99The following items are for ICMPv6 router advertisement message
100header.
101These items can be omitted, then
102.Nm rtadvd
103will use the default values.
104.Bl -tag -width indent
105.It Cm \&chlim
106(num) The value for Cur Hop Limit field.
107The default value is 64.
108.It Cm \&raflags
109(str or num) A 8-bit flags field in router advertisement message header.
110This field can be specified either as a case-sensitive string or as an
111integer.
112A string consists of characters each of which corresponds to a
113particular flag bit(s).
114An integer should be the logical OR of all enabled bits.
115Bit 7
116.Po
117.Li 'm' or 0x80
118.Pc
119means Managed address configuration flag bit,
120and Bit 6
121.Po
122.Li 'o' or 0x40
123.Pc
124means Other stateful configuration flag bit.
125Bit 4
126.Po
127.Li 0x10
128.Pc
129and Bit 3
130.Po
131.Li 0x08
132.Pc
133are used to encode router preference.
134Bits 01
135.Po
136or 'h'
137.Pc
138means high, 00 means medium, and 11
139.Po
140or 'l'
141.Pc
142means low.
143Bits 10 is reserved, and must not be specified.
144There is no character to specify the medium preference explicitly.
145The default value of the entire flag is 0
146.Po
147or a null string,
148.Pc
149which means no additional
150configuration methods, and the medium router preference.
151.It Cm \&rltime
152(num) Router lifetime field
153.Pq unit: seconds .
154The value must be either zero or between
155the value of
156.Cm maxinterval
157and 9000.
158When
159.Nm rtadvd
160runs on a host, this value must explicitly set 0 on all the
161advertising interfaces as described in
162.Xr rtadvd 8 .
163The default value is 1800.
164.It Cm \&rtime
165(num) Reachable time field
166.Pq unit: milliseconds .
167The default value is 0, which means unspecified by this router.
168.It Cm \&retrans
169(num) Retrans Timer field
170.Pq unit: milliseconds .
171The default value is 0, which means unspecified by this router.
172.El
173.Pp
174The following items are for ICMPv6 prefix information option,
175which will be attached to router advertisement header.
176These items can be omitted, then
177.Nm rtadvd
178will automatically get appropriate prefixes from the kernel's routing table,
179and advertise the prefixes with the default parameters.
180Keywords other than
181.Cm clockskew
182and
183.Cm noifprefix
184can be augmented with a number, like
185.Dq Li prefix2 ,
186to specify multiple prefixes.
187.Bl -tag -width indent
188.It Cm \&noifprefix
189(bool) Specifies no prefix on the network interfaces will be advertised.
190By default
191.Nm rtadvd
192automatically gathers on-link prefixes from all of the network interfaces
193and advertise them.
194The
195.Cm noifprefix
196disables that behavior.
197If this is specified and no
198.Cm addr
199keyword is specified, no prefix information option will be included in the
200message.
201.It Cm \&clockskew
202(num) Time skew to adjust link propagation delays and clock skews
203between routers on the link
204.Pq unit: seconds .
205This value is used in consistency check for locally-configured and
206advertised prefix lifetimes, and has its meaning when the local router
207configures a prefix on the link with a lifetime that decrements in
208real time.
209If the value is 0, it means the consistency check will be skipped
210for such prefixes.
211The default value is 0.
212.It Cm \&prefixlen
213(num) Prefix length field.
214The default value is 64.
215.It Cm \&pinfoflags
216(str or num) A 8-bit flags field in prefix information option.
217This field can be specified either as a case-sensitive string or as an
218integer.
219A string consists of characters each of which corresponds to a
220particular flag bit(s).
221An integer should be the logical OR of all enabled bits.
222Bit 7
223.Po
224.Li 'l' or 0x80
225.Pc
226means On-link flag bit,
227and Bit 6
228.Po
229.Li 'a' or 0x40
230.Pc
231means Autonomous address-configuration flag bit.
232The default value is "la" or 0xc0, i.e., both bits are set.
233.It Cm \&addr
234(str) The address filled into Prefix field.
235Since
236.Dq \&:
237is used for
238.Xr termcap 5
239file format as well as IPv6 numeric address, the field MUST be quoted by
240doublequote character.
241.It Cm \&vltime
242(num) Valid lifetime field
243.Pq unit: seconds .
244The default value is 2592000 (30 days).
245.It Cm \&vltimedecr
246(bool) This item means the advertised valid lifetime will decrement
247in real time, which is disabled by default.
248.It Cm \&pltime
249(num) Preferred lifetime field
250.Pq unit: seconds .
251The default value is 604800 (7 days).
252.It Cm \&pltimedecr
253(bool) This item means the advertised preferred lifetime will decrement
254in real time, which is disabled by default.
255.El
256.Pp
257The following item is for ICMPv6 MTU option,
258which will be attached to router advertisement header.
259This item can be omitted, then
260.Nm rtadvd
261will use the default value.
262.Bl -tag -width indent
263.It Cm \&mtu
264(num or str) MTU (maximum transmission unit) field.
265If 0 is specified, it means that the option will not be included.
266The default value is 0.
267If the special string
268.Dq auto
269is specified for this item, MTU option will be included and its value
270will be set to the interface MTU automatically.
271.El
272.Pp
273The following item controls ICMPv6 source link-layer address option,
274which will be attached to router advertisement header.
275As noted above, you can just omit the item, then
276.Nm rtadvd
277will use the default value.
278.Bl -tag -width indent
279.It Cm \&nolladdr
280(bool) By default
281.Po
282if
283.Cm \&nolladdr
284is not specified
285.Pc ,
286.Xr rtadvd 8
287will try to get link-layer address for the interface from the kernel,
288and attach that in source link-layer address option.
289If this capability exists,
290.Xr rtadvd 8
291will not attach source link-layer address option to
292router advertisement packets.
293.El
294.Pp
295The following item controls ICMPv6 home agent information option,
296which was defined with mobile IPv6 support.
297It will be attached to router advertisement header just like other options do.
298.Bl -tag -width indent
299.It Cm \&hapref
300(num) Specifies home agent preference.
301If set to non-zero,
302.Cm \&hatime
303must be present as well.
304.It Cm \&hatime
305(num) Specifies home agent lifetime.
306.El
307.Pp
308When mobile IPv6 support is turned on for
309.Xr rtadvd 8 ,
310advertisement interval option will be attached to router advertisement
311packet, by configuring
312.Cm \&maxinterval
313explicitly.
314.Pp
315The following items are for ICMPv6 route information option,
316which will be attached to router advertisement header.
317These items are optional.
318Each items can be augmented with number, like
319.Dq Li rtplen2 ,
320to specify multiple routes.
321.Bl -tag -width indent
322.It Cm \&rtprefix
323(str) The prefix filled into the Prefix field of route information option.
324Since
325.Dq \&:
326is used for
327.Xr termcap 5
328file format as well as IPv6 numeric address, the field MUST be quoted by
329doublequote character.
330.It Cm \&rtplen
331(num) Prefix length field in route information option.
332The default value is 64.
333.It Cm \&rtflags
334(str or num) A 8-bit flags field in route information option.
335Currently only the preference values are defined.
336The notation is same as that of the raflags field.
337Bit 4
338.Po
339.Li 0x10
340.Pc
341and
342Bit 3
343.Po
344.Li 0x08
345.Pc
346are used to encode the route preference for the route.
347The default value is 0x00, i.e., medium preference.
348.It Cm \&rtltime
349(num) route lifetime field in route information option.
350.Pq unit: seconds .
351Since the specification does not define the default value of this
352item, the value for this item should be specified by hand.
353However,
354.Nm rtadvd
355allows this item to be unspecified, and uses the router lifetime
356as the default value in such a case, just for compatibility with an
357old version of the program.
358.El
359.Pp
360In the above list, each keyword beginning with
361.Dq Li rt
362could be replaced with the one beginning with
363.Dq Li rtr
364for backward compatibility reason.
365For example,
366.Cm rtrplen
367is accepted instead of
368.Cm rtplen .
369However, keywords that start with
370.Dq Li rtr
371have basically been obsoleted, and should not be used any more.
372.Pp
373The following items are for ICMPv6 Recursive DNS Server Option and
374DNS Search List Option
375.Pq RFC 6106 ,
376which will be attached to router advertisement header.
377These items are optional.
378.Bl -tag -width indent
379.It Cm \&rdnss
380(str) The IPv6 address of one or more recursive DNS servers.
381The argument must be inside double quotes.
382Multiple DNS servers can be specified in a comma-separated string.
383If different lifetimes are needed for different servers,
384separate entries can be given by using
385.Cm rdnss ,
386.Cm rdnss0 ,
387.Cm rdnss1 ,
388.Cm rdnss2 ...
389options with corresponding
390.Cm rdnssltime ,
391.Cm rdnssltime0 ,
392.Cm rdnssltime1 ,
393.Cm rdnssltime2 ...
394entries.
395Note that the maximum number of servers depends on the receiver side.
396See also
397.Xr resolver 5
398manual page for resolver implementation in
399.Fx .
400.It Cm \&rdnssltime
401The lifetime of the
402.Cm rdnss
403DNS server entries.
404The default value is 3/2 of the interval time.
405.It Cm \&dnssl
406(str) One or more domain names in a comma-separated string.
407These domain names will be used when making DNS queries on a
408non-fully-qualified domain name.
409If different lifetimes are needed for different domains, separate entries
410can be given by using
411.Cm dnssl ,
412.Cm dnssl0 ,
413.Cm dnssl1 ,
414.Cm dnssl2 ...
415options with corresponding
416.Cm dnsslltime ,
417.Cm dnsslltime0 ,
418.Cm dnsslltime1 ,
419.Cm dnsslltime2 ...
420entries.
421Note that the maximum number of names depends on the receiver side.
422See also
423.Xr resolver 5
424manual page for resolver implementation in
425.Fx .
426.It Cm \&dnsslltime
427The lifetime of the
428.Cm dnssl
429DNS search list entries.
430The default value is 3/2 of the interval time.
431.El
432.Pp
433You can also refer one line from another by using
434.Cm tc
435capability.
436See
437.Xr termcap 5
438for details on the capability.
439.Sh EXAMPLES
440As presented above, all of the advertised parameters have default values
441defined in specifications, and hence you usually do not have to set them
442by hand, unless you need special non-default values.
443It can cause interoperability problem if you use an ill-configured
444parameter.
445.Pp
446To override a configuration parameter, you can specify the parameter alone.
447With the following configuration,
448.Xr rtadvd 8
449overrides the router lifetime parameter for the
450.Li ne0
451interface.
452.Bd -literal -offset indent
453ne0:\\
454	:rltime#0:
455.Ed
456.Pp
457The following example manually configures prefixes advertised from the
458.Li ef0
459interface.
460The configuration must be used with the
461.Fl s
462option to
463.Xr rtadvd 8 .
464.Bd -literal -offset indent
465ef0:\\
466	:addr="2001:db8:ffff:1000::":prefixlen#64:
467.Ed
468.Pp
469The following example configures the
470.Li wlan0
471interface and adds two DNS servers and a DNS domain search options
472using the default option lifetime values.
473.Bd -literal -offset indent
474wlan0:\\
475	:addr="2001:db8:ffff:1000::":prefixlen#64:\\
476	:rdnss="2001:db8:ffff::10,2001:db8:ffff::2:43":\\
477	:dnssl="example.com":
478.Ed
479.Pp
480The following example presents the default values in an explicit manner.
481The configuration is provided just for reference purposes;
482YOU DO NOT NEED TO HAVE IT AT ALL.
483.Bd -literal -offset indent
484default:\\
485	:chlim#64:raflags#0:rltime#1800:rtime#0:retrans#0:\\
486	:pinfoflags="la":vltime#2592000:pltime#604800:mtu#0:
487ef0:\\
488	:addr="2001:db8:ffff:1000::":prefixlen#64:tc=default:
489.Ed
490.Sh SEE ALSO
491.Xr resolver 5 ,
492.Xr termcap 5 ,
493.Xr rtadvd 8 ,
494.Xr rtsol 8
495.Rs
496.%A Thomas Narten
497.%A Erik Nordmark
498.%A W. A. Simpson
499.%A Hesham Soliman
500.%T Neighbor Discovery for IP version 6 (IPv6)
501.%R RFC 4861
502.Re
503.Rs
504.%A Thomas Narten
505.%A Erik Nordmark
506.%A W. A. Simpson
507.%T Neighbor Discovery for IP version 6 (IPv6)
508.%R RFC 2461 (obsoleted by RFC 4861)
509.Re
510.Rs
511.%A Richard Draves
512.%T Default Router Preferences and More-Specific Routes
513.%R draft-ietf-ipngwg-router-selection-xx.txt
514.Re
515.Rs
516.%A J. Jeong
517.%A S. Park
518.%A L. Beloeil
519.%A S. Madanapalli
520.%T IPv6 Router Advertisement Options for DNS Configuration
521.%R RFC 6106
522.Re
523.Sh HISTORY
524The
525.Xr rtadvd 8
526and the configuration file
527.Nm
528first appeared in WIDE Hydrangea IPv6 protocol stack kit.
529.\" .Sh BUGS
530.\" (to be written)
531