.\" Copyright (c) 1983, 1991 The Regents of the University of California.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" @(#)routed.8 6.6 (Berkeley) 3/16/91
.Nd network routing daemon
is invoked at boot time to manage the network routing tables.
The routing daemon uses a variant of the Xerox NS Routing
Information Protocol in maintaining up to date kernel routing
It used a generalized protocol capable of use with multiple
address types, but is currently used only for Internet routing
within a cluster of networks.
for routing information packets. If the host is an
internetwork router, it periodically supplies copies
of its routing tables to any directly connected hosts
directly connected interfaces configured into the
system and marked ``up'' (the software loopback interface
is ignored). If multiple interfaces
are present, it is assumed that the host will forward packets
packet on each interface (using a broadcast packet if
the interface supports it) and enters a loop, listening
packets from other hosts.
formulates a reply based on the information maintained in its
packet generated contains a list of known routes, each marked
with a ``hop count'' metric (a count of 16, or greater, is
considered ``infinite''). The metric associated with each
route returned provides a metric
.Em relative to the sender .
are used to update the routing tables if one of the following
No routing table entry exists for the destination network
or host, and the metric indicates the destination is ``reachable''
(i.e. the hop count is not infinite).
The source host of the packet is the same as the router in the
existing routing table entry. That is, updated information is
being received from the very internetwork router through which
packets for the destination are being routed.
The existing entry in the routing table has not been updated for
some time (defined to be 90 seconds) and the route is at least
as cost effective as the current route.
The new route describes a shorter route to the destination than
the one currently stored in the routing tables; the metric of
the new route is compared against the one stored in the table
When an update is applied,
records the change in its internal tables and updates the kernel
The change is reflected in the next
In addition to processing incoming packets,
also periodically checks the routing table entries.
If an entry has not been updated for 3 minutes, the entry's metric
is set to infinity and marked for deletion. Deletions are delayed
an additional 60 seconds to insure the invalidation is propagated
throughout the local internet.
Hosts acting as internetwork routers gratuitously supply their
routing tables every 30 seconds to all directly connected hosts
The response is sent to the broadcast address on nets capable of that function,
to the destination address on point-to-point links, and to the router's
own address on other networks.
The normal routing tables are bypassed when sending gratuitous responses.
The reception of responses on each network is used to determine that the
network and interface are functioning correctly.
If no response is received on an interface, another route may be chosen
to route around the interface, or the route may be dropped if no alternative
Enable additional debugging information to be logged,
such as bad packets received.
This flag is used on internetwork routers to offer a route
to the ``default'' destination.
This is typically used on a gateway to the Internet,
or on a gateway that uses another routing protocol whose routes
are not reported to other local routers.
to supply routing information whether it is acting as an internetwork
This is the default if multiple network interfaces are present,
or if a point-to-point link is in use.
option is specified, all packets sent or received are
printed on the standard output. In addition,
will not divorce itself from the controlling terminal
so that interrupts from the keyboard will kill the process.
Any other argument supplied is interpreted as the name
actions should be logged. This log contains information
about any changes to the routing tables and, if not tracing all packets,
a history of recent messages sent and received which are related to
In addition to the facilities described above,
supports the notion of ``distant''
is started up, it reads the file
to find gateways which may not be located using
only information from the
Gateways specified in this manner should be marked passive
if they are not expected to exchange routing information,
while gateways marked active
should be willing to exchange routing information (i.e.
process running on the machine).
Routes through passive gateways are installed in the
kernel's routing tables once upon startup.
Such routes are not included in
any routing information transmitted.
Active gateways are treated equally to network
interfaces. Routing information is distributed
to the gateway and if no routing information is
received for a period of the time, the associated
are also passive, but are not placed in the kernel
routing table nor are they included in routing updates.
The function of external entries is to inform
that another routing process
will install such a route, and that alternate routes to that destination
Such entries are only required when both routers may learn of routes
is comprised of a series of lines, each in
keyword indicates if the route is to a network or specific host.
is the name of the destination network or host. This may be a
known to the name server),
or an Internet address specified in ``dot'' notation; see
is the name or address of the gateway to which messages should
is a metric indicating the hop count to the destination host
indicates if the gateway should be treated as
or whether the gateway is
Internetwork routers that are directly attached to the Arpanet or Milnet
should use the Exterior Gateway Protocol
to gather routing information
rather then using a static routing table of passive gateways.
is required in order to provide routes for local networks to the rest
Sites needing assistance with such configurations
should contact the Computer Systems Research Group at Berkeley.
.Bl -tag -width /etc/gateways -compact
.%T Internet Transport Protocols
.%Q Xerox System Integration Standard
The kernel's routing tables may not correspond to those of
when redirects change or add routes.
should note any redirects received by reading
packets received via a raw socket.
should incorporate other routing protocols,
Using separate processes for each requires configuration options
to avoid redundant or competing routes.
should listen to intelligent interfaces, such as an
to gather more information.
It does not always detect unidirectional failures in network interfaces
(e.g., when the output side fails).