add Kerberos info
[unix-history] / usr / src / sbin / routed / routed.8
CommitLineData
ec338fb6
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
b0afce1a 3.\"
ec338fb6
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
b0afce1a 15.\"
ec338fb6
KB
16.\" @(#)routed.8 6.4 (Berkeley) %G%
17.\"
18.TH ROUTED 8 ""
b0afce1a
KM
19.UC 5
20.SH NAME
21routed \- network routing daemon
22.SH SYNOPSIS
23.B /etc/routed
24[
dfc5a452
MK
25.B \-d
26] [
27.B \-g
28] [
b0afce1a
KM
29.B \-s
30] [
31.B \-q
32] [
33.B \-t
34] [
35.I logfile
36]
37.SH DESCRIPTION
38.I Routed
39is invoked at boot time to manage the network routing tables.
40The routing daemon uses a variant of the Xerox NS Routing
41Information Protocol in maintaining up to date kernel routing
42table entries.
dfc5a452
MK
43It used a generalized protocol capable of use with multiple
44address types, but is currently used only for Internet routing
45within a cluster of networks.
b0afce1a
KM
46.PP
47In normal operation
48.I routed
dfc5a452 49listens on the
ec338fb6 50.IR udp (4)
dfc5a452
MK
51socket for the
52.I route
53service (see
54.IR services (5))
b0afce1a
KM
55for routing information packets. If the host is an
56internetwork router, it periodically supplies copies
57of its routing tables to any directly connected hosts
58and networks.
59.PP
60When
61.I routed
62is started, it uses the SIOCGIFCONF
63.I ioctl
64to find those
65directly connected interfaces configured into the
66system and marked ``up'' (the software loopback interface
67is ignored). If multiple interfaces
dfc5a452 68are present, it is assumed that the host will forward packets
b0afce1a
KM
69between networks.
70.I Routed
71then transmits a
72.I request
73packet on each interface (using a broadcast packet if
74the interface supports it) and enters a loop, listening
75for
76.I request
77and
78.I response
79packets from other hosts.
80.PP
81When a
82.I request
83packet is received,
84.I routed
85formulates a reply based on the information maintained in its
86internal tables. The
87.I response
88packet generated contains a list of known routes, each marked
89with a ``hop count'' metric (a count of 16, or greater, is
90considered ``infinite''). The metric associated with each
91route returned provides a metric
92.IR "relative to the sender" .
93.PP
94.I Response
95packets received by
96.I routed
97are used to update the routing tables if one of the following
98conditions is satisfied:
99.TP
100(1)
101No routing table entry exists for the destination network
102or host, and the metric indicates the destination is ``reachable''
103(i.e. the hop count is not infinite).
104.TP
105(2)
106The source host of the packet is the same as the router in the
107existing routing table entry. That is, updated information is
108being received from the very internetwork router through which
109packets for the destination are being routed.
110.TP
111(3)
112The existing entry in the routing table has not been updated for
113some time (defined to be 90 seconds) and the route is at least
114as cost effective as the current route.
115.TP
116(4)
117The new route describes a shorter route to the destination than
118the one currently stored in the routing tables; the metric of
119the new route is compared against the one stored in the table
120to decide this.
121.PP
122When an update is applied,
123.I routed
dfc5a452
MK
124records the change in its internal tables and updates the kernel
125routing table.
126The change is reflected in the next
b0afce1a 127.I response
dfc5a452 128packet sent.
b0afce1a
KM
129.PP
130In addition to processing incoming packets,
131.I routed
132also periodically checks the routing table entries.
133If an entry has not been updated for 3 minutes, the entry's metric
134is set to infinity and marked for deletion. Deletions are delayed
135an additional 60 seconds to insure the invalidation is propagated
dfc5a452 136throughout the local internet.
b0afce1a
KM
137.PP
138Hosts acting as internetwork routers gratuitously supply their
139routing tables every 30 seconds to all directly connected hosts
140and networks.
dfc5a452
MK
141The response is sent to the broadcast address on nets capable of that function,
142to the destination address on point-to-point links, and to the router's
143own address on other networks.
144The normal routing tables are bypassed when sending gratuitous responses.
145The reception of responses on each network is used to determine that the
146network and interface are functioning correctly.
147If no response is received on an interface, another route may be chosen
148to route around the interface, or the route may be dropped if no alternative
149is available.
b0afce1a 150.PP
dfc5a452
MK
151.I Routed supports several options:
152.TP
153.B \-d
154Enable additional debugging information to be logged,
155such as bad packets received.
156.TP
157.B \-g
158This flag is used on internetwork routers to offer a route
159to the ``default'' destination.
160This is typically used on a gateway to the Internet,
161or on a gateway that uses another routing protocol whose routes
162are not reported to other local routers.
163.TP
b0afce1a 164.B \-s
dfc5a452 165Supplying this
b0afce1a
KM
166option forces
167.I routed
168to supply routing information whether it is acting as an internetwork
169router or not.
dfc5a452
MK
170This is the default if multiple network interfaces are present,
171or if a point-to-point link is in use.
172.TP
b0afce1a 173.B \-q
dfc5a452
MK
174This
175is the opposite of the
b0afce1a 176.B \-s
dfc5a452
MK
177option.
178.TP
179.B \-t
180If the
b0afce1a
KM
181.B \-t
182option is specified, all packets sent or received are
183printed on the standard output. In addition,
184.I routed
185will not divorce itself from the controlling terminal
186so that interrupts from the keyboard will kill the process.
dfc5a452 187.PP
b0afce1a
KM
188Any other argument supplied is interpreted as the name
189of file in which
190.IR routed 's
191actions should be logged. This log contains information
dfc5a452
MK
192about any changes to the routing tables and, if not tracing all packets,
193a history of recent messages sent and received which are related to
b0afce1a
KM
194the changed route.
195.PP
196In addition to the facilities described above,
197.I routed
198supports the notion of ``distant''
199.I passive
200and
201.I active
202gateways. When
203.I routed
204is started up, it reads the file
205.I /etc/gateways
dfc5a452
MK
206to find gateways which may not be located using
207only information from the SIOGIFCONF
b0afce1a
KM
208.IR ioctl .
209Gateways specified in this manner should be marked passive
210if they are not expected to exchange routing information,
211while gateways marked active
212should be willing to exchange routing information (i.e.
213they should have a
214.I routed
215process running on the machine).
438b45db
MK
216Routes through passive gateways are installed in the
217kernel's routing tables once upon startup.
218Such routes are not included in
b0afce1a
KM
219any routing information transmitted.
220Active gateways are treated equally to network
221interfaces. Routing information is distributed
222to the gateway and if no routing information is
223received for a period of the time, the associated
224route is deleted.
438b45db
MK
225Gateways marked
226.I external
227are also passive, but are not placed in the kernel
dfc5a452
MK
228routing table nor are they included in routing updates.
229The function of external entries is to inform
230.I routed
231that another routing process
232will install such a route, and that alternate routes to that destination
233should not be installed.
234Such entries are only required when both routers may learn of routes
235to the same destination.
b0afce1a
KM
236.PP
237The
238.I /etc/gateways
239is comprised of a series of lines, each in
240the following format:
241.PP
242.nf
dfc5a452 243< \fBnet\fP | \fBhost\fP > \fIname1\fP \fBgateway\fP \fIname2\fP \fBmetric\fP \fIvalue\fP < \fBpassive\fP | \fBactive\fP | \fBexternal\fP >
b0afce1a
KM
244.fi
245.PP
246The
247.B net
248or
249.B host
250keyword indicates if the route is to a network or specific host.
251.PP
252.I Name1
253is the name of the destination network or host. This may be a
254symbolic name located in
255.I /etc/networks
256or
dfc5a452
MK
257.I /etc/hosts
258(or, if started after
259.IR named (8),
260known to the name server),
b0afce1a 261or an Internet address specified in ``dot'' notation; see
ec338fb6 262.IR inet (3).
b0afce1a
KM
263.PP
264.I Name2
265is the name or address of the gateway to which messages should
266be forwarded.
267.PP
268.I Value
269is a metric indicating the hop count to the destination host
270or network.
271.PP
dfc5a452
MK
272One of the keywords
273.BR passive ,
b0afce1a 274.B active
dfc5a452
MK
275or
276.B external
b0afce1a
KM
277indicates if the gateway should be treated as
278.I passive
279or
280.I active
dfc5a452 281(as described above),
438b45db
MK
282or whether the gateway is
283.I external
284to the scope of the
dfc5a452
MK
285.I routed
286protocol.
287.PP
288Internetwork routers that are directly attached to the Arpanet or Milnet
289should use the Exterior Gateway Protocol (EGP) to gather routing information
290rather then using a static routing table of passive gateways.
291EGP is required in order to provide routes for local networks to the rest
292of the Internet system.
293Sites needing assistance with such configurations
294should contact the Computer Systems Research Group at Berkeley.
b0afce1a
KM
295.SH FILES
296.DT
297/etc/gateways for distant gateways
298.SH "SEE ALSO"
299``Internet Transport Protocols'', XSIS 028112, Xerox System Integration
300Standard.
301.br
ec338fb6 302udp(4), icmp(4), XNSrouted(8), htable(8)
b0afce1a
KM
303.SH BUGS
304The kernel's routing tables may not correspond to those of
305.I routed
dfc5a452 306when redirects change or add routes.
438b45db
MK
307.I Routed
308should note any redirects received by reading
309the ICMP packets received via a raw socket.
b0afce1a
KM
310.PP
311.I Routed
dfc5a452
MK
312should incorporate other routing protocols,
313such as Xerox NS
ec338fb6 314.RI ( XNSrouted (8))
dfc5a452
MK
315and EGP.
316Using separate processes for each requires configuration options
317to avoid redundant or competing routes.
318.PP
319.I Routed
438b45db
MK
320should listen to intelligent interfaces, such as an IMP,
321to gather more information.
dfc5a452
MK
322It does not always detect unidirectional failures in network interfaces
323(e.g., when the output side fails).