summaryrefslogtreecommitdiffstats
path: root/sbin/rdisc/rdisc.8
blob: ca51bea9bb8cdb46f2e4d66631b67c00747a2be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
.\" @(#)rdisc.8c 1.4 96/1/22 FreeBSD
'\"macro stdmacro
.\"
.\" Rdisc (this program) was developed by Sun Microsystems, Inc. and is 
.\" provided for unrestricted use provided that this legend is included on 
.\" all tape media and as a part of the software program in whole or part.  
.\" Users may copy or modify Rdisc without charge, and they may freely 
.\" distribute it.
.\"
.\" RDISC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
.\" WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
.\"
.\" Rdisc is provided with no support and without any obligation on the
.\" part of Sun Microsystems, Inc. to assist in its use, correction,
.\" modification or enhancement.
.\"
.\" SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
.\" INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY RDISC
.\" OR ANY PART THEREOF.
.\"
.\" In no event will Sun Microsystems, Inc. be liable for any lost revenue
.\" or profits or other special, indirect and consequential damages, even if
.\" Sun has been advised of the possibility of such damages.
.\"
.\" Sun Microsystems, Inc.
.\" 2550 Garcia Avenue
.\" Mountain View, California  94043
.\"
.nr X
.TH rdisc 8C "22 Jan 1996"
.SH NAME
rdisc \- network router discovery daemon
.SH SYNOPSIS
.B rdisc
[
.B \-sfa
]
.LP
.B rdisc
.B \-r
[
.BI \-p " preference"
] [
.BI \-T " interval"
]
.SH DESCRIPTION
.IX "rdisc" "" "\fLrdisc\fP \(em ICMP router discovery daemon"
.IX "Internet" "ICMP router discovery daemon" ""  "ICMP router discovery daemon \(em \fLrdisc\fP"
.IX "Internet Control Message Protocol" "See ICMP"
.IX "ICMP" "router discovery daemon" "" "router discovery daemon \(em \fLrdisc\fP"  
.LP
\f4rdisc\f1
implements the 
.SM ICMP
router discover protocol.
The first form of the command is used on hosts and the
second form is used on routers.
On a host \f4rdisc\f1 is invoked at 
boot time to populate the network routing tables with default routes. 
On a router it is also invoked at boot time in order to start
advertising the router to all the hosts.
.SS "Host (First Form)"
.PP
On a host \f4rdisc\f1
listens on the \f4ALL_HOSTS\f1 (224.0.0.1) multicast address 
for \f4ROUTER_ADVERTISE\f1 messages from routers. The received
messages are handled by first ignoring
those listed router addresses with which the host does not share a network.
Among the remaining addresses the ones with the highest preference are selected
as default routers and a default route is entered in the kernel routing
table for each one of them.
.LP
Optionally, \f4rdisc\f1 can avoid waiting for routers to announce 
themselves by sending out a few \f4ROUTER_SOLICITATION\f1 messages
to the \f4ALL_ROUTERS\f1 (224.0.0.2) multicast address when it is started.
.LP
A timer is associated with each router address and the address will
no longer be considered for inclusion in the the routing tables if the 
timer expires before a new 
.I advertise
message is received from the router.
The address will also be excluded from consideration if the host receives an 
.I advertise
message with the preference being maximally negative.
.SS "Router (Second Form)"
.PP
When 
\f4rdisc\f1
is started on a router, it uses the
\f4SIOCGIFCONF\f1
.BR ioctl (2)
to find the interfaces configured into the system and it starts
listening on the \f4ALL_ROUTERS\f1 multicast address on all the interfaces
that support multicast.
It sends out
.I advertise
messages to the \f4ALL_HOSTS\f1 multicast address advertising all its
.BM IP
addresses.
A few initial 
.I advertise
messages are sent out during the first 30 seconds and after that it will
transmit 
.I advertise
messages approximately every 600 seconds.
.LP
When \f4rdisc\f1
receives a 
.I solicitation
message it sends an 
.I advertise 
message to the host that sent the 
.I solicitation
message.
.LP
When
.B rdisc
is terminated by a signal it sends out an
.I advertise
message with the preference being maximally negative.
.br
.ne 1i
.SH OPTIONS
.TP 15
.B \-a
Accept all routers independently of the preference they have in their 
.I advertise
messages.
Normally
.B rdisc
only accepts (and enters in the kernel routing tables) 
the router or routers with the highest preference.
.TP
.B \-f
Run
.B rdisc 
forever even if no routers are found.
Normally 
.B rdisc 
gives up if it has not received any 
.I advertise 
message after after soliciting three times,
in which case it exits with a non-zero exit code.
If 
.B \-f 
is not specified in the first form then 
.B \-s
must be specified.
.TP
.BI \-p " preference"
Set the preference transmitted in the 
.I solicitation
messages.
The default is zero.
.TP
.B \-r
Act as a router as opposed to a host.
.TP
.B \-s
Send three 
.I solicitation
messages initially to quickly discover the routers
when the system is booted.
When 
.B \-s
is specified 
.B rdisc
exits with a non-zero exit code if it can not find any routers.
This can be overridden with the
.B \-f
option.
.TP
.BI \-T " interval"
Set the interval between transmitting the
.I advertise
messages.
The default time is 600 seconds.
.SH "SEE ALSO"
.BR routed (8)
.BR icmp (4),
.BR inet (4)
.LP
Deering, S.E.,ed
.RI `` "ICMP Router Discovery Messages" ,''
.SM RFC
1256, Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
September 1991.
OpenPOWER on IntegriCloud