1in.routed(1M) System Administration Commands in.routed(1M)
2
3
4
6 in.routed, routed - network routing daemon
7
9 /usr/sbin/in.routed [-AdghmnqsStVz] [-T tracefile [-v]]
10 [-F net[/mask ][,metric]] [-P params]
11
12
14 The daemon in.routed, often referred to as routed, is invoked at boot
15 time to manage the network routing tables. It uses Routing Information
16 Protocol, RIPv1 (RFC 1058), RIPv2 (RFC 2453), and Internet Router Dis‐
17 covery Protocol (RFC 1256) to maintain the kernel routing table. The
18 RIPv1 protocol is based on the reference 4.3BSD daemon.
19
20
21 in.routed is managed by means of the service management facility (SMF),
22 using the fault management resource identifier (FMRI):
23
24 svc:/network/routing/route:default
25
26
27
28
29 The daemon listens on a udp socket for the route service (see ser‐
30 vices(4)) for Routing Information Protocol packets. It also sends and
31 receives multicast Router Discovery ICMP messages. If the host is a
32 router, in.routed periodically supplies copies of its routing tables to
33 any directly connected hosts and networks. It also advertises or solic‐
34 its default routes using Router Discovery ICMP messages.
35
36
37 When started (or when a network interface is later turned on),
38 in.routed uses an AF_ROUTE address family facility to find those
39 directly connected interfaces configured into the system and marked
40 "up". It adds necessary routes for the interfaces to the kernel routing
41 table. Soon after being first started, and provided there is at least
42 one interface on which RIP has not been disabled, in.routed deletes all
43 pre-existing non-static routes in the kernel table. Static routes in
44 the kernel table are preserved and included in RIP responses if they
45 have a valid RIP metric (see route(1M)).
46
47
48 If more than one interface is present (not counting the loopback inter‐
49 face), it is assumed that the host should forward packets among the
50 connected networks. After transmitting a RIP request and Router Discov‐
51 ery Advertisements or Solicitations on a new interface, the daemon
52 enters a loop, listening for RIP request and response and Router Dis‐
53 covery packets from other hosts.
54
55
56 When a request packet is received, in.routed formulates a reply based
57 on the information maintained in its internal tables. The response
58 packet generated contains a list of known routes, each marked with a
59 "hop count" metric (a count of 16 or greater is considered "infinite").
60 Advertised metrics reflect the metric associated with an interface (see
61 ifconfig(1M)), so setting the metric on an interface is an effective
62 way to steer traffic.
63
64
65 Responses do not include routes with a first hop on the requesting net‐
66 work, to implement in part split-horizon. Requests from query programs
67 such as rtquery(1M) are answered with the complete table.
68
69
70 The routing table maintained by the daemon includes space for several
71 gateways for each destination to speed recovery from a failing router.
72 RIP response packets received are used to update the routing tables,
73 provided they are from one of the several currently recognized gateways
74 or advertise a better metric than at least one of the existing gate‐
75 ways.
76
77
78 When an update is applied, in.routed records the change in its own
79 tables and updates the kernel routing table if the best route to the
80 destination changes. The change in the kernel routing table is
81 reflected in the next batch of response packets sent. If the next
82 response is not scheduled for a while, a flash update response contain‐
83 ing only recently changed routes is sent.
84
85
86 In addition to processing incoming packets, in.routed also periodically
87 checks the routing table entries. If an entry has not been updated for
88 3 minutes, the entry's metric is set to infinity and marked for dele‐
89 tion. Deletions are delayed until the route has been advertised with an
90 infnite metric to insure the invalidation is propagated throughout the
91 local internet. This is a form of poison reverse.
92
93
94 Routes in the kernel table that are added or changed as a result of
95 ICMP Redirect messages are deleted after a while to minimize black-
96 holes. When a TCP connection suffers a timeout, the kernel tells
97 in.routed, which deletes all redirected routes through the gateway
98 involved, advances the age of all RIP routes through the gateway to
99 allow an alternate to be chosen, and advances of the age of any rele‐
100 vant Router Discovery Protocol default routes.
101
102
103 Hosts acting as internetwork routers gratuitously supply their routing
104 tables every 30 seconds to all directly connected hosts and networks.
105 These RIP responses are sent to the broadcast address on nets that sup‐
106 port broadcasting, to the destination address on point-to-point links,
107 and to the router's own address on other networks. If RIPv2 is enabled,
108 multicast packets are sent on interfaces that support multicasting.
109
110
111 If no response is received on a remote interface, if there are errors
112 while sending responses, or if there are more errors than input or out‐
113 put (see netstat(1M)), then the cable or some other part of the inter‐
114 face is assumed to be disconnected or broken, and routes are adjusted
115 appropriately.
116
117
118 The Internet Router Discovery Protocol is handled similarly. When the
119 daemon is supplying RIP routes, it also listens for Router Discovery
120 Solicitations and sends Advertisements. When it is quiet and listening
121 to other RIP routers, it sends Solicitations and listens for Advertise‐
122 ments. If it receives a good Advertisement and it is not multi-homed,
123 it stops listening for broadcast or multicast RIP responses. It tracks
124 several advertising routers to speed recovery when the currently chosen
125 router dies. If all discovered routers disappear, the daemon resumes
126 listening to RIP responses. It continues listening to RIP while using
127 Router Discovery if multi-homed to ensure all interfaces are used.
128
129
130 The Router Discovery standard requires that advertisements have a
131 default "lifetime" of 30 minutes. That means should something happen, a
132 client can be without a good route for 30 minutes. It is a good idea to
133 reduce the default to 45 seconds using -P rdisc_interval=45 on the com‐
134 mand line or rdisc_interval=45 in the /etc/gateways file. See gate‐
135 ways(4).
136
137
138 While using Router Discovery (which happens by default when the system
139 has a single network interface and a Router Discover Advertisement is
140 received), there is a single default route and a variable number of
141 redirected host routes in the kernel table. On a host with more than
142 one network interface, this default route will be via only one of the
143 interfaces. Thus, multi-homed hosts running with -q might need the
144 no_rdisc argument described below.
145
146
147 To support "legacy" systems that can handle neither RIPv2 nor Router
148 Discovery, you can use the pm_rdisc parameter in the /etc/gateways. See
149 gateways(4).
150
151
152 By default, neither Router Discovery advertisements nor solicitations
153 are sent over point-to-point links (for example, PPP). The Solaris OE
154 uses a netmask of all ones (255.255.255.255) on point-to-point links.
155
156
157 in.routed supports the notion of "distant" passive or active gateways.
158 When the daemon is started, it reads the file /etc/gateways to find
159 such distant gateways that cannot be located using only information
160 from a routing socket, to discover if some of the local gateways are
161 passive, and to obtain other parameters. Gateways specified in this
162 manner should be marked passive if they are not expected to exchange
163 routing information, while gateways marked active should be willing to
164 exchange RIP packets. Routes through passive gateways are installed in
165 the kernel's routing tables once upon startup and are not included in
166 transmitted RIP responses.
167
168
169 Distant active gateways are treated like network interfaces. RIP
170 responses are sent to the distant active gateway. If no responses are
171 received, the associated route is deleted from the kernel table and RIP
172 responses are advertised via other interfaces. If the distant gateway
173 resumes sending RIP responses, the associated route is restored.
174
175
176 Distant active gateways can be useful on media that do not support
177 broadcasts or multicasts but otherwise act like classic shared media,
178 such as some ATM networks. One can list all RIP routers reachable on
179 the HIPPI or ATM network in /etc/gateways with a series of "host"
180 lines. Note that it is usually desirable to use RIPv2 in such situa‐
181 tions to avoid generating lists of inferred host routes.
182
183
184 Gateways marked external are also passive, but are not placed in the
185 kernel routing table, nor are they included in routing updates. The
186 function of external entries is to indicate that another routing
187 process will install such a route if necessary, and that other routes
188 to that destination should not be installed by in.routed. Such entries
189 are required only when both routers might learn of routes to the same
190 destination.
191
193 Listed below are available options. Any other argument supplied is
194 interpreted as the name of a file in which the actions of in.routed
195 should be logged. It is better to use -T (described below) instead of
196 appending the name of the trace file to the command. Associated SMF
197 properties for these options are described, and can be set by means of
198 a command of the form:
199
200 # routeadm -m route:default name=value
201
202
203
204 -A
205
206 Do not ignore RIPv2 authentication if we do not care about RIPv2
207 authentication. This option is required for conformance with RFC
208 2453. However, it makes no sense and breaks using RIP as a discov‐
209 ery protocol to ignore all RIPv2 packets that carry authentication
210 when this machine does not care about authentication. This option
211 is equivalent to setting the ignore_auth property value to false.
212
213
214 -d
215
216 Do not run in the background. This option is meant for interactive
217 use and is not usable under the SMF.
218
219
220 -F net[/mask][,metric]
221
222 Minimize routes in transmissions via interfaces with addresses that
223 match net (network number)/mask (netmask), and synthesizes a
224 default route to this machine with the metric. The intent is to
225 reduce RIP traffic on slow, point-to-point links, such as PPP
226 links, by replacing many large UDP packets of RIP information with
227 a single, small packet containing a "fake" default route. If metric
228 is absent, a value of 14 is assumed to limit the spread of the
229 "fake" default route. This is a dangerous feature that, when used
230 carelessly, can cause routing loops. Notice also that more than one
231 interface can match the specified network number and mask. See also
232 -g. Use of this option is equivalent to setting the minimize_routes
233 property.
234
235
236 -g
237
238 Used on internetwork routers to offer a route to the "default" des‐
239 tination. It is equivalent to -F 0/0,1 and is present mostly for
240 historical reasons. A better choice is -P pm_rdisc on the command
241 line or pm_rdisc in the /etc/gateways file. A larger metric will be
242 used with the latter alternatives, reducing the spread of the
243 potentially dangerous default route. The -g (or -P) option is typi‐
244 cally used on a gateway to the Internet, or on a gateway that uses
245 another routing protocol whose routes are not reported to other
246 local routers. Note that because a metric of 1 is used, this fea‐
247 ture is dangerous. Its use more often creates chaos with a routing
248 loop than solves problems. Use of this option is equivalent to set‐
249 ting the offer_default_route property to true.
250
251
252 -h
253
254 Causes host or point-to-point routes not to be advertised, provided
255 there is a network route going the same direction. That is a lim‐
256 ited kind of aggregation. This option is useful on gateways to LANs
257 that have other gateway machines connected with point-to-point
258 links such as SLIP. Use of this option is equivalent to setting the
259 advertise_host_routes property to false.
260
261
262 -m
263
264 Cause the machine to advertise a host or point-to-point route to
265 its primary interface. It is useful on multi-homed machines such as
266 NFS servers. This option should not be used except when the cost of
267 the host routes it generates is justified by the popularity of the
268 server. It is effective only when the machine is supplying routing
269 information, because there is more than one interface. The -m
270 option overrides the -q option to the limited extent of advertising
271 the host route. Use of this option is equivalent to setting the
272 advertise_host_routes_primary property to true.
273
274
275 -n
276
277 Do not install routes in kernel. By default, routes are installed
278 in the kernel. Use of this option is equivalent to setting the
279 install_routes property to false.
280
281
282 -P params
283
284 Equivalent to adding the parameter line params to the /etc/gateways
285 file. Can also be set by means of the parameters property.
286
287
288 -q
289
290 Opposite of the -s option. This is the default when only one inter‐
291 face is present. With this explicit option, the daemon is always in
292 "quiet mode" for RIP and does not supply routing information to
293 other computers. Use of this option is equivalent to setting the
294 quiet_mode property to true.
295
296
297 -s
298
299 Force in.routed to supply routing information. This is the default
300 if multiple network interfaces are present on which RIP or Router
301 Discovery have not been disabled, and if the /dev/ip ndd variable
302 ip_forwarding is set to 1. Use of this option is equivalent to set‐
303 ting the supply_routes property to true.
304
305
306 -S
307
308 If in.routed is not acting as an internetwork router, instead of
309 entering the whole routing table in the kernel, it enters only a
310 default route for each internetwork router. This reduces the memory
311 requirements without losing any routing reliability. This option is
312 provided for compatibility with the previous, RIPv1-only in.routed.
313 Use of this option is generally discouraged. Use of this option is
314 equivalent to setting the default_routes_only property to true.
315
316
317 -t
318
319 Runs in the foreground (as with -d) and logs the contents of the
320 packets received (as with -zz). This is for compatibility with
321 prior versions of Solaris and has no SMF equivalent.
322
323
324 -T tracefile
325
326 Increases the debugging level to at least 1 and causes debugging
327 information to be appended to the trace file. Because of security
328 concerns, do not to run in.routed routinely with tracing directed
329 to a file. Use of this option is equivalent to setting the log_file
330 property to trace file path.
331
332
333 -v
334
335 Enables debug. Similar to -z, except, where -z increments
336 trace_level, -v sets trace_level to 1. Also, -v requires the -T
337 option. Use of this option is equivalent to setting the debug prop‐
338 erty to true.
339
340
341 -V
342
343 Displays the version of the daemon.
344
345
346 -z
347
348 Increase the debugging level, which causes more information to be
349 logged on the tracefile specified with -T or stdout. The debugging
350 level can be increased or decreased with the SIGUSR1 or SIGUSR2
351 signals or with the rtquery(1M) command.
352
353
355 /etc/defaultrouter If this file is present and contains the address
356 of a default router, the system startup script
357 does not run in.routed. See defaultrouter(4).
358
359
360 /etc/gateways List of distant gateways and general configura‐
361 tion options for in.routed. See gateways(4).
362
363
365 See attributes(5) for descriptions of the following attributes:
366
367
368
369
370 ┌─────────────────────────────┬─────────────────────────────┐
371 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
372 ├─────────────────────────────┼─────────────────────────────┤
373 │Availability │SUNWroute │
374 └─────────────────────────────┴─────────────────────────────┘
375
377 route(1M), routeadm(1M), rtquery(1M), svcadm(1M), ioctl(2),
378 inet(3SOCKET), defaultrouter(4), gateways(4), attributes(5), icmp(7P),
379 inet(7P), udp(7P)
380
381
382 Internet Transport Protocols, XSIS 028112, Xerox System Integration
383 Standard
384
385
386 Routing Information Protocol, v2 (RFC 2453, STD 0056, November 1998)
387
388
389 RIP-v2 MD5 Authentication (RFC 2082, January 1997)
390
391
392 Routing Information Protocol, v1 (RFC 1058, June 1988)
393
394
395 ICMP Router Discovery Messages (RFC 1256, September 1991)
396
398 In keeping with its intended design, this daemon deviates from RFC 2453
399 in two notable ways:
400
401 o By default, in.routed does not discard authenticated RIPv2
402 messages when RIP authentication is not configured. There is
403 little to gain from dropping authenticated packets when
404 RIPv1 listeners will gladly process them. Using the -A
405 option causes in.routed to conform to the RFC in this case.
406
407 o Unauthenticated RIP requests are never discarded, even when
408 RIP authentication is configured. Forwarding tables are not
409 secret and can be inferred through other means such as test
410 traffic. RIP is also the most common router-discovery proto‐
411 col, and hosts need to send queries that will be answered.
412
413
414 in.routed does not always detect unidirectional failures in network
415 interfaces, for example, when the output side fails.
416
417
418
419SunOS 5.11 24 Jul 2008 in.routed(1M)