unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 pathalias(1)							pathalias(1)




 NAME
      pathalias - electronic address router

 SYNOPSIS
      pathalias [-ivcDf] [-l host] [-d link] [-t link] [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.

    Options
      pathalias recognizes the following options and command-line arguments:

	   -i	     Ignore case:  map all host names to lowercase.  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.

	   -D	     Terminal domains.	Domain members are terminal.

	   -f	     First 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 -c option.

	   -l host   Set local host name to host.  By default, pathalias
		     discovers the local host name in a system-dependent
		     way.

	   -d link   Declare a dead link, host, or network (see below).	 If
		     link is of the form host1!host2, the link from host1 to
		     host2 is treated as an extremely high cost (i.e., DEAD)
		     link.  If link is a single host name, that host is
		     treated as dead and is used as an intermediate host of
		     last resort on any path.  If link is a network name,
		     the network requires a gateway.

	   -t link   Trace input for link, host, or network on the standard
		     error output.  The form of link is as above.

      The public domain version of pathalias includes two undocumented
      options that are briefly described in the Special Options section
      below.





 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




    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 can be
      arbitrary arithmetic expressions involving numbers, parentheses, +, -,
      *, and /.	 Negative costs are prohibited.	 The following symbolic
      costs are recognized:

	      LOCAL	    25	     (local-area network connection)
	      DEDICATED	    100	     (high speed dedicated link)
	      DIRECT	    200	     (toll-free call)
	      DEMAND	    300	     (long-distance call)
	      HOURLY	    500	     (hourly poll)
	      EVENING	    2000     (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, and FAST is -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 number of hosts in a route, thus, e.g., HOURLY is far
      greater than DAILY divided by 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, LOW, and FAST make no sense.  For example, 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+1)

      If 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
      DEAD reverse link is assumed.





 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




      If the ``to'' host in a link is surrounded by angle brackets, the link
      is considered terminal, and further links beyond this one are heavily
      penalized.  For example, with input

	   seismo      <&lt&lt&lt;research>&gt&gt&gt;(10), research(100), ihnp4(10)
	   research    allegra(10)
	   ihnp4       allegra(50)

      the path from seismo to research is direct, but the path from seismo
      to allegra uses ihnp4 as a relay; not research.

      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 can be preceded or followed by a routing character (!
      by default), and can be followed by a cost (4000 by default).  The
      network name is optional; if not given, pathalias creates one.

	   etherhosts = {rahway, milan, joliet}!(LOCAL)
	   ringhosts = @{gimli, alida, almo}(DEDICATED)
	   = {etherhosts, ringhosts}(0)

      The routing character used in a route to a network member is the one
      encountered when ``entering'' the network.  See also the sections on
      gateways and domains.

      Connection data can be given while hiding host names by declaring

	   private {host, host, ...}

      pathalias does not generate routes for private hosts, but can 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, or
      to a private declaration with an empty host list, whichever comes
      first.  The latter scope rule offers a way to retain the semantics of
      private declarations when reading from the standard input.

      Dead hosts, links, or networks can be presented in the input stream by
      declaring





 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




	   dead {arg, ...}

      where arg has the same form as the argument to the -d option.

      To force a specific cost for a link, delete all prior declarations
      with

	   delete {host1!host2}

      and declare the link as desired.	To delete a host and all its links,
      use

	   delete {host}

      Error diagnostics refer to the file in which the error was found.	 To
      alter the file name, use

	   file {filename}

      Fine-tuning is possible by adjusting the weights of all links from a
      given host, as in

	   adjust {host1, host-2(LOW), host3(-1)}

      If no cost is given, a default of 4000 is used.

      Input from compressed (and uncompressed) files can be piped into
      pathalias with the following script.

	   for i in $*; do
		   case $i in
		   *.Z)	   echo "file {`expr $i : ').Z'`}
			   zcat $i ;;
		   *)	   echo "file {$i}"
			   cat $i ;;
		   esac
		   echo "private {}"
	   done

    Output Format
      A list of host-route pairs is written to the standard output, where
      route is a string appropriate for use with printf() (see printf(3S)),
      suchas

	   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
      routes.  Thus, in the earlier example, the path from rahway to milan



 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




      would be milan!%s, not etherhosts!milan!%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, the member-to-network links are marked
      dead, which effectively prohibits access to the network from its
      members.

      However, 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).

      For example, 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.

    Domains
      A 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 appended to the end of the name of the next host.
      Subdomains are permitted.	 For example:

	   harvard     .EDU	     # harvard is gateway to .EDU domain
	   .EDU	       = {.BERKELEY, .UMICH}
	   .BERKELEY   = {ernie}

      yields

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

      Output is given for the nearest gateway to a domain; e.g., the example
      above gives

	   .EDU		 ...!harvard!%s

      Output is given for a subdomain if it has a different route than its
      parent domain, or if all its ancestor domains are private.

      If the -D option is given on the command line, pathalias treats a link
      from a domain to a host member of that domain as terminal.  This
      property extends to host members of subdomains, etc., and discourages
      routes that use any domain member as a relay.





 Hewlett-Packard Company	    - 5 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




    Special Options
      The public domain version of pathalias includes two undocumented
      options that rewrite named files with intermediate data of limited
      usage.  Here are brief descriptions:

	   -g file	  Dump graph edges into file in the form host>&gt&gt&gt;host
			  for simple connections and host@<tab>host for
			  network connections (from hosts to networks only).

	   -s file	  Dump shortest path tree into file in the form host
			  <tab>[@]host[!](cost), including both connections
			  from hosts to networks and from networks to hosts.
			  This data may be useful for generating lists of
			  one-way connections.

 BUGS
      The -i option should be the default.

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

      pathalias can generate hybrid (i.e., ambiguous) routes, which are
      abhorrent and most certainly should not be given as examples in a
      manual entry.  Experienced mappers largely shun '@' when preparing
      input; this is historical, but also reflects UUCP's simplistic syntax
      for source routes.

      Mixed-mode paths are ambiguous because the precedence of @ versus ! is
      not specified, varies from host to host, and is configurable.  They
      should rarely be used.

      Multiple @s in routes are prohibited by many mailers.  To circumvent
      this restriction, mailers instead support the ``magic %'' rule,
      described below.	When pathalias would otherwise generate a path
      containing multiple @s, it instead generates a path to which the
      ``magic %'' rule can be correctly applied.

      Basically, the ``magic %'' rule for generating paths is ``when
      constructing a path that would require multiple @s, replace all but
      the right-most @ with %.

      When a mailer that supports the ``magic %'' rule receives a message
      that was routed to it via ..path..@host, it processes the route as
      follows:

	   1.  Remove the trailing "@host" part of the route.

	   2.  Examine the remaining route from right to left, proceeding to
	       the next step when a "!" is seen.  If a `%' is seen, change
	       it to `@' and proceed to the next step immediately.




 Hewlett-Packard Company	    - 6 -   HP-UX Release 11i: November 2000






 pathalias(1)							pathalias(1)




	   3.  Continue processing the message using the modified route.  If
	       the modified route contains both `!' and `@' characters, the
	       exact selection of the next host to route the message is
	       governed by the specific precedence of `!' vs. `@' at this
	       host.

	       For example, if a host, jazz.nonesuch.com, received a message
	       with a path foo!joe%castle.hrh.gov.uk@jazz.nonesuch.com, the
	       mailer would convert the path to foo!joe@castle.hrh.gov.uk,
	       and then forward it appropriately.  If the host were
	       configured such that `!' were of higher precedence than `@',
	       the message would be forwarded to host foo, which would then
	       deliver the message to joe@castle.hrh.gov.uk.  If instead
	       jazz.nonesuch.com were configured with `@' as higher in
	       precedence, it would forward the message to host
	       castle.hrh.gov.uk, which would then deliver it to foo!joe.
	       (Clearly, pathalias could only correctly generate such a path
	       if it knew the precedence at host jazz.nonesuch.com; since
	       the database does not contain that information, such paths
	       from pathalias should be viewed with suspicion.)

	   The -D option suppresses insignificant routes to domain members.
	   This is benign, perhaps even beneficial, but confusing, since the
	   behavior is undocumented and somewhat unpredictable.

 AUTHOR
      pathalias was developed by Peter Honeyman and Steven M. Bellovin.

 FILES
      newsgroup comp.mail.maps		    Likely location of some input
					    files.

 SEE ALSO
      P.Honeyman and S.M. Bellovin, PATHALIAS or The Care and Feeding of
      Relative Addresses, in Proc. Summer USENIX Conf., Atlanta, 1986.



















 Hewlett-Packard Company	    - 7 -   HP-UX Release 11i: November 2000