xref: /netbsd-src/usr.sbin/rtadvd/rtadvd.8 (revision 02044da044d3285336e5b61697ff08be0e74b0c7)
1*02044da0Swiz.\"	$NetBSD: rtadvd.8,v 1.29 2020/04/21 12:19:44 wiz Exp $
28c2379fdSrpaulo.\"	$KAME: rtadvd.8,v 1.24 2002/05/31 16:16:08 jinmei Exp $
3293291b2Sitojun.\"
4134b5f49Sitojun.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5134b5f49Sitojun.\" All rights reserved.
6134b5f49Sitojun.\"
7134b5f49Sitojun.\" Redistribution and use in source and binary forms, with or without
8134b5f49Sitojun.\" modification, are permitted provided that the following conditions
9134b5f49Sitojun.\" are met:
10134b5f49Sitojun.\" 1. Redistributions of source code must retain the above copyright
11134b5f49Sitojun.\"    notice, this list of conditions and the following disclaimer.
12134b5f49Sitojun.\" 2. Redistributions in binary form must reproduce the above copyright
13134b5f49Sitojun.\"    notice, this list of conditions and the following disclaimer in the
14134b5f49Sitojun.\"    documentation and/or other materials provided with the distribution.
15134b5f49Sitojun.\" 3. Neither the name of the project nor the names of its contributors
16134b5f49Sitojun.\"    may be used to endorse or promote products derived from this software
17134b5f49Sitojun.\"    without specific prior written permission.
18134b5f49Sitojun.\"
19134b5f49Sitojun.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20134b5f49Sitojun.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21134b5f49Sitojun.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22134b5f49Sitojun.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23134b5f49Sitojun.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24134b5f49Sitojun.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25134b5f49Sitojun.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26134b5f49Sitojun.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27134b5f49Sitojun.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28134b5f49Sitojun.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29134b5f49Sitojun.\" SUCH DAMAGE.
30134b5f49Sitojun.\"
31afce0d5dSroy.Dd April 21, 2020
32134b5f49Sitojun.Dt RTADVD 8
33134b5f49Sitojun.Os
34134b5f49Sitojun.Sh NAME
35134b5f49Sitojun.Nm rtadvd
36134b5f49Sitojun.Nd router advertisement daemon
37134b5f49Sitojun.Sh SYNOPSIS
38134b5f49Sitojun.Nm
39afce0d5dSroy.Op Fl CDdfs
40134b5f49Sitojun.Op Fl c Ar configfile
410739b470Sozaki-r.Op Fl p Ar pidfile
42134b5f49Sitojun.Ar interface ...
43134b5f49Sitojun.Sh DESCRIPTION
44e459e761Sitojun.Nm
4514a2986cSwizsends router advertisement packets to the specified interfaces.
46134b5f49Sitojun.Pp
47134b5f49SitojunThe program will daemonize itself on invocation.
482530603bSbjh21It will then send router advertisement packets periodically, as well
49293291b2Sitojunas in response to router solicitation messages sent by end hosts.
50134b5f49Sitojun.Pp
51293291b2SitojunRouter advertisements can be configured on a per-interface basis, as
52293291b2Sitojundescribed in
53134b5f49Sitojun.Xr rtadvd.conf 5 .
54134b5f49Sitojun.Pp
552530603bSbjh21If there is no configuration file entry for an interface,
5614a2986cSwizor if the configuration file does not exist at all,
57134b5f49Sitojun.Nm
58134b5f49Sitojunsets all the parameters to their default values.
59134b5f49SitojunIn particular,
60134b5f49Sitojun.Nm
61293291b2Sitojunreads all the interface routes from the routing table and advertises
62134b5f49Sitojunthem as on-link prefixes.
63134b5f49Sitojun.Pp
64e459e761Sitojun.Nm
65293291b2Sitojunalso watches the routing table.
668c2379fdSrpauloIf an interface direct route is
678c2379fdSrpauloadded on an advertising interface and no static prefixes are
6819a4d091Sitojunspecified by the configuration file,
69134b5f49Sitojun.Nm
708c2379fdSrpauloadds the corresponding prefix to its advertising list.
718c2379fdSrpaulo.Pp
728c2379fdSrpauloSimilarly, when an interface direct route is deleted,
738c2379fdSrpaulo.Nm
748c2379fdSrpaulowill start advertising the prefixes with zero valid and preferred
758c2379fdSrpaulolifetimes to help the receiving hosts switch to a new prefix when
768c2379fdSrpaulorenumbering.
778c2379fdSrpauloNote, however, that the zero valid lifetime cannot invalidate the
788c2379fdSrpauloautoconfigured addresses at a receiving host immediately.
798c2379fdSrpauloAccording to the specification, the host will retain the address
808c2379fdSrpaulofor a certain period, which will typically be two hours.
818c2379fdSrpauloThe zero lifetimes rather intend to make the address deprecated,
828c2379fdSrpauloindicating that a new non-deprecated address should be used as the
838c2379fdSrpaulosource address of a new connection.
848c2379fdSrpauloThis behavior will last for two hours.
858c2379fdSrpauloThen
868c2379fdSrpaulo.Nm
878c2379fdSrpaulowill completely remove the prefix from the advertising list,
888c2379fdSrpauloand succeeding advertisements will not contain the prefix information.
898c2379fdSrpaulo.Pp
9019a4d091SitojunMoreover, if the status of an advertising interface changes,
9119a4d091Sitojun.Nm
9219a4d091Sitojunwill start or stop sending router advertisements according
9319a4d091Sitojunto the latest status.
94293291b2Sitojun.Pp
958c2379fdSrpauloThe
968c2379fdSrpaulo.Fl s
978c2379fdSrpaulooption may be used to disable this behavior;
988c2379fdSrpaulo.Nm
998c2379fdSrpaulowill not watch the routing table and the whole functionality described
1008c2379fdSrpauloabove will be suppressed.
1018c2379fdSrpaulo.Pp
102a88307abSitojunBasically, hosts MUST NOT send Router Advertisement messages at any
103a88307abSitojuntime (RFC 2461, Section 6.2.3).
104a88307abSitojunHowever, it would sometimes be useful to allow hosts to advertise some
105a88307abSitojunparameters such as prefix information and link MTU.
106a88307abSitojunThus,
107a88307abSitojun.Nm
10814a2986cSwizcan be invoked if router lifetime is explicitly set to zero on every
109a88307abSitojunadvertising interface.
110a88307abSitojun.Pp
111293291b2SitojunThe command line options are:
112134b5f49Sitojun.Bl -tag -width indent
113134b5f49Sitojun.\"
1148a7de488Sroy.It Fl C
1158a7de488SroyDon't expire the existing configuration on receipt of SIGHUP.
1168a7de488SroyThis option is only intended to aid the testing of clients that consume
1178a7de488SroyRouter Advertisement messages.
11814a2986cSwiz.It Fl c Ar configfile
119134b5f49SitojunSpecify an alternate location,
120134b5f49Sitojun.Ar configfile ,
121134b5f49Sitojunfor the configuration file.
122134b5f49SitojunBy default,
1233f638e0bSitojun.Pa /etc/rtadvd.conf
124134b5f49Sitojunis used.
12514a2986cSwiz.It Fl D
1264c18e5f4SchristosInstead of printing errors using
1274c18e5f4Schristos.Xr syslog 3
1284c18e5f4Schristossend them to
1294c18e5f4Schristos.Dv stderr .
1304c18e5f4SchristosAlso when
1314c18e5f4Schristos.Xr poll 2
1324c18e5f4Schristosfails, exit instead of retrying.
133134b5f49Sitojun.It Fl d
134293291b2SitojunPrint debugging information.
1354c18e5f4SchristosRepeating this option, adds more verbose debugging.
136134b5f49Sitojun.It Fl f
137293291b2SitojunForeground mode (useful when debugging).
138cde8ec7dSitojunLog messages will be dumped to stderr when this option is specified.
1396f7d4a05Sitojun.\".It Fl m
1406f7d4a05Sitojun.\"Enables mobile IPv6 support.
1416f7d4a05Sitojun.\"This changes the content of router advertisement option, as well as
1426f7d4a05Sitojun.\"permitted configuration directives.
1430739b470Sozaki-r.It Fl p Ar pidfile
1440739b470Sozaki-rSpecify an alternate location,
1450739b470Sozaki-r.Ar pidfile ,
1460739b470Sozaki-rfor the PID file.
1470739b470Sozaki-rBy default,
1480739b470Sozaki-r.Pa /var/run/rtadvd.pid
1490739b470Sozaki-ris used.
1506f7d4a05Sitojun.It Fl s
15119a4d091SitojunDo not add or delete prefixes dynamically.
15219a4d091SitojunOnly statically configured prefixes, if any, will be advertised.
153134b5f49Sitojun.El
154faa17682Sitojun.Pp
15583ab5659SroyUse
15683ab5659Sroy.Dv SIGHUP
15783ab5659Sroyto reload the configuration file
15883ab5659Sroy.Pa /etc/rtadvd.conf .
15983ab5659SroyIf an invalid parameter is found in the configuration file upon the reload, the
16083ab5659Sroyentry will be ignored and the old configuration will be used.
1618a7de488SroyWhen parameters in an existing entry are updated and the
1628a7de488Sroy.Fl C
1638a7de488Sroyflag is not used,
16483ab5659Sroy.Nm
16583ab5659Sroywill send Router Advertisement messages with the old configuration but zero
16683ab5659Sroyrouter lifetime to the interface first, and then start to send a new message.
16783ab5659Sroy.Pp
168e459e761SitojunUpon receipt of signal
169e459e761Sitojun.Dv SIGUSR1 ,
170e459e761Sitojun.Nm
171e459e761Sitojunwill dump the current internal state into
172e459e761Sitojun.Pa /var/run/rtadvd.dump .
173e459e761Sitojun.Pp
174faa17682SitojunUse
175faa17682Sitojun.Dv SIGTERM
176faa17682Sitojunto kill
177faa17682Sitojun.Nm
178faa17682Sitojungracefully.
179faa17682SitojunIn this case,
180faa17682Sitojun.Nm
181faa17682Sitojunwill transmit router advertisement with router lifetime 0
182faa17682Sitojunto all the interfaces
1832530603bSbjh21.Pq in accordance with RFC 2461 6.2.5 .
184134b5f49Sitojun.Sh FILES
18514a2986cSwiz.Bl -tag -width /var/run/rtadvd.dumpXX -compact
1869f2f48b6Sitojun.It Pa /etc/rtadvd.conf
187134b5f49SitojunThe default configuration file.
188e459e761Sitojun.It Pa /var/run/rtadvd.pid
18914a2986cSwizContains the PID of the currently running
19014a2986cSwiz.Nm .
191e459e761Sitojun.It Pa /var/run/rtadvd.dump
1920e143d0aSwizThe file in which
193e459e761Sitojun.Nm
194e459e761Sitojundumps its internal state.
195134b5f49Sitojun.El
19695057845Swiz.Sh EXIT STATUS
19795057845Swiz.Ex -std rtadvd
198134b5f49Sitojun.Sh SEE ALSO
199134b5f49Sitojun.Xr rtadvd.conf 5 ,
200134b5f49Sitojun.Xr rtsol 8
201134b5f49Sitojun.Sh HISTORY
202134b5f49SitojunThe
203134b5f49Sitojun.Nm
2040e143d0aSwizcommand first appeared in the WIDE Hydrangea IPv6 protocol stack kit.
2052218541fSwiz.Sh BUGS
206a88307abSitojunThere used to be some text that recommended users not to let
207a88307abSitojun.Nm
208a88307abSitojunadvertise Router Advertisement messages on an upstream link to avoid
209a88307abSitojunundesirable
210293291b2Sitojun.Xr icmp6 4
211a88307abSitojunredirect messages.
21214a2986cSwizHowever, based on later discussion in the IETF IPng working group,
213a88307abSitojunall routers should rather advertise the messages regardless of
214a88307abSitojunthe network topology, in order to ensure reachability.
215