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