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