must not do ginode() on numbers less than ROOTINO
[unix-history] / usr / src / sbin / routed / routed.8
CommitLineData
b0afce1a
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
c7f51af8 5.\" @(#)routed.8 6.1 (Berkeley) %G%
b0afce1a 6.\"
c7f51af8 7.TH ROUTED 8C ""
b0afce1a
KM
8.UC 5
9.SH NAME
10routed \- network routing daemon
11.SH SYNOPSIS
12.B /etc/routed
13[
14.B \-s
15] [
16.B \-q
17] [
18.B \-t
19] [
20.I logfile
21]
22.SH DESCRIPTION
23.I Routed
24is invoked at boot time to manage the network routing tables.
25The routing daemon uses a variant of the Xerox NS Routing
26Information Protocol in maintaining up to date kernel routing
27table entries.
28.PP
29In normal operation
30.I routed
31listens on
32.IR udp (4P)
33socket 520 (decimal)
34for routing information packets. If the host is an
35internetwork router, it periodically supplies copies
36of its routing tables to any directly connected hosts
37and networks.
38.PP
39When
40.I routed
41is started, it uses the SIOCGIFCONF
42.I ioctl
43to find those
44directly connected interfaces configured into the
45system and marked ``up'' (the software loopback interface
46is ignored). If multiple interfaces
47are present, it is assumed the host will forward packets
48between networks.
49.I Routed
50then transmits a
51.I request
52packet on each interface (using a broadcast packet if
53the interface supports it) and enters a loop, listening
54for
55.I request
56and
57.I response
58packets from other hosts.
59.PP
60When a
61.I request
62packet is received,
63.I routed
64formulates a reply based on the information maintained in its
65internal tables. The
66.I response
67packet generated contains a list of known routes, each marked
68with a ``hop count'' metric (a count of 16, or greater, is
69considered ``infinite''). The metric associated with each
70route returned provides a metric
71.IR "relative to the sender" .
72.PP
73.I Response
74packets received by
75.I routed
76are used to update the routing tables if one of the following
77conditions is satisfied:
78.TP
79(1)
80No routing table entry exists for the destination network
81or host, and the metric indicates the destination is ``reachable''
82(i.e. the hop count is not infinite).
83.TP
84(2)
85The source host of the packet is the same as the router in the
86existing routing table entry. That is, updated information is
87being received from the very internetwork router through which
88packets for the destination are being routed.
89.TP
90(3)
91The existing entry in the routing table has not been updated for
92some time (defined to be 90 seconds) and the route is at least
93as cost effective as the current route.
94.TP
95(4)
96The new route describes a shorter route to the destination than
97the one currently stored in the routing tables; the metric of
98the new route is compared against the one stored in the table
99to decide this.
100.PP
101When an update is applied,
102.I routed
103records the change in its internal tables and generates a
104.I response
105packet to all directly connected hosts and networks.
106.I Routed
107waits a short period
108of time (no more than 30 seconds) before modifying the kernel's
109routing tables to allow possible unstable situations to settle.
110.PP
111In addition to processing incoming packets,
112.I routed
113also periodically checks the routing table entries.
114If an entry has not been updated for 3 minutes, the entry's metric
115is set to infinity and marked for deletion. Deletions are delayed
116an additional 60 seconds to insure the invalidation is propagated
117throughout the internet.
118.PP
119Hosts acting as internetwork routers gratuitously supply their
120routing tables every 30 seconds to all directly connected hosts
121and networks.
122.PP
123Supplying the
124.B \-s
125option forces
126.I routed
127to supply routing information whether it is acting as an internetwork
128router or not.
129The
130.B \-q
131option is the opposite of the
132.B \-s
133option. If the
134.B \-t
135option is specified, all packets sent or received are
136printed on the standard output. In addition,
137.I routed
138will not divorce itself from the controlling terminal
139so that interrupts from the keyboard will kill the process.
140Any other argument supplied is interpreted as the name
141of file in which
142.IR routed 's
143actions should be logged. This log contains information
144about any changes to the routing tables and a history of
145recent messages sent and received which are related to
146the changed route.
147.PP
148In addition to the facilities described above,
149.I routed
150supports the notion of ``distant''
151.I passive
152and
153.I active
154gateways. When
155.I routed
156is started up, it reads the file
157.I /etc/gateways
158to find gateways which may not be identified using
159the SIOGIFCONF
160.IR ioctl .
161Gateways specified in this manner should be marked passive
162if they are not expected to exchange routing information,
163while gateways marked active
164should be willing to exchange routing information (i.e.
165they should have a
166.I routed
167process running on the machine).
168Passive gateways are maintained in the
169routing tables forever and information
170regarding their existence is included in
171any routing information transmitted.
172Active gateways are treated equally to network
173interfaces. Routing information is distributed
174to the gateway and if no routing information is
175received for a period of the time, the associated
176route is deleted.
177.PP
178The
179.I /etc/gateways
180is comprised of a series of lines, each in
181the following format:
182.PP
183.nf
184< \fBnet\fP | \fBhost\fP > \fIname1\fP \fBgateway\fP \fIname2\fP \fBmetric\fP \fIvalue\fP < \fBpassive\fP | \fBactive\fP >
185.fi
186.PP
187The
188.B net
189or
190.B host
191keyword indicates if the route is to a network or specific host.
192.PP
193.I Name1
194is the name of the destination network or host. This may be a
195symbolic name located in
196.I /etc/networks
197or
198.IR /etc/hosts ,
199or an Internet address specified in ``dot'' notation; see
200.IR inet (3N).
201.PP
202.I Name2
203is the name or address of the gateway to which messages should
204be forwarded.
205.PP
206.I Value
207is a metric indicating the hop count to the destination host
208or network.
209.PP
210The keyword
211.B passive
212or
213.B active
214indicates if the gateway should be treated as
215.I passive
216or
217.I active
218(as described above).
219.SH FILES
220.DT
221/etc/gateways for distant gateways
222.SH "SEE ALSO"
223``Internet Transport Protocols'', XSIS 028112, Xerox System Integration
224Standard.
225.br
226udp(4P)
227.SH BUGS
228The kernel's routing tables may not correspond to those of
229.I routed
230for short periods of time while processes utilizing existing
231routes exit; the only remedy for this is to place the routing
232process in the kernel.
233.PP
234.I Routed
235should listen to intelligent interfaces, such as an IMP, and
236to error protocols, such as ICMP, to gather more information.