Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ route(1M) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

netstat(1)

routing(7)

ifconfig(1M)

ROUTE(1M)  —  Series 300 and 800 Only

NAME

route − manually manipulate the routing tables

SYNOPSIS

/etc/route [ -f ] [ -n ] add [ net | host ] destination gateway [ count ]
/etc/route [ -f ] [ -n ] delete [ net | host ] destination gateway

[ Route is a program used to manually manipulate the network routing tables and can be used by the super-user only. 

Route accepts two commands: add, to add a route; and delete, to delete a route.  When adding a route, if the route already exists, a message is printed and nothing changes. 

Net or host is used to specify the type of destination address.  If not specified, routes to a particular host are distinguished from those to a network by interpreting the Internet address associated with destination. If the destination has a “local address part” of INADDR_ANY (0), then the route is assumed to be to a network; otherwise, it is presumed to be a route to a host. 

Destination is where the packets will be routed.  Destination may be either a host name (or alias as it appears in /etc/hosts), a network name (or alias as it appears in /etc/networks), an internet address in “dot” notation (see inet(3n)), or the keyword default, which signifies the wildcard gateway route (see routing(7)).

Gateway is the gateway through which the destination is reached.  Gateway may be either a host name (or an alias as it appears in /etc/hosts) or an internet address in “dot” notation. 

Count is an integer indicating whether the gateway is a local or remote host.  If the route leads to a destination via a gateway which is a remote host, count should be 1.  If the route leads to destination via a gateway which is the local host, count should be 0. The default for count is zero. The result is not defined if count is negative. See Flags below for more details on count.

All symbolic names specified for a destination or gateway are looked up first in the host name database, /etc/hosts.  If this lookup fails, the name is then looked for in the network name database, /etc/networks.  Destination and gateway may be in dot notation (see inet(3N)). If the -n option is specified and if a destination or gateway addresses are symbolic names, route will convert the symbolic name to its equivalent address, in dot notation, using the the same look-up scheme discussed above. 

If the -f option is specified, route will “flush” the routing tables of all gateway entries. If this is used with one of the commands described above, the tables are flushed before the command’s application. 

Flags

The following truth table can be used to help understand the relationship between count, destination type, flags, and route type. 

Count Destination Type Flags Route Type
=0 network 1=U route to a network via a gateway
which is the local host itself
>0 network 3=UG route to a network via a gateway
which is the remote host
=0 host 5=UH route to a host via a gateway
which is the local host itself
>0 host 7=UGH route to a host via a gateway
which is a remote host
any "default" 3=UG wildcard gateway route

DIAGNOSTICS

add destination: gateway gateway flags flags
The specified route is being added to the tables. The flags field will be 1, 3, 5, or 7.  A 1 (U) indicates a route to a network. A 3 (UG) indicates a route to a network specified with a hop count.  A 5 (UH) indicates a route to a host.  A 7 (UGH) indicates a route to a host specified with a hop count. 

delete destination: gateway gateway flags flags
The specified route is being deleted from the tables. The flags field uses the same values as described above. 

delete a route that does not exist
The specified route was not in the route table.

add a route that already exists
The specified entry is already in the route table.

add too many routes
The routing table is full.

WARNINGS

Reciprocal route commands must be executed on the local host and the destination host, as well as all intermediate hosts, if routing is to succeed in the cases of virtual circuit connections or bidirectional datagram transfers. 

DEPENDENCIES

The change command is not supported on the Series 300 or 800. 

AUTHOR

UCB (University of California at Berkeley)

FILES

/etc/networks
/etc/hosts

SEE ALSO

netstat(1), routing(7), ifconfig(1M). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026