move compatibility hooks for S_ISREG et al to conf.h
[unix-history] / usr / src / sbin / XNSrouted / XNSrouted.8
CommitLineData
0fccfdb8 1.\" Copyright (c) 1986, 1991 The Regents of the University of California.
92c0cb22 2.\" All rights reserved.
bbd6082e 3.\"
266e2b06 4.\" %sccs.include.redist.man%
bbd6082e 5.\"
0fccfdb8 6.\" @(#)XNSrouted.8 6.4 (Berkeley) %G%
92c0cb22 7.\"
0fccfdb8
CL
8.Dd
9.Dt XNSROUTED 8
10.Os BSD 4.3
11.Sh NAME
12.Nm XNSrouted
13.Nd NS Routing Information Protocol daemon
14.Sh SYNOPSIS
15.Nm XNSrouted
16.Op Fl q
17.Op Fl s
18.Op Fl t
19.Op Ar logfile
20.Sh DESCRIPTION
21.Nm XNSrouted
bbd6082e
KM
22is invoked at boot time to manage the Xerox NS routing tables.
23The NS routing daemon uses the Xerox NS Routing
24Information Protocol in maintaining up to date kernel routing
25table entries.
0fccfdb8
CL
26.Pp
27Available options:
28.Bl -tag -width logfile
29.It Fl q
30Do not supply routing information (opposite of
31.Fl s
32option below).
33.It Fl s
34Forces
35.Nm XNSrouted
36to supply routing information whether it is acting as an internetwork
37router or not.
38.It Fl t
39All packets sent or received are
40printed on the standard output. In addition,
41.Nm XNSrouted
42will not divorce itself from the controlling terminal
43so that interrupts from the keyboard will kill the process.
44.It Ar logfile
45Name of file in which
46.Nm XNSrouted Ns 's
47actions should be logged. This log contains information
48about any changes to the routing tables and a history of
49recent messages sent and received which are related to
50the changed route.
51.El
52.Pp
bbd6082e 53In normal operation
0fccfdb8 54.Nm XNSrouted
bbd6082e
KM
55listens
56for routing information packets. If the host is connected to
57multiple NS networks, it periodically supplies copies
58of its routing tables to any directly connected hosts
59and networks.
0fccfdb8 60.Pp
bbd6082e 61When
0fccfdb8
CL
62.Nm XNSrouted
63is started, it uses the
64.Dv SIOCGIFCONF
65.Xr ioctl 2
bbd6082e
KM
66to find those
67directly connected interfaces configured into the
0fccfdb8
CL
68system and marked
69.Dq up
70(the software loopback interface
bbd6082e
KM
71is ignored). If multiple interfaces
72are present, it is assumed the host will forward packets
73between networks.
0fccfdb8 74.Nm XNSrouted
bbd6082e 75then transmits a
0fccfdb8 76.Em request
bbd6082e
KM
77packet on each interface (using a broadcast packet if
78the interface supports it) and enters a loop, listening
79for
0fccfdb8 80.Em request
bbd6082e 81and
0fccfdb8 82.Em response
bbd6082e 83packets from other hosts.
0fccfdb8 84.Pp
bbd6082e 85When a
0fccfdb8 86.Em request
bbd6082e 87packet is received,
0fccfdb8 88.Nm XNSrouted
bbd6082e
KM
89formulates a reply based on the information maintained in its
90internal tables. The
0fccfdb8 91.Em response
bbd6082e 92packet generated contains a list of known routes, each marked
0fccfdb8
CL
93with a
94.Dq hop count
95metric (a count of 16, or greater, is
96considered
97.Dq infinite ) .
98The metric associated with each
bbd6082e 99route returned provides a metric
0fccfdb8
CL
100.Em relative to the sender .
101.Pp
102.Em Response
bbd6082e 103packets received by
0fccfdb8 104.Nm XNSrouted
bbd6082e
KM
105are used to update the routing tables if one of the following
106conditions is satisfied:
0fccfdb8
CL
107.Bl -bullet
108.It
bbd6082e
KM
109No routing table entry exists for the destination network
110or host, and the metric indicates the destination is ``reachable''
111(i.e. the hop count is not infinite).
0fccfdb8 112.It
bbd6082e
KM
113The source host of the packet is the same as the router in the
114existing routing table entry. That is, updated information is
115being received from the very internetwork router through which
116packets for the destination are being routed.
0fccfdb8 117.It
bbd6082e
KM
118The existing entry in the routing table has not been updated for
119some time (defined to be 90 seconds) and the route is at least
120as cost effective as the current route.
0fccfdb8 121.It
bbd6082e
KM
122The new route describes a shorter route to the destination than
123the one currently stored in the routing tables; the metric of
124the new route is compared against the one stored in the table
125to decide this.
0fccfdb8
CL
126.El
127.Pp
bbd6082e 128When an update is applied,
0fccfdb8 129.Nm XNSrouted
bbd6082e 130records the change in its internal tables and generates a
0fccfdb8 131.Em response
bbd6082e 132packet to all directly connected hosts and networks.
0fccfdb8 133.Xr Routed 8
bbd6082e
KM
134waits a short period
135of time (no more than 30 seconds) before modifying the kernel's
136routing tables to allow possible unstable situations to settle.
0fccfdb8 137.Pp
bbd6082e 138In addition to processing incoming packets,
0fccfdb8 139.Nm XNSrouted
bbd6082e
KM
140also periodically checks the routing table entries.
141If an entry has not been updated for 3 minutes, the entry's metric
142is set to infinity and marked for deletion. Deletions are delayed
143an additional 60 seconds to insure the invalidation is propagated
144to other routers.
0fccfdb8 145.Pp
bbd6082e
KM
146Hosts acting as internetwork routers gratuitously supply their
147routing tables every 30 seconds to all directly connected hosts
148and networks.
0fccfdb8
CL
149.Sh SEE ALSO
150.Xr idp 4
151.Rs
152.%T "Internet Transport Protocols"
153.%R "XSIS 028112"
154.%Q "Xerox System Integration Standard"
155.Re
156.Sh HISTORY
bbd6082e 157The
0fccfdb8
CL
158.Nm
159command appeared in
160.Bx 4.3 .