]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sbin/routed/routed.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sbin / routed / routed.8
1 .\"   $Revision: 2.26 $
2 .\"
3 .\" Copyright (c) 1983, 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 4. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)routed.8    8.2 (Berkeley) 12/11/93
31 .\" $FreeBSD$
32 .\"
33 .Dd June 1, 1996
34 .Dt ROUTED 8
35 .Os
36 .Sh NAME
37 .Nm routed ,
38 .Nm rdisc
39 .Nd network RIP and router discovery routing daemon
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl sqdghmpAtv
43 .Op Fl T Ar tracefile
44 .Oo
45 .Fl F
46 .Ar net Ns Op /mask Ns Op ,metric
47 .Oc
48 .Op Fl P Ar parms
49 .Sh DESCRIPTION
50 The
51 .Nm
52 utility is a daemon invoked at boot time to manage the network
53 routing tables.
54 It uses Routing Information Protocol, RIPv1 (RFC\ 1058),
55 RIPv2 (RFC\ 1723),
56 and Internet Router Discovery Protocol (RFC 1256)
57 to maintain the kernel routing table.
58 The RIPv1 protocol is based on the reference
59 .Bx 4.3
60 daemon.
61 .Pp
62 It listens on the
63 .Xr udp 4
64 socket for the
65 .Xr route 8
66 service (see
67 .Xr services 5 )
68 for Routing Information Protocol packets.
69 It also sends and receives multicast Router Discovery ICMP messages.
70 If the host is a router,
71 .Nm
72 periodically supplies copies
73 of its routing tables to any directly connected hosts and networks.
74 It also advertises or solicits default routes using Router Discovery
75 ICMP messages.
76 .Pp
77 When started (or when a network interface is later turned on),
78 .Nm
79 uses an AF_ROUTE address family facility to find those
80 directly connected interfaces configured into the
81 system and marked "up".
82 It adds necessary routes for the interfaces
83 to the kernel routing table.
84 Soon after being first started, and provided there is at least one
85 interface on which RIP has not been disabled,
86 .Nm
87 deletes all pre-existing
88 non-static routes in kernel table.
89 Static routes in the kernel table are preserved and
90 included in RIP responses if they have a valid RIP -hopcount
91 (see
92 .Xr route 8 ) .
93 .Pp
94 If more than one interface is present (not counting the loopback interface),
95 it is assumed that the host should forward packets among the
96 connected networks.
97 After transmitting a RIP
98 .Em request
99 and
100 Router Discovery Advertisements or Solicitations on a new interface,
101 the daemon enters a loop, listening for
102 RIP request and response and Router Discovery packets from other hosts.
103 .Pp
104 When a
105 .Em request
106 packet is received,
107 .Nm
108 formulates a reply based on the information maintained in its
109 internal tables.
110 The
111 .Em response
112 packet generated contains a list of known routes, each marked
113 with a "hop count" metric (a count of 16 or greater is
114 considered "infinite").
115 The advertised metric for a route reflects the metrics associated
116 with interfaces
117 (see
118 .Xr ifconfig 8 )
119 though which it is received and sent,
120 so setting the metric on an interface
121 is an effective way to steer traffic.
122 See also
123 .Cm adj_inmetric
124 and
125 .Cm adj_outmetric
126 parameters below.
127 .Pp
128 Responses do not include routes with a first hop on the requesting
129 network to implement in part
130 .Em split-horizon .
131 Requests from query programs
132 such as
133 .Xr rtquery 8
134 are answered with the complete table.
135 .Pp
136 The routing table maintained by the daemon
137 includes space for several gateways for each destination
138 to speed recovery from a failing router.
139 RIP
140 .Em response
141 packets received are used to update the routing tables provided they are
142 from one of the several currently recognized gateways or
143 advertise a better metric than at least one of the existing
144 gateways.
145 .Pp
146 When an update is applied,
147 .Nm
148 records the change in its own tables and updates the kernel routing table
149 if the best route to the destination changes.
150 The change in the kernel routing table is reflected in the next batch of
151 .Em response
152 packets sent.
153 If the next response is not scheduled for a while, a
154 .Em flash update
155 response containing only recently changed routes is sent.
156 .Pp
157 In addition to processing incoming packets,
158 .Nm
159 also periodically checks the routing table entries.
160 If an entry has not been updated for 3 minutes, the entry's metric
161 is set to infinity and marked for deletion.
162 Deletions are delayed until the route has been advertised with
163 an infinite metric to ensure the invalidation
164 is propagated throughout the local internet.
165 This is a form of
166 .Em poison reverse .
167 .Pp
168 Routes in the kernel table that are added or changed as a result
169 of ICMP Redirect messages are deleted after a while to minimize
170 .Em black-holes .
171 When a TCP connection suffers a timeout,
172 the kernel tells
173 .Nm ,
174 which deletes all redirected routes
175 through the gateway involved, advances the age of all RIP routes through
176 the gateway to allow an alternate to be chosen, and advances of the
177 age of any relevant Router Discovery Protocol default routes.
178 .Pp
179 Hosts acting as internetwork routers gratuitously supply their
180 routing tables every 30 seconds to all directly connected hosts
181 and networks.
182 These RIP responses are sent to the broadcast address on nets that support
183 broadcasting,
184 to the destination address on point-to-point links, and to the router's
185 own address on other networks.
186 If RIPv2 is enabled, multicast packets are sent on interfaces that
187 support multicasting.
188 .Pp
189 If no response is received on a remote interface, if there are errors
190 while sending responses,
191 or if there are more errors than input or output (see
192 .Xr netstat 1 ) ,
193 then the cable or some other part of the interface is assumed to be
194 disconnected or broken, and routes are adjusted appropriately.
195 .Pp
196 The
197 .Em Internet Router Discovery Protocol
198 is handled similarly.
199 When the daemon is supplying RIP routes, it also listens for
200 Router Discovery Solicitations and sends Advertisements.
201 When it is quiet and listening to other RIP routers, it
202 sends Solicitations and listens for Advertisements.
203 If it receives
204 a good Advertisement and it is not multi-homed,
205 it stops listening for broadcast or multicast RIP responses.
206 It tracks several advertising routers to speed recovery when the
207 currently chosen router dies.
208 If all discovered routers disappear,
209 the daemon resumes listening to RIP responses.
210 It continues listening to RIP while using Router Discovery
211 if multi-homed to ensure all interfaces are used.
212 .Pp
213 The Router Discovery standard requires that advertisements
214 have a default "lifetime" of 30 minutes.
215 That means should
216 something happen, a client can be without a good route for
217 30 minutes.
218 It is a good idea to reduce the default to 45
219 seconds using
220 .Fl P Cm rdisc_interval=45
221 on the command line or
222 .Cm rdisc_interval=45
223 in the
224 .Pa /etc/gateways
225 file.
226 .Pp
227 While using Router Discovery (which happens by default when
228 the system has a single network interface and a Router Discover Advertisement
229 is received), there is a single default route and a variable number of
230 redirected host routes in the kernel table.
231 On a host with more than one network interface,
232 this default route will be via only one of the interfaces.
233 Thus, multi-homed hosts running with
234 .Fl q
235 might need
236 .Cm no_rdisc
237 described below.
238 .Pp
239 See the
240 .Cm pm_rdisc
241 facility described below to support "legacy" systems
242 that can handle neither RIPv2 nor Router Discovery.
243 .Pp
244 By default, neither Router Discovery advertisements nor solicitations
245 are sent over point to point links (e.g.\& PPP).
246 The netmask associated with point-to-point links (such as SLIP
247 or PPP, with the IFF_POINTOPOINT flag) is used by
248 .Nm
249 to infer the netmask used by the remote system when RIPv1 is used.
250 .Pp
251 The following options are available:
252 .Bl -tag -width indent
253 .It Fl s
254 force
255 .Nm
256 to supply routing information.
257 This is the default if multiple network interfaces are present on which
258 RIP or Router Discovery have not been disabled, and if the kernel switch
259 ipforwarding=1.
260 .It Fl q
261 is the opposite of the
262 .Fl s
263 option.
264 This is the default when only one interface is present.
265 With this explicit option, the daemon is always in "quiet-mode" for RIP
266 and does not supply routing information to other computers.
267 .It Fl d
268 do not run in the background.
269 This option is meant for interactive use.
270 .It Fl g
271 used on internetwork routers to offer a route
272 to the "default" destination.
273 It is equivalent to
274 .Fl F
275 .Cm 0/0,1
276 and is present mostly for historical reasons.
277 A better choice is
278 .Fl P Cm pm_rdisc
279 on the command line or
280 .Cm pm_rdisc
281 in the
282 .Pa /etc/gateways
283 file,
284 since a larger metric
285 will be used, reducing the spread of the potentially dangerous
286 default route.
287 This is typically used on a gateway to the Internet,
288 or on a gateway that uses another routing protocol whose routes
289 are not reported to other local routers.
290 Notice that because a metric of 1 is used, this feature is
291 dangerous.
292 It is more commonly accidentally used to create chaos with a
293 routing loop than to solve problems.
294 .It Fl h
295 cause host or point-to-point routes to not be advertised,
296 provided there is a network route going the same direction.
297 That is a limited kind of aggregation.
298 This option is useful on gateways to Ethernets that have other gateway
299 machines connected with point-to-point links such as SLIP.
300 .It Fl m
301 cause the machine to advertise a host or point-to-point route to
302 its primary interface.
303 It is useful on multi-homed machines such as NFS servers.
304 This option should not be used except when the cost of
305 the host routes it generates is justified by the popularity of
306 the server.
307 It is effective only when the machine is supplying
308 routing information, because there is more than one interface.
309 The
310 .Fl m
311 option overrides the
312 .Fl q
313 option to the limited extent of advertising the host route.
314 .It Fl A
315 do not ignore RIPv2 authentication if we do not care about RIPv2
316 authentication.
317 This option is required for conformance with RFC 1723.
318 However, it makes no sense and breaks using RIP as a discovery protocol
319 to ignore all RIPv2 packets that carry authentication when this machine
320 does not care about authentication.
321 .It Fl t
322 increase the debugging level, which causes more information to be logged
323 on the tracefile specified with
324 .Fl T
325 or standard out.
326 The debugging level can be increased or decreased
327 with the
328 .Em SIGUSR1
329 or
330 .Em SIGUSR2
331 signals or with the
332 .Xr rtquery 8
333 command.
334 .It Fl T Ar tracefile
335 increases the debugging level to at least 1 and
336 causes debugging information to be appended to the trace file.
337 Note that because of security concerns, it is wisest to not run
338 .Nm
339 routinely with tracing directed to a file.
340 .It Fl v
341 display and logs the version of daemon.
342 .It Fl F Ar net[/mask][,metric]
343 minimize routes in transmissions via interfaces with addresses that match
344 .Em net/mask ,
345 and synthesizes a default route to this machine with the
346 .Em metric .
347 The intent is to reduce RIP traffic on slow, point-to-point links
348 such as PPP links by replacing many large UDP packets of RIP information
349 with a single, small packet containing a "fake" default route.
350 If
351 .Em metric
352 is absent, a value of 14 is assumed to limit
353 the spread of the "fake" default route.
354 This is a dangerous feature that when used carelessly can cause routing
355 loops.
356 Notice also that more than one interface can match the specified network
357 number and mask.
358 See also
359 .Fl g .
360 .It Fl P Ar parms
361 is equivalent to adding the parameter
362 line
363 .Em parms
364 to the
365 .Pa /etc/gateways
366 file.
367 .El
368 .Pp
369 Any other argument supplied is interpreted as the name
370 of a file in which the actions of
371 .Nm
372 should be logged.
373 It is better to use
374 .Fl T
375 instead of
376 appending the name of the trace file to the command.
377 .Pp
378 The
379 .Nm
380 utility also supports the notion of
381 "distant"
382 .Em passive
383 or
384 .Em active
385 gateways.
386 When
387 .Nm
388 is started, it reads the file
389 .Pa /etc/gateways
390 to find such distant gateways which may not be located using
391 only information from a routing socket, to discover if some
392 of the local gateways are
393 .Em passive ,
394 and to obtain other parameters.
395 Gateways specified in this manner should be marked passive
396 if they are not expected to exchange routing information,
397 while gateways marked active
398 should be willing to exchange RIP packets.
399 Routes through
400 .Em passive
401 gateways are installed in the
402 kernel's routing tables once upon startup and are not included in
403 transmitted RIP responses.
404 .Pp
405 Distant active gateways are treated like network interfaces.
406 RIP responses are sent
407 to the distant
408 .Em active
409 gateway.
410 If no responses are received, the associated route is deleted from
411 the kernel table and RIP responses advertised via other interfaces.
412 If the distant gateway resumes sending RIP responses, the associated
413 route is restored.
414 .Pp
415 Such gateways can be useful on media that do not support broadcasts
416 or multicasts but otherwise act like classic shared media like
417 Ethernets such as some ATM networks.
418 One can list all RIP routers reachable on the HIPPI or ATM network in
419 .Pa /etc/gateways
420 with a series of
421 "host" lines.
422 Note that it is usually desirable to use RIPv2 in such situations
423 to avoid generating lists of inferred host routes.
424 .Pp
425 Gateways marked
426 .Em external
427 are also passive, but are not placed in the kernel
428 routing table nor are they included in routing updates.
429 The function of external entries is to indicate
430 that another routing process
431 will install such a route if necessary,
432 and that other routes to that destination should not be installed
433 by
434 .Nm .
435 Such entries are only required when both routers may learn of routes
436 to the same destination.
437 .Pp
438 The
439 .Pa /etc/gateways
440 file is comprised of a series of lines, each in
441 one of the following two formats or consist of parameters described later.
442 Blank lines and lines starting with '#' are comments.
443 .Bd -ragged
444 .Cm net
445 .Ar Nname[/mask]
446 .Cm gateway
447 .Ar Gname
448 .Cm metric
449 .Ar value
450 .Pf < Cm passive No \&|
451 .Cm active No \&|
452 .Cm extern Ns >
453 .Ed
454 .Bd -ragged
455 .Cm host
456 .Ar Hname
457 .Cm gateway
458 .Ar Gname
459 .Cm metric
460 .Ar value
461 .Pf < Cm passive No \&|
462 .Cm active No \&|
463 .Cm extern Ns >
464 .Ed
465 .Pp
466 .Ar Nname
467 or
468 .Ar Hname
469 is the name of the destination network or host.
470 It may be a symbolic network name or an Internet address
471 specified in "dot" notation (see
472 .Xr inet 3 ) .
473 (If it is a name, then it must either be defined in
474 .Pa /etc/networks
475 or
476 .Pa /etc/hosts ,
477 or
478 .Xr named 8 ,
479 must have been started before
480 .Nm . )
481 .Pp
482 .Ar Mask
483 is an optional number between 1 and 32 indicating the netmask associated
484 with
485 .Ar Nname .
486 .Pp
487 .Ar Gname
488 is the name or address of the gateway to which RIP responses should
489 be forwarded.
490 .Pp
491 .Ar Value
492 is the hop count to the destination host or network.
493 .Pp
494 .Cm Host Ar hname
495 is equivalent to
496 .Cm net Ar nname/32 .
497 .Pp
498 One of the keywords
499 .Cm passive ,
500 .Cm active
501 or
502 .Cm external
503 must be present to indicate whether the gateway should be treated as
504 .Cm passive
505 or
506 .Cm active
507 (as described above),
508 or whether the gateway is
509 .Cm external
510 to the scope of the RIP protocol.
511 .Pp
512 As can be seen when debugging is turned on with
513 .Fl t ,
514 such lines create pseudo-interfaces.
515 To set parameters for remote or external interfaces,
516 a line starting with
517 .Cm if=alias(Hname) ,
518 .Cm if=remote(Hname) ,
519 etc.\& should be used.
520 .Ss Parameters
521 Lines that start with neither "net" nor "host" must consist of one
522 or more of the following parameter settings, separated by commas or
523 blanks:
524 .Bl -tag -width indent
525 .It Cm if Ns = Ns Ar ifname
526 indicates that the other parameters on the line apply to the interface
527 name
528 .Ar ifname .
529 .It Cm subnet Ns = Ns Ar nname Ns Oo / Ns Ar mask Oc Ns Op , Ns Ar metric
530 advertises a route to network
531 .Ar nname
532 with mask
533 .Ar mask
534 and the supplied metric (default 1).
535 This is useful for filling "holes" in CIDR allocations.
536 This parameter must appear by itself on a line.
537 The network number must specify a full, 32-bit value, as in 192.0.2.0
538 instead of 192.0.2.
539 .Pp
540 Do not use this feature unless necessary.
541 It is dangerous.
542 .It Cm ripv1_mask Ns = Ns Ar nname Ns / Ns Ar mask1 , Ns Ar mask2
543 specifies that netmask of the network of which
544 .Ar nname Ns / Ns Ar mask1
545 is
546 a subnet should be
547 .Ar mask2 .
548 For example,
549 .Dq Li ripv1_mask=192.0.2.16/28,27
550 marks 192.0.2.16/28
551 as a subnet of 192.0.2.0/27 instead of 192.0.2.0/24.
552 It is better to turn on RIPv2 instead of using this facility, for example
553 with
554 .Cm ripv2_out .
555 .It Cm passwd Ns = Ns Ar XXX[|KeyID[start|stop]]
556 specifies a RIPv2 cleartext password that will be included on
557 all RIPv2 responses sent, and checked on all RIPv2 responses received.
558 Any blanks, tab characters, commas, or '#', '|', or NULL characters in the
559 password must be escaped with a backslash (\\).
560 The common escape sequences \\n, \\r, \\t, \\b, and \\xxx have their
561 usual meanings.
562 The
563 .Cm KeyID
564 must be unique but is ignored for cleartext passwords.
565 If present,
566 .Cm start
567 and
568 .Cm stop
569 are timestamps in the form year/month/day@hour:minute.
570 They specify when the password is valid.
571 The valid password with the most future is used on output packets, unless
572 all passwords have expired, in which case the password that expired most
573 recently is used, or unless no passwords are valid yet, in which case
574 no password is output.
575 Incoming packets can carry any password that is valid, will
576 be valid within the next 24 hours, or that was valid within the preceding
577 24 hours.
578 To protect the secrets, the passwd settings are valid only in the
579 .Pa /etc/gateways
580 file and only when that file is readable only by UID 0.
581 .It Cm md5_passwd Ns \&= Ns Ar XXX|KeyID[start|stop]
582 specifies a RIPv2 MD5 password.
583 Except that a
584 .Cm KeyID
585 is required, this keyword is similar to
586 .Cm passwd .
587 .It Cm no_ag
588 turns off aggregation of subnets in RIPv1 and RIPv2 responses.
589 .It Cm no_super_ag
590 turns off aggregation of networks into supernets in RIPv2 responses.
591 .It Cm passive
592 marks the interface to not be advertised in updates sent via other
593 interfaces, and turns off all RIP and router discovery through the interface.
594 .It Cm no_rip
595 disables all RIP processing on the specified interface.
596 If no interfaces are allowed to process RIP packets,
597 .Nm
598 acts purely as a router discovery daemon.
599 .Pp
600 Note that turning off RIP without explicitly turning on router
601 discovery advertisements with
602 .Cm rdisc_adv
603 or
604 .Fl s
605 causes
606 .Nm
607 to act as a client router discovery daemon, not advertising.
608 .It Cm no_rip_mcast
609 causes RIPv2 packets to be broadcast instead of multicast.
610 .It Cm no_rip_out
611 causes no RIP updates to be sent.
612 .It Cm no_ripv1_in
613 causes RIPv1 received responses to be ignored.
614 .It Cm no_ripv2_in
615 causes RIPv2 received responses to be ignored.
616 .It Cm ripv2_out
617 turns on RIPv2 output and causes RIPv2 advertisements to be
618 multicast when possible.
619 .It Cm ripv2
620 is equivalent to
621 .Cm no_ripv1_in
622 and
623 .Cm no_ripv1_out .
624 This enables RIPv2.
625 .It Cm no_rdisc
626 disables the Internet Router Discovery Protocol.
627 .It Cm no_solicit
628 disables the transmission of Router Discovery Solicitations.
629 .It Cm send_solicit
630 specifies that Router Discovery solicitations should be sent,
631 even on point-to-point links,
632 which by default only listen to Router Discovery messages.
633 .It Cm no_rdisc_adv
634 disables the transmission of Router Discovery Advertisements.
635 .It Cm rdisc_adv
636 specifies that Router Discovery Advertisements should be sent,
637 even on point-to-point links,
638 which by default only listen to Router Discovery messages.
639 .It Cm bcast_rdisc
640 specifies that Router Discovery packets should be broadcast instead of
641 multicast.
642 .It Cm rdisc_pref Ns \&= Ns Ar N
643 sets the preference in Router Discovery Advertisements to the optionally
644 signed integer
645 .Ar N .
646 The default preference is 0.
647 Default routes with smaller or more negative preferences are preferred by
648 clients.
649 .It Cm rdisc_interval Ns \&= Ns Ar N
650 sets the nominal interval with which Router Discovery Advertisements
651 are transmitted to N seconds and their lifetime to 3*N.
652 .It Cm fake_default Ns \&= Ns Ar metric
653 has an identical effect to
654 .Fl F Ar net[/mask][=metric]
655 with the network and mask coming from the specified interface.
656 .It Cm pm_rdisc
657 is similar to
658 .Cm fake_default .
659 When RIPv2 routes are multicast, so that RIPv1 listeners cannot
660 receive them, this feature causes a RIPv1 default route to be
661 broadcast to RIPv1 listeners.
662 Unless modified with
663 .Cm fake_default ,
664 the default route is broadcast with a metric of 14.
665 That serves as a "poor man's router discovery" protocol.
666 .It Cm adj_inmetric Ns \&= Ns Ar delta
667 adjusts the hop count or metric of received RIP routes by
668 .Ar delta .
669 The metric of every received RIP route is increased by the sum
670 of two values associated with the interface.
671 One is the adj_inmetric value and the other is the interface
672 metric set with
673 .Xr ifconfig 8 .
674 .It Cm adj_outmetric Ns \&= Ns Ar delta
675 adjusts the hop count or metric of advertised RIP routes by
676 .Ar delta .
677 The metric of every received RIP route is increased by the metric
678 associated with the interface by which it was received, or by 1 if
679 the interface does not have a non-zero metric.
680 The metric of the received route is then increased by the
681 adj_outmetric associated with the interface.
682 Every advertised route is increased by a total of four
683 values,
684 the metric set for the interface by which it was received with
685 .Xr ifconfig 8 ,
686 the
687 .Cm adj_inmetric Ar delta
688 of the receiving interface,
689 the metric set for the interface by which it is transmitted with
690 .Xr ifconfig 8 ,
691 and the
692 .Cm adj_outmetric Ar delta
693 of the transmitting interface.
694 .It Cm trust_gateway Ns \&= Ns Ar rname[|net1/mask1|net2/mask2|...]
695 causes RIP packets from router
696 .Ar rname
697 and other routers named in other
698 .Cm trust_gateway
699 keywords to be accepted, and packets from other routers to be ignored.
700 If networks are specified, then routes to other networks will be ignored
701 from that router.
702 .It Cm redirect_ok
703 allows the kernel to listen ICMP Redirect messages when the system is acting
704 as a router and forwarding packets.
705 Otherwise, ICMP Redirect messages are overridden and deleted when the
706 system is acting as a router.
707 .El
708 .Sh FILES
709 .Bl -tag -width /etc/gateways -compact
710 .It Pa /etc/gateways
711 for distant gateways
712 .El
713 .Sh SEE ALSO
714 .Xr icmp 4 ,
715 .Xr udp 4 ,
716 .Xr rtquery 8
717 .Rs
718 .%T Internet Transport Protocols
719 .%R XSIS 028112
720 .%Q Xerox System Integration Standard
721 .Re
722 .Sh HISTORY
723 The
724 .Nm
725 utility appeared in
726 .Bx 4.2 .
727 .\"  LocalWords:  loopback ICMP rtquery ifconfig multicasting Solicitations RIPv
728 .\"  LocalWords:  netstat rdisc
729 .Sh BUGS
730 It does not always detect unidirectional failures in network interfaces,
731 for example, when the output side fails.