Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man8 / in.routed.8
blob1e02e2d37843bb1506b0a5597c156ea87bc38243
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 8 "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(8)).
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(8)), 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(8) 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(8)), 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.
198 .ne 2
200 \fB\fB-A\fR\fR
202 .sp .6
203 .RS 4n
204 Do not ignore RIPv2 authentication if we do not care about RIPv2
205 authentication. This option is required for conformance with RFC 2453. However,
206 it makes no sense and breaks using RIP as a discovery protocol to ignore all
207 RIPv2 packets that carry authentication when this machine does not care about
208 authentication.
212 .ne 2
214 \fB\fB-d\fR\fR
216 .sp .6
217 .RS 4n
218 Do not run in the background. This option is meant for interactive use and is
219 not usable under the SMF.
223 .ne 2
225 \fB\fB-F\fR \fBnet[/\fImask\fR][,\fImetric\fR]\fR\fR
227 .sp .6
228 .RS 4n
229 Minimize routes in transmissions via interfaces with addresses that match
230 \fInet\fR (network number)/\fImask\fR (netmask), and synthesizes a default
231 route to this machine with the \fImetric\fR. The intent is to reduce RIP
232 traffic on slow, point-to-point links, such as PPP links, by replacing many
233 large UDP packets of RIP information with a single, small packet containing a
234 "fake" default route. If \fImetric\fR is absent, a value of 14 is assumed to
235 limit the spread of the "fake" default route. This is a dangerous feature that,
236 when used carelessly, can cause routing loops. Notice also that more than one
237 interface can match the specified network number and mask. See also \fB-g\fR.
241 .ne 2
243 \fB\fB-g\fR\fR
245 .sp .6
246 .RS 4n
247 Used on internetwork routers to offer a route to the "default" destination. It
248 is equivalent to \fB-F\fR \fB0/0,1\fR and is present mostly for historical
249 reasons. A better choice is \fB-P\fR \fBpm_rdisc\fR on the command line or
250 \fBpm_rdisc\fR in the \fB/etc/gateways\fR file. A larger metric will be used
251 with the latter alternatives, reducing the spread of the potentially dangerous
252 default route. The \fB-g\fR (or \fB-P\fR) option is typically used on a gateway
253 to the Internet, or on a gateway that uses another routing protocol whose
254 routes are not reported to other local routers. Note that because a metric of 1
255 is used, this feature is dangerous. Its use more often creates chaos with a
256 routing loop than solves problems.
260 .ne 2
262 \fB\fB-h\fR\fR
264 .sp .6
265 .RS 4n
266 Causes host or point-to-point routes not to be advertised, provided there is a
267 network route going the same direction. That is a limited kind of aggregation.
268 This option is useful on gateways to LANs that have other gateway machines
269 connected with point-to-point links such as SLIP.
273 .ne 2
275 \fB\fB-m\fR\fR
277 .sp .6
278 .RS 4n
279 Cause the machine to advertise a host or point-to-point route to its primary
280 interface. It is useful on multi-homed machines such as NFS servers. This
281 option should not be used except when the cost of the host routes it generates
282 is justified by the popularity of the server. It is effective only when the
283 machine is supplying routing information, because there is more than one
284 interface. The \fB-m\fR option overrides the \fB-q\fR option to the limited
285 extent of advertising the host route.
289 .ne 2
291 \fB\fB-n\fR\fR
293 .sp .6
294 .RS 4n
295 Do not install routes in kernel. By default, routes are installed in the
296 kernel.
300 .ne 2
302 \fB\fB-P\fR \fIparams\fR\fR
304 .sp .6
305 .RS 4n
306 Equivalent to adding the parameter line \fIparams\fR to the \fB/etc/gateways\fR
307 file.
311 .ne 2
313 \fB\fB-q\fR\fR
315 .sp .6
316 .RS 4n
317 Opposite of the \fB-s\fR option. This is the default when only one interface is
318 present. With this explicit option, the daemon is always in "quiet mode" for
319 RIP and does not supply routing information to other computers.
323 .ne 2
325 \fB\fB-s\fR\fR
327 .sp .6
328 .RS 4n
329 Force \fBin.routed\fR to supply routing information. This is the default if
330 multiple network interfaces are present on which RIP or Router Discovery have
331 not been disabled, and if the \fB/dev/ip\fR \fBndd\fR variable
332 \fBip_forwarding\fR is set to 1.
336 .ne 2
338 \fB\fB-S\fR\fR
340 .sp .6
341 .RS 4n
342 If \fBin.routed\fR is not acting as an internetwork router, instead of entering
343 the whole routing table in the kernel, it enters only a default route for each
344 internetwork router. This reduces the memory requirements without losing any
345 routing reliability. This option is provided for compatibility with the
346 previous, RIPv1-only \fBin.routed\fR. Use of this option is generally
347 discouraged.
351 .ne 2
353 \fB\fB-t\fR\fR
355 .sp .6
356 .RS 4n
357 Runs in the foreground (as with \fB-d\fR) and logs the contents of the packets
358 received (as with \fB-zz\fR). This is for compatibility with prior versions of
359 Solaris and has no SMF equivalent.
363 .ne 2
365 \fB\fB-T\fR \fItracefile\fR\fR
367 .sp .6
368 .RS 4n
369 Increases the debugging level to at least 1 and causes debugging information to
370 be appended to the trace file. Because of security concerns, do not to run
371 \fBin.routed\fR routinely with tracing directed to a file.
375 .ne 2
377 \fB\fB-v\fR\fR
379 .sp .6
380 .RS 4n
381 Enables debug. Similar to \fB-z\fR, except, where \fB-z\fR increments
382 \fBtrace_level\fR, \fB-v\fR sets \fBtrace_level\fR to 1. Also, \fB-v\fR
383 requires the \fB-T\fR option.
387 .ne 2
389 \fB\fB-V\fR\fR
391 .sp .6
392 .RS 4n
393 Displays the version of the daemon.
397 .ne 2
399 \fB\fB-z\fR\fR
401 .sp .6
402 .RS 4n
403 Increase the debugging level, which causes more information to be logged on the
404 tracefile specified with \fB-T\fR or stdout. The debugging level can be
405 increased or decreased with the \fBSIGUSR1\fR or \fBSIGUSR2\fR signals or with
406 the \fBrtquery\fR(8) command.
409 .SH FILES
411 .ne 2
413 \fB\fB/etc/defaultrouter\fR\fR
415 .RS 22n
416 If this file is present and contains the address of a default router, the
417 system startup script does not run \fBin.routed\fR. See \fBdefaultrouter\fR(4).
421 .ne 2
423 \fB\fB/etc/gateways\fR\fR
425 .RS 22n
426 List of distant gateways and general configuration options for \fBin.routed\fR.
427 See \fBgateways\fR(4).
430 .SH SEE ALSO
433 \fBroute\fR(8), \fBrtquery\fR(8), \fBsvcadm\fR(8),
434 \fBioctl\fR(2), \fBinet\fR(3SOCKET), \fBdefaultrouter\fR(4), \fBgateways\fR(4),
435 \fBattributes\fR(5), \fBicmp\fR(7P), \fBinet\fR(7P), \fBudp\fR(7P)
438 \fIInternet Transport Protocols, XSIS 028112, Xerox System Integration
439 Standard\fR
442 \fIRouting Information Protocol, v2 (RFC 2453, STD 0056, November 1998)\fR
445 \fIRIP-v2 MD5 Authentication (RFC 2082, January 1997)\fR
448 \fIRouting Information Protocol, v1 (RFC 1058, June 1988)\fR
451 \fIICMP Router Discovery Messages (RFC 1256, September 1991)\fR
452 .SH NOTES
455 In keeping with its intended design, this daemon deviates from RFC 2453 in two
456 notable ways:
457 .RS +4
459 .ie t \(bu
460 .el o
461 By default, \fBin.routed\fR does not discard authenticated RIPv2 messages when
462 RIP authentication is not configured. There is little to gain from dropping
463 authenticated packets when RIPv1 listeners will gladly process them. Using the
464 \fB-A\fR option causes \fBin.routed\fR to conform to the RFC in this case.
466 .RS +4
468 .ie t \(bu
469 .el o
470 Unauthenticated RIP requests are never discarded, even when RIP authentication
471 is configured. Forwarding tables are not secret and can be inferred through
472 other means such as test traffic. RIP is also the most common router-discovery
473 protocol, and hosts need to send queries that will be answered.
477 \fBin.routed\fR does not always detect unidirectional failures in network
478 interfaces, for example, when the output side fails.