xref: /netbsd-src/usr.sbin/rtadvd/rtadvd.8 (revision 7bdf38e5b7a28439665f2fdeff81e36913eef7dd)
1.\"	$NetBSD: rtadvd.8,v 1.29 2020/04/21 12:19:44 wiz 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 April 21, 2020
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 CDdfs
40.Op Fl c Ar configfile
41.Op Fl p Ar pidfile
42.Ar interface ...
43.Sh DESCRIPTION
44.Nm
45sends router advertisement packets to the specified interfaces.
46.Pp
47The program will daemonize itself on invocation.
48It will then send router advertisement packets periodically, as well
49as in response to router solicitation messages sent by end hosts.
50.Pp
51Router advertisements can be configured on a per-interface basis, as
52described in
53.Xr rtadvd.conf 5 .
54.Pp
55If there is no configuration file entry for an interface,
56or if the configuration file does not exist at all,
57.Nm
58sets all the parameters to their default values.
59In particular,
60.Nm
61reads all the interface routes from the routing table and advertises
62them as on-link prefixes.
63.Pp
64.Nm
65also watches the routing table.
66If an interface direct route is
67added on an advertising interface and no static prefixes are
68specified by the configuration file,
69.Nm
70adds the corresponding prefix to its advertising list.
71.Pp
72Similarly, when an interface direct route is deleted,
73.Nm
74will start advertising the prefixes with zero valid and preferred
75lifetimes to help the receiving hosts switch to a new prefix when
76renumbering.
77Note, however, that the zero valid lifetime cannot invalidate the
78autoconfigured addresses at a receiving host immediately.
79According to the specification, the host will retain the address
80for a certain period, which will typically be two hours.
81The zero lifetimes rather intend to make the address deprecated,
82indicating that a new non-deprecated address should be used as the
83source address of a new connection.
84This behavior will last for two hours.
85Then
86.Nm
87will completely remove the prefix from the advertising list,
88and succeeding advertisements will not contain the prefix information.
89.Pp
90Moreover, if the status of an advertising interface changes,
91.Nm
92will start or stop sending router advertisements according
93to the latest status.
94.Pp
95The
96.Fl s
97option may be used to disable this behavior;
98.Nm
99will not watch the routing table and the whole functionality described
100above will be suppressed.
101.Pp
102Basically, hosts MUST NOT send Router Advertisement messages at any
103time (RFC 2461, Section 6.2.3).
104However, it would sometimes be useful to allow hosts to advertise some
105parameters such as prefix information and link MTU.
106Thus,
107.Nm
108can be invoked if router lifetime is explicitly set to zero on every
109advertising interface.
110.Pp
111The command line options are:
112.Bl -tag -width indent
113.\"
114.It Fl C
115Don't expire the existing configuration on receipt of SIGHUP.
116This option is only intended to aid the testing of clients that consume
117Router Advertisement messages.
118.It Fl c Ar configfile
119Specify an alternate location,
120.Ar configfile ,
121for the configuration file.
122By default,
123.Pa /etc/rtadvd.conf
124is used.
125.It Fl D
126Instead of printing errors using
127.Xr syslog 3
128send them to
129.Dv stderr .
130Also when
131.Xr poll 2
132fails, exit instead of retrying.
133.It Fl d
134Print debugging information.
135Repeating this option, adds more verbose debugging.
136.It Fl f
137Foreground mode (useful when debugging).
138Log messages will be dumped to stderr when this option is specified.
139.\".It Fl m
140.\"Enables mobile IPv6 support.
141.\"This changes the content of router advertisement option, as well as
142.\"permitted configuration directives.
143.It Fl p Ar pidfile
144Specify an alternate location,
145.Ar pidfile ,
146for the PID file.
147By default,
148.Pa /var/run/rtadvd.pid
149is used.
150.It Fl s
151Do not add or delete prefixes dynamically.
152Only statically configured prefixes, if any, will be advertised.
153.El
154.Pp
155Use
156.Dv SIGHUP
157to reload the configuration file
158.Pa /etc/rtadvd.conf .
159If an invalid parameter is found in the configuration file upon the reload, the
160entry will be ignored and the old configuration will be used.
161When parameters in an existing entry are updated and the
162.Fl C
163flag is not used,
164.Nm
165will send Router Advertisement messages with the old configuration but zero
166router lifetime to the interface first, and then start to send a new message.
167.Pp
168Upon receipt of signal
169.Dv SIGUSR1 ,
170.Nm
171will dump the current internal state into
172.Pa /var/run/rtadvd.dump .
173.Pp
174Use
175.Dv SIGTERM
176to kill
177.Nm
178gracefully.
179In this case,
180.Nm
181will transmit router advertisement with router lifetime 0
182to all the interfaces
183.Pq in accordance with RFC 2461 6.2.5 .
184.Sh FILES
185.Bl -tag -width /var/run/rtadvd.dumpXX -compact
186.It Pa /etc/rtadvd.conf
187The default configuration file.
188.It Pa /var/run/rtadvd.pid
189Contains the PID of the currently running
190.Nm .
191.It Pa /var/run/rtadvd.dump
192The file in which
193.Nm
194dumps its internal state.
195.El
196.Sh EXIT STATUS
197.Ex -std rtadvd
198.Sh SEE ALSO
199.Xr rtadvd.conf 5 ,
200.Xr rtsol 8
201.Sh HISTORY
202The
203.Nm
204command first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
205.Sh BUGS
206There used to be some text that recommended users not to let
207.Nm
208advertise Router Advertisement messages on an upstream link to avoid
209undesirable
210.Xr icmp6 4
211redirect messages.
212However, based on later discussion in the IETF IPng working group,
213all routers should rather advertise the messages regardless of
214the network topology, in order to ensure reachability.
215