📄 pathalias.8
字号:
.\" @(#)pathalias.8 9.8 93/03/02.TH PATHALIAS 8 "3/2/93" "Public Domain".SH NAMEpathalias, makedb \- mail routing tools.SH SYNOPSIS.B pathalias[.B \-ivcDfI] [.BI \-l \0host] [.BI \-d \0link] [.ig.\" for pathparse..BI \-t \0link] [.BI \-g \0file] [.BI \-s \0link] [.BI \-a \0link] [...I files ...].PP.B makedb[.B \-a] [.BI \-o \0dbmfile] [.I files ...].ad b.SH DESCRIPTION.I Pathaliascomputes the shortest paths and corresponding routes from one host(computer system) to all other known, reachable hosts..I Pathaliasreads host-to-host connectivityinformation on standard input or in the named.IR files ,and writes a list ofhost-route pairs on the standard output..PPHere are the.I pathaliasoptions:.TP 6.B \-iIgnore case: map all host names to lower case.By default, case is significant..TP.B \-cPrint costs: print the path cost before each host-route pair..TP.B \-vVerbose: report some statistics on the standard error output..TP.B \-DTerminal domains: see .I domains section..TP.B \-fFirst hop cost: the printed cost is the cost to the first relay in a path,instead of the cost of the path itself; implies (and overrides) the.B \-coption..TP.B \-IInternet connected: assume a DEDICATED link to anyfully-qualified domain name encountered in the input stream..ig.\" the -g option is for pathparse and is not for public consumption..TP.BI \-g \0fileDump the edges of the graph into the named file....TP.BI \-l \0hostSet local host name to.IR host .By default,.I pathaliasdiscovers the local host name in a system-dependent way..TP.BI \-d \0argDeclare a dead link, host, or network.If.I argis of the form ``host-1!host-2,'' the link from host-1 to host-2is treated as an extremely high cost (\fIi.e.\fP, \s-1DEAD\s0) link.If.I argis a single host name,that host is treated as deadand is used as a relay host of last resort on any path.If.I argis a network name, the network requires a gateway..TP.BI \-t \0argTrace input for link, host or network on the standard error output.The form of.I argis as above..TP.BI \-s \0fileDump the edges that constitute the shortest path tree into the named file..PP.I Makedbtakes.I pathaliasoutput and creates or appends to a.IR dbm (3)database..PPHere are the.I makedboptions:.TP 6.B \-aAppend to an existing database;by default,.I makedbtruncates the database..TP.BI \-o \0dbmfileIdentify the output file base name..SS \fIPathalias\fP Input FormatA line beginning with white space continues the preceding line.Anything following `#' on an input line is ignored..PPA list of host-to-host connections consists of a ``from'' host in column 1,followed by white space,followed by a comma-separated list of ``to' hosts, called.IR links .A link may be preceded or followed by a network character to usein the route.Valid network characters are `!' (default), `@', `:', and `%'.A link (and network character, if present) may befollowed by a ``cost'' enclosed in parentheses.Costs may be arbitraryarithmetic expressions involving numbers, parentheses, `+', `\-', `*',and `/'.Negative costs are prohibited.The following symbolic costs arerecognized:.PP.RS.nf.ta 14mR 17m\s-1LOCAL\s0 25 (local-area network connection)\s-1DEDICATED\s0 95 (high speed dedicated link)\s-1DIRECT\s0 200 (toll-free call)\s-1DEMAND\s0 300 (long-distance call)\s-1HOURLY\s0 500 (hourly poll)\s-1EVENING\s0 1800 (time restricted call)\s-1DAILY\s0 5000 (daily poll, also called \s-1POLLED\s0)\s-1WEEKLY\s0 30000 (irregular poll).fi.RE.PPIn addition,.SM DEADis a very large number (effectively infinite),.SM HIGHand.SM LOWare \-5 and +5 respectively,for baud-rate or quality bonuses/penalties,and.SM FASTis \-80, for adjusting costs of links that use high-speed (9.6 Kbaud or more) modems.These symbolic costs represent an imperfect measure of bandwidth,monetary cost, and frequency of connections.For most mail traffic, it is important to minimize the numberof hosts in a route,thus,.IR e.g. ,.SM HOURLY\&* 24is much larger than.SM DAILY.If no cost is given,a default of 4000 is used..PPFor the most part, arithmetic expressions that mix symbolic constantsother than.SM HIGH,.SM LOW,and.SM FASTmake no sense..IR E.g. ,if a host calls a local neighbor whenever there is work,and additionally polls every evening,the cost is.SM DIRECT,.B not.SM DIRECT+EVENING..PPSome examples:.PP.RS.nf.ta 10m 15mdown princeton!(\s-1DEDICATED\s0), tilt, %thrash(\s-1LOCAL\s0)princeton topaz!(\s-1DEMAND\s0+\s-1LOW\s0)topaz @rutgers(\s-1LOCAL\s0+1).fi.RE.PPIf a link is encountered more than once,the least-cost occurrence dictates the cost and network character.Links are treated as bidirectional but asymmetric:for each link declared in the input, a.SM DEADreverse link is assumed..PPIf the ``to'' host in a link is surrounded by angle brackets,the link is considered.IR terminal ,andfurther links beyond this one are heavily penalized..IR E.g. ,with input.PP.RS.nf.ta 10m 15mseismo <research>(10), research(100), ihnp4(10)research allegra(10)ihnp4 allegra(50).fi.RE.PPthe path from seismo to research is direct, but the path from seismoto allegrauses ihnp4 as a relay, not research..PPThe set of names by which a host is known to its neighbors iscalled its.IR aliases .Aliases are declared as follows:.PP.RSname = alias, alias ....RE.PPThe name used in the route to or through aliased hostsis the name by which the host is knownto its predecessor in the route..PPFully connected networks, such as the.SM ARPANETor a local-area network,are declared as follows:.PP.RSnet = {host, host, ...}.RE.PPThe host-list may be preceded or followed by a routingcharacter (`!' default), and may be followed by a cost (default 4000).The network name is optional; if not given,.I pathaliasmakes one up..PP.RS.nfetherhosts = {rahway, milan, joliet}!(\s-1LOCAL\s0)ringhosts = @{gimli, alida, almo}(\s-1DEDICATED\s0)= {etherhosts, ringhosts}(0).fi.RE.PPThe routing character used in a route to a network member is the oneencountered when ``entering'' the network.See also the sections on.I gatewaysand.I domains ..PPConnection data may be given while hiding host namesby declaring.PP.RSprivate {host, host, ...}.RE.PP.I Pathaliaswill not generate routes for private hosts, but may produce routesthrough them.The scope of a private declaration extends from the declaration to the end ofthe input file in which it appears, or to a private declaration with an emptyhost list, whichever comes first.The latter scope rule offers a way to retain thesemantics of private declarations whenreading from the standard input..PPDead hosts, links, or networks may be presented in the input stream by declaring.PP.RSdead {arg, ...}.RE.PPwhere.I arghas the same form as the argument to the.B \-doption..PPTo force a specific cost for a link, delete all prior declarations with.PP.RSdelete {host-1!host-2}.RE.PPand declare the link as desired.To delete a host and all its links, use.PP.RSdelete {host}.RE.PPError diagnostics refer to the file in which the error was found.To alter the file name, use.PP.RSfile {filename}.RE.PPFine-tuning is possible by adjusting the weightsof all links from a given host, as in.PP.RSadjust {host-1, host-2(LOW), host-3(\-1)}.RE.PPIf no cost is given a default of 4000 is used..PPInput from compressed (and uncompressed) files can bepiped into .I pathaliaswith the following script..PP.RS.nffor i in $*; do case $i in *.Z) echo "file {`expr $i : '\e(.*\e).Z'`}" zcat $i ;; *) echo "file {$i}" cat $i ;; esac echo "private {}"done | pathalias.fi.RE.PP.SS Output FormatA list of host-route pairs is written to the standard output,where route is a string appropriate for use with.IR printf (3),.IR e.g. ,.PP.RS.nf.ta 10m 20mrutgers princeton!topaz!%s@rutgers.fi.RE.PPThe ``%s'' in the route string should be replaced by theuser name at the destination host.(This task is normally performed by a mailer.).PPExcept for.IR domains ,the name of a network is never used inroutes.Thus, in the earlier example, the path from down toup would be ``up!%s,'' not ``princeton-ethernet!up!%s.''.SS GatewaysA network is represented bya pseudo-host and a set of network members.Links from the members to the network have the weight given inthe input, while the cost from the network to the members is zero.If a network is declared dead,the member-to-network links are marked dead,which effectively prohibits access to the networkfrom its members..PPHowever, if the input also shows an explicit link from any host to the network,then that host can be used as a gateway.(In particular, the gateway need not be a network member.).PP.IR E.g. ,if.SM CSNETis declared deadand the input contains.PP.RS.nf.ta 10m 20m\s-1CSNET\s0 = {...}csnet-relay \s-1CSNET\s0.fi.RE.PPthen routes to.SM CSNEThosts will use csnet-relay as a gateway..SS DomainsA network whose name begins with `.' is calleda domain.Domains are presumed to require gateways,.IR i.e. ,they are \s-1DEAD\s0.The route given by a path through a domain is similar tothat for a network, but herethe domain name is tacked onto the end of the next host.Subdomains are permitted..PP.IR E.g. ,.PP.RS.nf.ta 1i.ta 10m 20m 30mharvard .\s-1EDU\s0 # harvard is gateway to .EDU domain\&.\s-1EDU\s0 = {.\s-1BERKELEY\s0, .\s-1UMICH\s0}\&.\s-1BERKELEY\s0 = {ernie}.fi.RE.PPyields.PP.RS.nf.ta 10m 20mernie ...!harvard!ernie.\s-1BERKELEY\s0.\s-1EDU\s0!%s.fi.RE.PPOutput is given for the nearest gatewayto a domain,.IR e.g. ,the example above gives.PP.RS.nf.ta 10m 25m\&.\s-1EDU\s0 ...!harvard!%s.fi.RE.PPOutput is given for a subdomain if it has a differentroute than its parent domain, or if all its ancestor domains are private..PPIf the.B \-Doption is given on the command line,.I pathaliastreats a link from a domain to a host member of that domain as terminal.This property extends to host members of subdomains,.IR etc ,and discouragesroutes that use any domain member as a relay..SS Databases.I Makedbbuilds a.IR dbm (3)database from the standard input or from the named.IR files .Input is expected to be sequence of.SM ASCIIrecords,each consisting of a key field and a data field separated by a single tab.If the tab is missing, the data field is assumed to be empty..SH FILES ET AL..ta \w'/usr/local/lib/palias.{dir,pag} 'u/usr/local/lib/palias.{dir,pag} default dbm output.brnewsgroup comp.mail.maps likely location of some input files.br.IR getopt (3),available from comp.sources.unix archives (if not in the C library)..SH BUGSThe.B \-ioption should be the default..PPThe order of arguments is significant.In particular,.B \-iand.B \-tshould appear early..PP.I Pathaliascan generate hybrid (\fIi.e.\fP ambiguous) routes, which areabhorrent and most certainly should not be given as examplesin the manual entry.Experienced mappers largely shun `@' when preparing input; thisis historical, but also reflects \s-1UUCP\s0'sfacile syntax for source routes..PPMultiple `@'s in routes are loathsome, so.I pathaliasresorts to the ``magic %'' rule when necessary.This convention is not documented anywhere, including here..PPThe.B \-Doption elides insignificant routes to domain members.This is benign, perhaps even beneficial, but confusing, since thebehavior is undocumented and somewhat unpredictable..SH SEE ALSOP. Honeyman and S.M. Bellovin, ``\s-1PATHALIAS\s0 \fIor\fP The Care and Feedingof Relative Addresses,''in \fIProc. Summer \s-1USENIX\s0 Conf.\fP, Atlanta, 1986.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -