PATHALIAS

Section: User Commands (1)
Index Return to Main Contents
 

NAME

pathalias, makedb - electronic address router  

SYNOPSIS

pathalias [ -ivc ] [ -t link ] [ -l host ] [ -d link ] [ files ]

makedb [ -a ] [ -o dbmfile ] [ files ... ]  

DESCRIPTION

pathalias computes the shortest paths and corresponding routes from one host (computer system) to all other known, reachable hosts. pathalias reads host-to-host connectivity information on standard input or in the named files, and writes a list of host-route pairs on the standard output.

makedb takes pathalias output and creates or appends to a dbm(3) database.

Here are the pathalias options:

-i
Ignore case: map all host names to lower case. By default, case is significant.
-c
Print costs: print the path cost (see below) before each host-route pair.
-v
Verbose: report some statistics on the standard error output.
-l host
Set local host name to host. By default, pathalias discovers the local host name in a system-dependent way.
-d arg
Declare a dead link, host, or network (see below). If arg is of the form ``host1!host2,'' the link from host1 to host2 is treated as an extremely high cost (i.e., DEAD) link. If arg is a single host name, that host is treated as dead and is be used as an intermediate host of last resort on any path. If arg is a network name, the network requires a gateway.
-t arg
Trace input for link, host or network on the standard error output. The form of arg is as above.

Here are the makedb options:

-a
Append to an existing database; by default, makedb truncates the database.
-o dbmfile
Identify the output file base name.
 

pathalias Input Format

A line beginning with white space continues the preceding line. Anything following `#' on an input line is ignored.

A 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 links. A link may be preceded or followed by a network character to use in the route. Valid network characters are `!' (default), `@', `:', and `%'. A link (and network character, if present) may be followed by a ``cost'' enclosed in parentheses. Costs may be arbitrary arithmetic expressions involving numbers, parentheses, `+', `-', `*', and `/'. The following symbolic costs are recognized:


LOCAL     25   (local-area network connection)
DEDICATED 95   (high speed dedicated link)
DIRECT    200  (toll-free call)
DEMAND    300  (long-distance call)
HOURLY    500  (hourly poll)
EVENING   1800 (time restricted call)
DAILY     5000 (daily poll, also called POLLED)
WEEKLY    30000(irregular poll)

In addition, DEAD is a very large number (effectively infinite), and HIGH and LOW are -5 and +5 respectively, for baud-rate or quality bonuses/penalties. 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 number of intermediaries in a route, thus, e.g., HOURLY is far greater than DAILY / 24. If no cost is given, a default of 4000 is used.

For the most part, arithmetic expressions that mix symbolic constants other than HIGH and LOW make no sense. E.g., if a host calls a local neighbor whenever there is work, and additionally polls every evening, the cost is DIRECT, not DIRECT+EVENING.

Some examples:


down      princeton!(DEDICATED), tilt,
          %thrash(LOCAL)
princeton topaz!(DEMAND+LOW)
topaz     @rutgers(LOCAL)

If a link is encountered more than once, the least-cost occurrence dictates the cost and network character. Links are treated as bidirectional, to the extent that a DEAD reverse link is assumed unless better information is available.

The set of names by which a host is known by its neighbors is called its aliases. Aliases are declared as follows:

name = alias, alias ...

The name used in the route to or through aliased hosts is the name by which the host is known to its predecessor in the route.

Fully connected networks, such as the ARPANET or a local-area network, are declared as follows:

net = {host, host, ...}

The host-list may be preceded or followed by a routing character, and may be followed by a cost:

princeton-ethernet = {down, up, princeton}!(LOCAL)
ARPA = @{sri-unix, mit-ai, su-score}(DEDICATED)

See also the sections on gateways and domains below.

Connection data may be given while hiding host names by declaring

private {host, host, ...}

pathalias will not generate routes for private hosts or for any host with the same name as a private host, but may produce routes through them. The scope of a private declaration extends from the declaration to the end of the input file in which it appears. It is best to put private declarations at the beginning of the appropriate input file.  

Output Format

A list of host-route pairs is written to the standard output, where route is a string appropriate for use with printf(3), e.g.,

rutgers   princeton!topaz!%s@rutgers

The ``%s'' in the route string should be replaced by the user name at the destination host. (This task is normally performed by a mailer.)

Except for domains (see below), the name of a network is never used in expansions. Thus, in the earlier example, the path from down to up would be ``up!%s,'' not ``princeton-ethernet!up!%s.''  

Gateways

A network is represented by a pseudo-host and a set of network members. Links from the members to the network have the weight given in the input, while the cost from the network to the members is zero. If a network is declared dead on the command line (with the -d option), the member-to-network links are marked dead, which discourages paths to members by way of the network.

If the input also shows a link from a host to the network, then that host will be preferred as a gateway. Gateways need not be network members.

E.g., suppose CSNET is declared dead on the command line and the input contains


CSNET = {...}
csnet-relay         csnet

Then routes to CSNET hosts will use csnet-relay as a gateway.

pathalias discourages forwarding beyond dead networks.  

Domains

A host or network whose name begins with `.' is called a domain. Domains are presumed to require gateways, i.e., they are DEAD. The route given by a path through a domain is similar to that for a network, but here the domain name is tacked onto the end of the next host. Subdomains are permitted. E.g.,


harvard   .EDU
.EDU = {.BERKELEY}
.BERKELEY ernie

yields

ernie     ...!harvard!ernie.BERKELEY.EDU!%s

If a domain member is declared private, its fully qualified domain name is shown instead. E.g., if ernie is declared a private member of .BERKELEY, then the output is


ernie.BERKELEY.EDU       ...!harvard!ernie.BERKELEY.EDU!%s

Output is also given for the nearest gateway to a domain or subdomain. E.g., in the example above


.EDU      ...!harvard!%s
.BERKELEY.EDU            ...!harvard!%s
 

Databases

Makedb builds a dbm(3) database from the standard input or from the named files. (Makedb replaces the obsolete -b option of pathalias, which is no longer recognized.) Input is expected to be sequence of ASCII records, 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.  

FILES ET AL.

/usr/local/lib/palias.{dir,pag}     default dbm output

newsgroup mod.map                  likely location of some input files

getopt(3), available from newsgroup mod.sources (if not in the C library).  

BUGS

The order of arguments is significant. In particular, -i and -t should appear early.

pathalias can generate hybrid (i.e. ambiguous) routes, which are abhorrent and most certainly should not be given as examples in the manual entry.

Multiple `@'s in routes are prohibited by many mailers, so pathalias resorts to the ``magic %'' rule when appropriate. (This convention is not documented anywhere, including here.)

Domains constitute a futile attempt to defeat anarchy and otherwise retard progress.  

AUTHORS

Steve Bellovin (ulysses!smb)
Peter Honeyman (princeton!honey)


 

Index

NAME
SYNOPSIS
DESCRIPTION
pathalias Input Format
Output Format
Gateways
Domains
Databases
FILES ET AL.
BUGS
AUTHORS

This document was created by man2html, using the manual pages.
Time: 06:42:49 GMT, December 12, 2024