1.\" Copyright (c) 1986, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)XNSrouted.8 8.1 (Berkeley) 06/05/93 7.\" 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 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. 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 53In normal operation 54.Nm XNSrouted 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. 60.Pp 61When 62.Nm XNSrouted 63is started, it uses the 64.Dv SIOCGIFCONF 65.Xr ioctl 2 66to find those 67directly connected interfaces configured into the 68system and marked 69.Dq up 70(the software loopback interface 71is ignored). If multiple interfaces 72are present, it is assumed the host will forward packets 73between networks. 74.Nm XNSrouted 75then transmits a 76.Em request 77packet on each interface (using a broadcast packet if 78the interface supports it) and enters a loop, listening 79for 80.Em request 81and 82.Em response 83packets from other hosts. 84.Pp 85When a 86.Em request 87packet is received, 88.Nm XNSrouted 89formulates a reply based on the information maintained in its 90internal tables. The 91.Em response 92packet generated contains a list of known routes, each marked 93with a 94.Dq hop count 95metric (a count of 16, or greater, is 96considered 97.Dq infinite ) . 98The metric associated with each 99route returned provides a metric 100.Em relative to the sender . 101.Pp 102.Em Response 103packets received by 104.Nm XNSrouted 105are used to update the routing tables if one of the following 106conditions is satisfied: 107.Bl -bullet 108.It 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). 112.It 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. 117.It 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. 121.It 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. 126.El 127.Pp 128When an update is applied, 129.Nm XNSrouted 130records the change in its internal tables and generates a 131.Em response 132packet to all directly connected hosts and networks. 133.Xr Routed 8 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. 137.Pp 138In addition to processing incoming packets, 139.Nm XNSrouted 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. 145.Pp 146Hosts acting as internetwork routers gratuitously supply their 147routing tables every 30 seconds to all directly connected hosts 148and networks. 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 157The 158.Nm 159command appeared in 160.Bx 4.3 . 161