xref: /netbsd-src/usr.sbin/rtadvd/rtadvd.8 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: rtadvd.8,v 1.26 2017/11/06 15:15:04 christos Exp $
2.\"	$KAME: rtadvd.8,v 1.24 2002/05/31 16:16:08 jinmei Exp $
3.\"
4.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the project nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.Dd November 6, 2017
32.Dt RTADVD 8
33.Os
34.Sh NAME
35.Nm rtadvd
36.Nd router advertisement daemon
37.Sh SYNOPSIS
38.Nm
39.Op Fl DdfRs
40.Op Fl c Ar configfile
41.Op Fl M Ar ifname
42.Op Fl p Ar pidfile
43.Ar interface ...
44.Sh DESCRIPTION
45.Nm
46sends router advertisement packets to the specified interfaces.
47.Pp
48The program will daemonize itself on invocation.
49It will then send router advertisement packets periodically, as well
50as in response to router solicitation messages sent by end hosts.
51.Pp
52Router advertisements can be configured on a per-interface basis, as
53described in
54.Xr rtadvd.conf 5 .
55.Pp
56If there is no configuration file entry for an interface,
57or if the configuration file does not exist at all,
58.Nm
59sets all the parameters to their default values.
60In particular,
61.Nm
62reads all the interface routes from the routing table and advertises
63them as on-link prefixes.
64.Pp
65.Nm
66also watches the routing table.
67If an interface direct route is
68added on an advertising interface and no static prefixes are
69specified by the configuration file,
70.Nm
71adds the corresponding prefix to its advertising list.
72.Pp
73Similarly, when an interface direct route is deleted,
74.Nm
75will start advertising the prefixes with zero valid and preferred
76lifetimes to help the receiving hosts switch to a new prefix when
77renumbering.
78Note, however, that the zero valid lifetime cannot invalidate the
79autoconfigured addresses at a receiving host immediately.
80According to the specification, the host will retain the address
81for a certain period, which will typically be two hours.
82The zero lifetimes rather intend to make the address deprecated,
83indicating that a new non-deprecated address should be used as the
84source address of a new connection.
85This behavior will last for two hours.
86Then
87.Nm
88will completely remove the prefix from the advertising list,
89and succeeding advertisements will not contain the prefix information.
90.Pp
91Moreover, if the status of an advertising interface changes,
92.Nm
93will start or stop sending router advertisements according
94to the latest status.
95.Pp
96The
97.Fl s
98option may be used to disable this behavior;
99.Nm
100will not watch the routing table and the whole functionality described
101above will be suppressed.
102.Pp
103Basically, hosts MUST NOT send Router Advertisement messages at any
104time (RFC 2461, Section 6.2.3).
105However, it would sometimes be useful to allow hosts to advertise some
106parameters such as prefix information and link MTU.
107Thus,
108.Nm
109can be invoked if router lifetime is explicitly set to zero on every
110advertising interface.
111.Pp
112The command line options are:
113.Bl -tag -width indent
114.\"
115.It Fl c Ar configfile
116Specify an alternate location,
117.Ar configfile ,
118for the configuration file.
119By default,
120.Pa /etc/rtadvd.conf
121is used.
122.It Fl D
123Instead of printing errors using
124.Xr syslog 3
125send them to
126.Dv stderr .
127Also when
128.Xr poll 2
129fails, exit instead of retrying.
130.It Fl d
131Print debugging information.
132Repeating this option, adds more verbose debugging.
133.It Fl f
134Foreground mode (useful when debugging).
135Log messages will be dumped to stderr when this option is specified.
136.It Fl M Ar ifname
137Specify an interface to join the all-routers site-local multicast group.
138By default,
139.Nm
140tries to join the first advertising interface appearing on the command
141line.
142This option has meaning only with the
143.Fl R
144option, which enables routing renumbering protocol support.
145.\".It Fl m
146.\"Enables mobile IPv6 support.
147.\"This changes the content of router advertisement option, as well as
148.\"permitted configuration directives.
149.It Fl p Ar pidfile
150Specify an alternate location,
151.Ar pidfile ,
152for the PID file.
153By default,
154.Pa /var/run/rtadvd.pid
155is used.
156.It Fl R
157Accept router renumbering requests.
158If you enable it, an
159.Xr ipsec 4
160setup is suggested for security reasons.
161.\"On KAME-based systems,
162.\".Xr rrenumd 8
163.\"generates router renumbering request packets.
164This option is currently disabled, and is ignored by
165.Nm
166with a warning message.
167.It Fl s
168Do not add or delete prefixes dynamically.
169Only statically configured prefixes, if any, will be advertised.
170.El
171.Pp
172Use
173.Dv SIGHUP
174to reload the configuration file
175.Pa /etc/rtadvd.conf .
176If an invalid parameter is found in the configuration file upon the reload, the
177entry will be ignored and the old configuration will be used.
178When parameters in an existing entry are updated,
179.Nm
180will send Router Advertisement messages with the old configuration but zero
181router lifetime to the interface first, and then start to send a new message.
182.Pp
183Upon receipt of signal
184.Dv SIGUSR1 ,
185.Nm
186will dump the current internal state into
187.Pa /var/run/rtadvd.dump .
188.Pp
189Use
190.Dv SIGTERM
191to kill
192.Nm
193gracefully.
194In this case,
195.Nm
196will transmit router advertisement with router lifetime 0
197to all the interfaces
198.Pq in accordance with RFC 2461 6.2.5 .
199.Sh FILES
200.Bl -tag -width /var/run/rtadvd.dumpXX -compact
201.It Pa /etc/rtadvd.conf
202The default configuration file.
203.It Pa /var/run/rtadvd.pid
204Contains the PID of the currently running
205.Nm .
206.It Pa /var/run/rtadvd.dump
207The file in which
208.Nm
209dumps its internal state.
210.El
211.Sh EXIT STATUS
212.Ex -std rtadvd
213.Sh SEE ALSO
214.Xr rtadvd.conf 5 ,
215.Xr rtsol 8
216.Sh HISTORY
217The
218.Nm
219command first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
220.Sh BUGS
221There used to be some text that recommended users not to let
222.Nm
223advertise Router Advertisement messages on an upstream link to avoid
224undesirable
225.Xr icmp6 4
226redirect messages.
227However, based on later discussion in the IETF IPng working group,
228all routers should rather advertise the messages regardless of
229the network topology, in order to ensure reachability.
230