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