1.\" $KAME: rtsold.8,v 1.20 2003/04/11 12:46:12 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 May 2, 2023 33.Dt RTSOLD 8 34.Os 35.\" 36.Sh NAME 37.Nm rtsold , rtsol 38.Nd router solicitation daemon 39.\" 40.Sh SYNOPSIS 41.Nm 42.Op Fl dDfFimu1 43.Op Fl M Ar script-name 44.Op Fl O Ar script-name 45.Op Fl A Ar script-name 46.Op Fl p Ar pidfile 47.Op Fl R Ar script-name 48.Ar interface ... 49.Nm 50.Op Fl dDfFimu1 51.Op Fl M Ar script-name 52.Op Fl O Ar script-name 53.Op Fl A Ar script-name 54.Op Fl p Ar pidfile 55.Op Fl R Ar script-name 56.Fl a 57.Nm rtsol 58.Op Fl dDiu 59.Op Fl M Ar script-name 60.Op Fl O Ar script-name 61.Op Fl A Ar script-name 62.Op Fl R Ar script-name 63.Ar interface ... 64.Nm rtsol 65.Op Fl dDiu 66.Op Fl M Ar script-name 67.Op Fl O Ar script-name 68.Op Fl A Ar script-name 69.Op Fl R Ar script-name 70.Fl a 71.\" 72.Sh DESCRIPTION 73.Nm 74is the daemon program to send ICMPv6 Router Solicitation messages 75on the specified interfaces. 76If a node (re)attaches to a link, 77.Nm 78sends some Router Solicitations on the link destined to the link-local scope 79all-routers multicast address to discover new routers 80and to get non link-local addresses. 81.Pp 82.Nm 83should be used on IPv6 hosts 84.Pq non-router nodes 85only. 86.Pp 87If you invoke the program as 88.Nm rtsol , 89it will transmit probes from the specified 90.Ar interface , 91without becoming a daemon. 92In other words, 93.Nm rtsol 94behaves as 95.Do 96.Nm 97.Fl f1 98.Ar interfaces 99.Dc . 100.Pp 101Specifically, 102.Nm 103sends at most 3 Router Solicitations on an interface 104after one of the following events: 105.Pp 106.Bl -bullet -compact 107.It 108Just after invocation of 109.Nm 110daemon. 111.It 112The interface is up after a temporary interface failure. 113.Nm 114detects such failures by periodically probing to see if the status 115of the interface is active or not. 116Note that some network cards and drivers do not allow the extraction 117of link state. 118In such cases, 119.Nm 120cannot detect the change of the interface status. 121.It 122Every 60 seconds if the 123.Fl m 124option is specified and the 125.Nm 126daemon cannot get the interface status. 127This feature does not conform to the IPv6 neighbor discovery 128specification, but is provided for mobile stations. 129The default interval for router advertisements, which is on the order of 10 130minutes, is slightly long for mobile stations. 131This feature is provided 132for such stations so that they can find new routers as soon as possible 133when they attach to another link. 134.El 135.Lp 136Once 137.Nm 138has sent a Router Solicitation, and has received a valid Router Advertisement, 139it refrains from sending additional solicitations on that interface, until 140the next time one of the above events occurs. 141.Lp 142When sending a Router Solicitation on an interface, 143.Nm 144includes a Source Link-layer address option if the interface 145has a link-layer address. 146.Lp 147.Nm 148manages a per-interface parameter to detect if a separate protocol is 149needed for configuration parameters other than host's addresses. 150At the invocation time, the flag is FALSE, and becomes TRUE when 151the daemon receives a router advertisement with the OtherConfig flag 152being set. 153A script file can be specified to deal with the case 154.Pq see below . 155When 156.Nm 157start resending router solicitation messages by one of the conditions 158events, 159the daemon resets the parameter because the event may indicate a 160change on the attached link. 161.Pp 162Upon receipt of signal 163.Dv SIGUSR1 , 164.Nm 165will dump the current internal state into 166.Pa /var/run/rtsold.dump . 167.\" 168.Pp 169The options are as follows: 170.Bl -tag -width indent 171.It Fl a 172Autoprobe outgoing interfaces. 173.Nm 174will try to find any non-loopback, IPv6-capable interfaces 175and send router solicitation messages on all of them. 176.It Fl d 177Enable debugging. 178.It Fl D 179Enable more debugging including the printing of internal timer information. 180.It Fl f 181Prevent 182.Nm 183from becoming a daemon (foreground mode). 184Warning messages are generated to standard error 185instead of 186.Xr syslog 3 . 187.It Fl F 188Explicitly configure the kernel to accept Router Advertisements and 189disable IPv6 forwarding. 190These settings are required for proper 191.Nm 192operation. 193Without this option, the current settings will be obeyed; 194if they are incompatible with proper operation, 195warning messages will be generated, 196but Router Solicitations will still be sent. 197The settings may be changed manually with 198.Xr sysctl 8 199and 200.Xr ifconfig 8 . 201.It Fl i 202Transmit Router Solicitation packets immediately, without waiting the 203normal random (between 0 and 1 second) delay. 204This option should not be used on networks where it might result in 205congestion due to many hosts simultaneously (re)connecting and 206sending such packets. 207.It Fl m 208Enable mobility support. 209If this option is specified, 210.Nm 211sends probing packets to default routers that have advertised Router 212Advertisements 213when the node (re)attaches to an interface. 214Moreover, if the option is specified, 215.Nm 216periodically sends Router Solicitation on an interface that does not support 217.Dv SIOCGIFMEDIA 218ioctl. 219.It Fl 1 220Perform only one probe. 221Transmit Router Solicitation packets until at least one valid Router 222Advertisement packet has arrived on each 223.Ar interface , 224then exit. 225.It Fl M Ar script-name 226Specifies a supplement script file to handle the Managed Configuration 227flag of the router advertisement. 228When the flag changes from FALSE to TRUE, 229.Nm 230will invoke 231.Ar script-name 232with a first argument of the receiving interface name 233and a second argument of the sending router address, 234expecting the script will then start a protocol for the managed 235configuration. 236.Ar script-name 237must be the absolute path from root to the script file, be a regular 238file, and be created by the same owner who runs 239.Nm . 240.It Fl O Ar script-name 241Specifies a supplement script file to handle the Other Configuration 242flag of the router advertisement. 243When the flag changes from FALSE to TRUE, 244.Nm 245will invoke 246.Ar script-name 247with a first argument of the receiving interface name 248and a second argument of the sending router address, 249expecting the script will then start a protocol for the other 250configuration. 251The script will not be run if the Managed Configuration flag in the 252router advertisement is also TRUE. 253.Ar script-name 254must be the absolute path from root to the script file, be a regular 255file, and be created by the same owner who runs 256.Nm . 257.It Fl A Ar script-name 258Specifies a supplement script file to always be called for the router 259advertisement. 260.Nm 261will invoke 262.Ar script-name 263with a first argument of the receiving interface name 264and a second argument of the sending router address. 265.Ar script-name 266must be the absolute path from root to the script file, be a regular 267file, and be created by the same owner who runs 268.Nm . 269.It Fl p Ar pidfile 270Writes the process ID of 271.Nm 272to 273.Pa pidfile 274instead of the default PID file 275.Pa /var/run/rtsold.pid . 276.It Fl R Ar script-name 277Specifies a script to run when router advertisement options 278.Dv RDNSS Pq Recursive DNS Server 279or 280.Dv DNSSL Pq DNS Search List 281are encountered. 282The information of DNS servers and DNS search domains will be sent to 283standard input of this script. 284The 285.Xr resolvconf 8 286script is used by default. 287.It Fl u 288Specifies whether to add the source address of Router Advertisement 289messages to the interface name in the parameters of the RDNSS and DNSSL 290scripts. 291.Pp 292If 293.Fl u 294is specified, the interface name in the script parameters will be 295.Ql ifname:slaac:[RA-source-address] . 296.Pp 297Otherwise it will be 298.Ql ifname:slaac . 299.El 300.Sh FILES 301.Bl -tag -width /var/run/rtsold.dump -compact 302.It Pa /var/run/rtsold.pid 303The PID of the currently running 304.Nm . 305.It Pa /var/run/rtsold.dump 306Internal state dump file. 307.El 308.\" 309.Sh EXIT STATUS 310.Ex -std 311.\" 312.Sh SEE ALSO 313.Xr resolvconf 8 , 314.Xr rtadvd 8 , 315.Xr sysctl 8 316.\" 317.Sh HISTORY 318The 319.Nm 320command is based on the 321.Nm rtsol 322command, which first appeared in WIDE/KAME IPv6 protocol stack kit. 323.Nm rtsol 324is now integrated into 325.Xr rtsold 8 . 326.\" 327.Sh BUGS 328When a network card is removed and reinserted, the corresponding interface index 329may change. 330However, 331.Nm 332assumes such changes will not occur, and always uses the index that 333it got at invocation. 334As a result, 335.Nm 336may not work if you reinsert a network card. 337In such a case, 338.Nm 339should be killed and restarted. 340.Pp 341The IPv6 autoconfiguration specification assumes a single-interface host. 342You may see kernel error messages if you try to autoconfigure a host with 343multiple interfaces. 344Also, it seems contradictory for 345.Nm 346to accept multiple 347.Ar interface 348arguments. 349