📄 routed.8c
字号:
.\" SCCSID: @(#)routed.8c 8.2 10/25/90.TH routed 8c.SH Namerouted \- network routing daemon.SH Syntax.B /etc/routed[.I options] [.I logfile].SH Description.NX "routed program".NX "routing table" "managing".NXS "Xerox NS Routing Information Protocol" "routed program"The.PN routedprogramis invoked at boot time to manage the network routing tables.The routing daemon uses a variant of the Xerox NS RoutingInformation Protocol in maintaining up-to-date kernel routingtable entries..PPIn normal operation the .PN routedprogram listens on a.MS udp 4p socket for packets of routing information. If the host is aninternetwork router, it periodically supplies copiesof its routing tables to any directly connected hostsand networks..PPWhen.PN routedis started, it uses the SIOCGIFCONF.I ioctlto find thosedirectly connected interfaces configured into thesystem and marked up (the software loopback interfaceis ignored). If multiple interfacesare present, it is assumed that the host will forward packetsbetween networks.The.PN routedcommand then transmits a requestpacket on each interface using a broadcast packet, ifthe interface supports it, and enters a loop, listeningfor request and responsepackets from other hosts..PPWhen a request packet is received, .PN routedformulates a reply based on the information maintained in itsinternal tables. The responsepacket generated contains a list of known routes, each markedwith a hop count metric. A count of 16 or greater is considered infinite. The metric associated with eachroute returned provides a metric "relative to the sender"..PPThe response packets received by.PN routedare used to update the routing tables if one of the followingconditions is satisfied:.IP \(bu 4No routing table entry exists for the destination networkor host, and the metric indicates the destination is reachable.That is, the hop count is not infinite..IP \(buThe source host of the packet is the same as the router in theexisting routing table entry. That is, updated information isbeing received from the very internetwork router through whichpackets for the destination are being routed..IP \(buThe existing entry in the routing table has not been updated forsome time (defined to be 90 seconds) and the route is at leastas cost effective as the current route..IP \(buThe new route describes a shorter route to the destination thanthe one currently stored in the routing tables. The metric ofthe new route is compared against the one stored in the tableto decide this..PPWhen an update is applied, the.PN routedcommand records the change in its internal tables and generates aresponse packet to all directly connected hosts and networks.The.PN routedcommand waits a short periodof time (no more than 30 seconds) before modifying the kernel'srouting tables to allow possible unstable situations to settle..PPIn addition to processing incoming packets,the.PN routedcommand periodically checks the routing table entries.If an entry has not been updated for 3 minutes, the entry's metricis set to infinity and marked for deletion. Deletions are delayedan additional 60 seconds to insure the invalidation is propagatedthroughout the internet..PPHosts acting as internetwork routers supply theirrouting tables every 30 seconds to all directly connected hostsand networks. 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 normalrouting tables are bypassed when sending responses.The reception of responses on each network is used to determineif that network and interface are functioning correctly. If noresponse is received on an interface, another route may be chosento route around the interface, or the route may be dropped if noalternative is available..PPThe.PN routedprogram supports the notion of distant passive and active gateways. .NXR "passive gateway".NXR "active gateway"When .PN routedis started up, it reads the file .PN /etc/gatewaysto find gateways which may not be identified usingthe SIOGIFCONF.IR ioctl .Gateways specified in this manner should be marked passiveif they are not expected to exchange routing information,while gateways marked activeshould be willing to exchange routing information (that is,they should have a.PN routedprocess running on the machine).Passive gateways are maintained indefinitely in routing tables. Note, however, that passive gatewaysare known only to the local host that lists them inits .PN /etc/gateways file. Information aboutpassive gateways is not included in any routing informationthat is transmitted..PPActive gateways are treated equally to networkinterfaces. Routing information is distributedto the gateway and if no routing information isreceived for a period of time, the associatedroute is deleted..PPExternal gateways are also passive, but are not placed in the kernelrouting table nor are they included in routing updates.The function of external entries is to inform .PN routedthat another routing process will install such a route, and that alternate routes to that destination should not be installed.Such entries are only required when both routers may learn of routes to the same destination..PPThe .PN /etc/gatewaysis a series of lines, each in the following format:.NXR "gateways file" "entry format".PP< \fBnet\fP | \fBhost\fP > \fIname1\fP \fBgateway\fP \fIname2\fP \fBmetric\fP \fIvalue\fP < \fBpassive\fP | \fBactive\fP | \fBexternal\fP >.PPThe .B netor.B hostkeyword indicates if the route is to a network or specific host..PPThe.I name1is the name of the destination network or host. This may be asymbolic name located in .PN /etc/networksor .PN /etc/hosts ,or an Internet address specified in dot notation. For furtherinformation, see .MS inet 3n ..PPThe.I name2is the name or address of the gateway to which messages shouldbe forwarded..PPThe.I valueis a metric indicating the hop count to the destination hostor network..PPThe keywords.BR passive ,.BR active ,or.B externalindicate if the gateway should be treated as passive or active(as previously described), or whether the gateway is external to the scope of the.PN routedprotocol..PPAny other argument supplied is interpreted as the nameof a file in which the actions of .PN routed should be logged. This log contains informationabout any changes to the routing tables and a history ofrecent messages sent and received which are related tothe changed route..SH Options.IP \fB\-d\fR 5Enables additional debugging information to be logged, such as bad packets received..IP \fB\-g\fROffers a route, on internetwork routers, to the defaultdestination. 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..IP \fB\-s\fRForces .PN routedto supply routing information whether it is acting as an internetworkrouter or not..NXR "routed program" "options".IP \fB\-q\fROpposite of the.PN \-soption..IP \fB\-t\fRPrints all packets, sent or received, on the standard output. In addition,.PN routedcontinues to receive input from the controlling terminal,so that interrupts from the keyboard will kill the process..SH Restrictions.NXR "routed program" "restricted"The kernel's routing tables may not correspond to those of.PN routedfor short periods of time while processes utilizing existingroutes exit; the only remedy for this is to place the routingprocess in the kernel..PPThe.PN routedcommandshould listen to intelligent interfaces, such as an IMP, andto error protocols, such as ICMP, to gather more information.However, it does not always detect unidirectional failures in network interfaces, such as when the output side fails..SH Files.TP 15.PN /etc/gatewaysFor distant gateways.SH See Alsoudp(4p), htable(8)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -