⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 route.8c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 8C
字号:
.\" SCCSID: @(#)route.8c	8.1	9/11/90.TH route 8c.SH Nameroute \- manually manipulate the routing tables.SH Syntax.B /etc/route[.B \-f] [.B \-n] .I command args].SH Description.NXR "route program".NXA "route program" "routed program".NXA "routed program" "route program".NXR "routing table" "manipulating"The.PN routeprogram is used to manipulate the networkrouting tables manually.  However, normally it is not needed, as thesystem routing table management daemon, .MS routed 8c ,should tend to this task..PPThe.PN routeprogram accepts two commands:.NXR "route program" "commands".IR add ,to add a route and.IR delete ,to delete a route. .PPAll commands have the following syntax:.PP.ti +0.5i.B /etc/route .I command[.B net|.B host].I destination gateway[.I metric].PPIn this syntax,.I destinationis a host or network for whichthe route is to,.I gatewayis the gateway to which packets should be addressed, and.I metricis an optional count indicating the number of hops tothe.IR destination .The metric is required for .B addcommands.It must be zero if the destination is on a directly-attached network,and nonzero if the route utilizes one or more gateways..PPWhen adding a route with metric 0, the gateway given is the address of this host on the commonnetwork, indicating the interface to be used for transmission.Routes to a particular host are distinguished from routes toa network by interpreting the Internet address associated with.IR destination .The optional keywords .B netand.B hostforce the destination to be interpreted as a network or host, respectively.If the .I destinationhas a local address part of INADDR_ANY, then the route isassumed to be to a network. Otherwise, it is presumed to be aroute to a host.  If the route is to a destination connectedvia a gateway, the .I metricshould be greater than 0.  All symbolic names specified for a.I destination or .I gatewayare looked up first as a host name using.MS gethostbyname 3n .If this lookup fails, .MS getnetbyname 3nis then used to interpret the name as that of a network..PPThe.PN routecommand uses a raw socket and the SIOCADDRT and SIOCDELRTioctlsto do its work.  As such, only the superuser can modifythe routing tables..SH Options.IP \fB\-f\fR 5Flushes the routing tables of all gateway entries.If .PN \-fis used with one of the commandsdescribed above, the tables are flushed prior to the command'sapplication..IP \fB\-n\fR 5Prevents attempts to print host and network names symbolically when reporting actions..SH Restrictions.NXR "route program" "restricted"The change operation is not implemented.Therefore, you should first add the new route,and then delete the old one..SH Diagnostics.NXR "route program" "diagnostics".B add [host | network] %s: gateway %s flags %x".brThe specified route is being added to the tables.  Thevalues printed are from the routing table entry suppliedin the .I ioctlcall.  If the gateway address used was not the primary address of thegateway (the first one returned by.PN gethostbyname),the gateway address is printed numerically as well as symbolically..PP.B "delete [ host | network] %s: gateway %s flags %x".brThe specified route is being deleted from the tables.  Thevalues printed are from the routing table entry suppliedin the .I ioctlcall.  If the gateway address used was not the primary address of thegateway (the first one returned by.PN gethostbyname),the gateway address is printed numerically as well as symbolically..PP.B "%s %s done".brWhen the .PN \-fflag is specified, each routing table entry that is deletedis indicated with a message of this form..PP.B "Network is unreachable".brAn attempt to add a route failed because the gateway listed was not on a directly-connected network.  The next-hop gateway must be given..PP.B "not in table".brA delete operation was attempted for an entry whichwas not present in the tables..PP.B "routing table overflow".brAn add operation was attempted, but the system waslow on resources and was unable to allocate memoryto create the new entry..SH See Alsointro(4n), routed(8c)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -