2930 beadm should sort by creation date
[illumos-gate.git] / usr / src / man / man1m / in.routed.1m
blob59c8a6185643ff217a08b5d0a32a841f6e90c3d5
1 '\" te
2 .\" Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH IN.ROUTED 1M "Jul 24, 2008"
8 .SH NAME
9 in.routed, routed \- network routing daemon
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/in.routed\fR [\fB-AdghmnqsStVz\fR] [\fB-T\fR \fItracefile\fR [\fB-v\fR]]
14  [\fB-F\fR \fInet\fR[/mask ][,metric]] [\fB-P\fR \fIparams\fR]
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The daemon \fBin.routed\fR, often referred to as \fBrouted\fR, is invoked at
21 boot time to manage the network routing tables. It uses Routing Information
22 Protocol, RIPv1 (RFC 1058), RIPv2 (RFC 2453), and Internet Router Discovery
23 Protocol (RFC 1256) to maintain the kernel routing table. The RIPv1 protocol is
24 based on the reference 4.3BSD daemon.
25 .sp
26 .LP
27 \fBin.routed\fR is managed by means of the service management facility (SMF),
28 using the fault management resource identifier (FMRI):
29 .sp
30 .in +2
31 .nf
32 svc:/network/routing/route:default
33 .fi
34 .in -2
35 .sp
37 .sp
38 .LP
39 The daemon listens on a \fBudp\fR socket for the \fBroute\fR service (see
40 \fBservices\fR(4)) for Routing Information Protocol packets. It also sends and
41 receives multicast Router Discovery ICMP messages. If the host is a router,
42 \fBin.routed\fR periodically supplies copies of its routing tables to any
43 directly connected hosts and networks. It also advertises or solicits default
44 routes using Router Discovery ICMP messages.
45 .sp
46 .LP
47 When started (or when a network interface is later turned on), \fBin.routed\fR
48 uses an \fBAF_ROUTE\fR address family facility to find those directly connected
49 interfaces configured into the system and marked "up". It adds necessary routes
50 for the interfaces to the kernel routing table. Soon after being first started,
51 and provided there is at least one interface on which RIP has not been
52 disabled, \fBin.routed\fR deletes all pre-existing non-static routes in the
53 kernel table. Static routes in the kernel table are preserved and included in
54 RIP responses if they have a valid RIP metric (see \fBroute\fR(1M)).
55 .sp
56 .LP
57 If more than one interface is present (not counting the loopback interface), it
58 is assumed that the host should forward packets among the connected networks.
59 After transmitting a RIP request and Router Discovery Advertisements or
60 Solicitations on a new interface, the daemon enters a loop, listening for RIP
61 request and response and Router Discovery packets from other hosts.
62 .sp
63 .LP
64 When a request packet is received, \fBin.routed\fR formulates a reply based on
65 the information maintained in its internal tables. The response packet
66 generated contains a list of known routes, each marked with a "hop count"
67 metric (a count of 16 or greater is considered "infinite"). Advertised metrics
68 reflect the metric associated with an interface (see \fBifconfig\fR(1M)), so
69 setting the metric on an interface is an effective way to steer traffic.
70 .sp
71 .LP
72 Responses do not include routes with a first hop on the requesting network, to
73 implement in part split-horizon. Requests from query programs such as
74 \fBrtquery\fR(1M) are answered with the complete table.
75 .sp
76 .LP
77 The routing table maintained by the daemon includes space for several gateways
78 for each destination to speed recovery from a failing router. RIP response
79 packets received are used to update the routing tables, provided they are from
80 one of the several currently recognized gateways or advertise a better metric
81 than at least one of the existing gateways.
82 .sp
83 .LP
84 When an update is applied, \fBin.routed\fR records the change in its own tables
85 and updates the kernel routing table if the best route to the destination
86 changes. The change in the kernel routing table is reflected in the next batch
87 of response packets sent. If the next response is not scheduled for a while, a
88 flash update response containing only recently changed routes is sent.
89 .sp
90 .LP
91 In addition to processing incoming packets, in.routed also periodically checks
92 the routing table entries. If an entry has not been updated for 3 minutes, the
93 entry's metric is set to infinity and marked for deletion. Deletions are
94 delayed until the route has been advertised with an infnite metric to insure
95 the invalidation is propagated throughout the local internet. This is a form of
96 poison reverse.
97 .sp
98 .LP
99 Routes in the kernel table that are added or changed as a result of ICMP
100 Redirect messages are deleted after a while to minimize black-holes. When a TCP
101 connection suffers a timeout, the kernel tells \fBin.routed\fR, which deletes
102 all redirected routes through the gateway involved, advances the age of all RIP
103 routes through the gateway to allow an alternate to be chosen, and advances of
104 the age of any relevant Router Discovery Protocol default routes.
107 Hosts acting as internetwork routers gratuitously supply their routing tables
108 every 30 seconds to all directly connected hosts and networks. These RIP
109 responses are sent to the broadcast address on nets that support broadcasting,
110 to the destination address on point-to-point links, and to the router's own
111 address on other networks. If RIPv2 is enabled, multicast packets are sent on
112 interfaces that support multicasting.
115 If no response is received on a remote interface, if there are errors while
116 sending responses, or if there are more errors than input or output (see
117 \fBnetstat\fR(1M)), then the cable or some other part of the interface is
118 assumed to be disconnected or broken, and routes are adjusted appropriately.
121 The Internet Router Discovery Protocol is handled similarly. When the daemon is
122 supplying RIP routes, it also listens for Router Discovery Solicitations and
123 sends Advertisements. When it is quiet and listening to other RIP routers, it
124 sends Solicitations and listens for Advertisements. If it receives a good
125 Advertisement and it is not multi-homed, it stops listening for broadcast or
126 multicast RIP responses. It tracks several advertising routers to speed
127 recovery when the currently chosen router dies. If all discovered routers
128 disappear, the daemon resumes listening to RIP responses. It continues
129 listening to RIP while using Router Discovery if multi-homed to ensure all
130 interfaces are used.
133 The Router Discovery standard requires that advertisements have a default
134 "lifetime" of 30 minutes. That means should something happen, a client can be
135 without a good route for 30 minutes. It is a good idea to reduce the default to
136 45 seconds using \fB\fR\fB-P\fR \fBrdisc_interval=45\fR on the command line or
137 \fBrdisc_interval=45\fR in the \fB/etc/gateways\fR file. See \fBgateways\fR(4).
140 While using Router Discovery (which happens by default when the system has a
141 single network interface and a Router Discover Advertisement is received),
142 there is a single default route and a variable number of redirected host routes
143 in the kernel table. On a host with more than one network interface, this
144 default route will be via only one of the interfaces. Thus, multi-homed hosts
145 running with \fB-q\fR might need the \fBno_rdisc\fR argument described below.
148 To support "legacy" systems that can handle neither RIPv2 nor Router Discovery,
149 you can use the \fBpm_rdisc\fR parameter in the \fB/etc/gateways\fR. See
150 \fBgateways\fR(4).
153 By default, neither Router Discovery advertisements nor solicitations are sent
154 over point-to-point links (for example, PPP). The Solaris OE uses a netmask of
155 all ones (255.255.255.255) on point-to-point links.
158 \fBin.routed\fR supports the notion of "distant" passive or active gateways.
159 When the daemon is started, it reads the file \fB/etc/gateways\fR to find such
160 distant gateways that cannot be located using only information from a routing
161 socket, to discover if some of the local gateways are passive, and to obtain
162 other parameters. Gateways specified in this manner should be marked passive if
163 they are not expected to exchange routing information, while gateways marked
164 active should be willing to exchange RIP packets. Routes through passive
165 gateways are installed in the kernel's routing tables once upon startup and are
166 not included in transmitted RIP responses.
169 Distant active gateways are treated like network interfaces. RIP responses are
170 sent to the distant active gateway. If no responses are received, the
171 associated route is deleted from the kernel table and RIP responses are
172 advertised via other interfaces. If the distant gateway resumes sending RIP
173 responses, the associated route is restored.
176 Distant active gateways can be useful on media that do not support broadcasts
177 or multicasts but otherwise act like classic shared media, such as some ATM
178 networks. One can list all RIP routers reachable on the HIPPI or ATM network in
179 \fB/etc/gateways\fR with a series of "host" lines. Note that it is usually
180 desirable to use RIPv2 in such situations to avoid generating lists of inferred
181 host routes.
184 Gateways marked external are also passive, but are not placed in the kernel
185 routing table, nor are they included in routing updates. The function of
186 external entries is to indicate that another routing process will install such
187 a route if necessary, and that other routes to that destination should not be
188 installed by \fBin.routed\fR. Such entries are required only when both routers
189 might learn of routes to the same destination.
190 .SH OPTIONS
193 Listed below are available options. Any other argument supplied is interpreted
194 as the name of a file in which the actions of \fBin.routed\fR should be logged.
195 It is better to use \fB-T\fR (described below) instead of appending the name of
196 the trace file to the command. Associated SMF properties for these options are
197 described, and can be set by means of a command of the form:
199 .in +2
201 # \fBrouteadm -m route:default \fIname\fR=\fIvalue\fR\fR
203 .in -2
207 .ne 2
209 \fB\fB-A\fR\fR
211 .sp .6
212 .RS 4n
213 Do not ignore RIPv2 authentication if we do not care about RIPv2
214 authentication. This option is required for conformance with RFC 2453. However,
215 it makes no sense and breaks using RIP as a discovery protocol to ignore all
216 RIPv2 packets that carry authentication when this machine does not care about
217 authentication. This option is equivalent to setting the \fBignore_auth\fR
218 property value to false.
222 .ne 2
224 \fB\fB-d\fR\fR
226 .sp .6
227 .RS 4n
228 Do not run in the background. This option is meant for interactive use and is
229 not usable under the SMF.
233 .ne 2
235 \fB\fB-F\fR \fBnet[/\fImask\fR][,\fImetric\fR]\fR\fR
237 .sp .6
238 .RS 4n
239 Minimize routes in transmissions via interfaces with addresses that match
240 \fInet\fR (network number)/\fImask\fR (netmask), and synthesizes a default
241 route to this machine with the \fImetric\fR. The intent is to reduce RIP
242 traffic on slow, point-to-point links, such as PPP links, by replacing many
243 large UDP packets of RIP information with a single, small packet containing a
244 "fake" default route. If \fImetric\fR is absent, a value of 14 is assumed to
245 limit the spread of the "fake" default route. This is a dangerous feature that,
246 when used carelessly, can cause routing loops. Notice also that more than one
247 interface can match the specified network number and mask. See also \fB-g\fR.
248 Use of this option is equivalent to setting the \fBminimize_routes\fR property.
252 .ne 2
254 \fB\fB-g\fR\fR
256 .sp .6
257 .RS 4n
258 Used on internetwork routers to offer a route to the "default" destination. It
259 is equivalent to \fB-F\fR \fB0/0,1\fR and is present mostly for historical
260 reasons. A better choice is \fB-P\fR \fBpm_rdisc\fR on the command line or
261 \fBpm_rdisc\fR in the \fB/etc/gateways\fR file. A larger metric will be used
262 with the latter alternatives, reducing the spread of the potentially dangerous
263 default route. The \fB-g\fR (or \fB-P\fR) option is typically used on a gateway
264 to the Internet, or on a gateway that uses another routing protocol whose
265 routes are not reported to other local routers. Note that because a metric of 1
266 is used, this feature is dangerous. Its use more often creates chaos with a
267 routing loop than solves problems. Use of this option is equivalent to setting
268 the \fBoffer_default_route\fR property to true.
272 .ne 2
274 \fB\fB-h\fR\fR
276 .sp .6
277 .RS 4n
278 Causes host or point-to-point routes not to be advertised, provided there is a
279 network route going the same direction. That is a limited kind of aggregation.
280 This option is useful on gateways to LANs that have other gateway machines
281 connected with point-to-point links such as SLIP. Use of this option is
282 equivalent to setting the \fBadvertise_host_routes\fR property to false.
286 .ne 2
288 \fB\fB-m\fR\fR
290 .sp .6
291 .RS 4n
292 Cause the machine to advertise a host or point-to-point route to its primary
293 interface. It is useful on multi-homed machines such as NFS servers. This
294 option should not be used except when the cost of the host routes it generates
295 is justified by the popularity of the server. It is effective only when the
296 machine is supplying routing information, because there is more than one
297 interface. The \fB-m\fR option overrides the \fB-q\fR option to the limited
298 extent of advertising the host route. Use of this option is equivalent to
299 setting the \fBadvertise_host_routes_primary\fR property to true.
303 .ne 2
305 \fB\fB-n\fR\fR
307 .sp .6
308 .RS 4n
309 Do not install routes in kernel. By default, routes are installed in the
310 kernel. Use of this option is equivalent to setting the \fBinstall_routes\fR
311 property to false.
315 .ne 2
317 \fB\fB-P\fR \fIparams\fR\fR
319 .sp .6
320 .RS 4n
321 Equivalent to adding the parameter line \fIparams\fR to the \fB/etc/gateways\fR
322 file. Can also be set by means of the \fBparameters\fR property.
326 .ne 2
328 \fB\fB-q\fR\fR
330 .sp .6
331 .RS 4n
332 Opposite of the \fB-s\fR option. This is the default when only one interface is
333 present. With this explicit option, the daemon is always in "quiet mode" for
334 RIP and does not supply routing information to other computers. Use of this
335 option is equivalent to setting the \fBquiet_mode\fR property to true.
339 .ne 2
341 \fB\fB-s\fR\fR
343 .sp .6
344 .RS 4n
345 Force \fBin.routed\fR to supply routing information. This is the default if
346 multiple network interfaces are present on which RIP or Router Discovery have
347 not been disabled, and if the \fB/dev/ip\fR \fBndd\fR variable
348 \fBip_forwarding\fR is set to 1. Use of this option is equivalent to setting
349 the \fBsupply_routes\fR property to true.
353 .ne 2
355 \fB\fB-S\fR\fR
357 .sp .6
358 .RS 4n
359 If \fBin.routed\fR is not acting as an internetwork router, instead of entering
360 the whole routing table in the kernel, it enters only a default route for each
361 internetwork router. This reduces the memory requirements without losing any
362 routing reliability. This option is provided for compatibility with the
363 previous, RIPv1-only \fBin.routed\fR. Use of this option is generally
364 discouraged. Use of this option is equivalent to setting the
365 \fBdefault_routes_only\fR property to true.
369 .ne 2
371 \fB\fB-t\fR\fR
373 .sp .6
374 .RS 4n
375 Runs in the foreground (as with \fB-d\fR) and logs the contents of the packets
376 received (as with \fB-zz\fR). This is for compatibility with prior versions of
377 Solaris and has no SMF equivalent.
381 .ne 2
383 \fB\fB-T\fR \fItracefile\fR\fR
385 .sp .6
386 .RS 4n
387 Increases the debugging level to at least 1 and causes debugging information to
388 be appended to the trace file. Because of security concerns, do not to run
389 \fBin.routed\fR routinely with tracing directed to a file. Use of this option
390 is equivalent to setting the \fBlog_file\fR property to \fBtrace file path\fR.
394 .ne 2
396 \fB\fB-v\fR\fR
398 .sp .6
399 .RS 4n
400 Enables debug. Similar to \fB-z\fR, except, where \fB-z\fR increments
401 \fBtrace_level\fR, \fB-v\fR sets \fBtrace_level\fR to 1. Also, \fB-v\fR
402 requires the \fB-T\fR option. Use of this option is equivalent to setting the
403 \fBdebug\fR property to true.
407 .ne 2
409 \fB\fB-V\fR\fR
411 .sp .6
412 .RS 4n
413 Displays the version of the daemon.
417 .ne 2
419 \fB\fB-z\fR\fR
421 .sp .6
422 .RS 4n
423 Increase the debugging level, which causes more information to be logged on the
424 tracefile specified with \fB-T\fR or stdout. The debugging level can be
425 increased or decreased with the \fBSIGUSR1\fR or \fBSIGUSR2\fR signals or with
426 the \fBrtquery\fR(1M) command.
429 .SH FILES
431 .ne 2
433 \fB\fB/etc/defaultrouter\fR\fR
435 .RS 22n
436 If this file is present and contains the address of a default router, the
437 system startup script does not run \fBin.routed\fR. See \fBdefaultrouter\fR(4).
441 .ne 2
443 \fB\fB/etc/gateways\fR\fR
445 .RS 22n
446 List of distant gateways and general configuration options for \fBin.routed\fR.
447 See \fBgateways\fR(4).
450 .SH SEE ALSO
453 \fBroute\fR(1M), \fBrouteadm\fR(1M), \fBrtquery\fR(1M), \fBsvcadm\fR(1M),
454 \fBioctl\fR(2), \fBinet\fR(3SOCKET), \fBdefaultrouter\fR(4), \fBgateways\fR(4),
455 \fBattributes\fR(5), \fBicmp\fR(7P), \fBinet\fR(7P), \fBudp\fR(7P)
458 \fIInternet Transport Protocols, XSIS 028112, Xerox System Integration
459 Standard\fR
462 \fIRouting Information Protocol, v2 (RFC 2453, STD 0056, November 1998)\fR
465 \fIRIP-v2 MD5 Authentication (RFC 2082, January 1997)\fR
468 \fIRouting Information Protocol, v1 (RFC 1058, June 1988)\fR
471 \fIICMP Router Discovery Messages (RFC 1256, September 1991)\fR
472 .SH NOTES
475 In keeping with its intended design, this daemon deviates from RFC 2453 in two
476 notable ways:
477 .RS +4
479 .ie t \(bu
480 .el o
481 By default, \fBin.routed\fR does not discard authenticated RIPv2 messages when
482 RIP authentication is not configured. There is little to gain from dropping
483 authenticated packets when RIPv1 listeners will gladly process them. Using the
484 \fB-A\fR option causes \fBin.routed\fR to conform to the RFC in this case.
486 .RS +4
488 .ie t \(bu
489 .el o
490 Unauthenticated RIP requests are never discarded, even when RIP authentication
491 is configured. Forwarding tables are not secret and can be inferred through
492 other means such as test traffic. RIP is also the most common router-discovery
493 protocol, and hosts need to send queries that will be answered.
497 \fBin.routed\fR does not always detect unidirectional failures in network
498 interfaces, for example, when the output side fails.