Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ route(1M) — HP-UX 8.07

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

netstat(1)

ifconfig(1M)

routing(7)

route(1M)

Requires Optional LAN/X.25 Software

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 [count]
/etc/route −f [−n]

route is used to manipulate the network routing tables manually, and accessible only by users with appropriate privileges.  route supports two commands:

add Add a route. 

delete delete a route. 

When adding a route, if the route already exists, a message is printed and nothing changes. 

Other command line arguments are:

net

or

host specifies 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), the route is assumed to be to a network; otherwise, it is treated as a route to a host. 

destination destination host system where the packets will be routed.  destination can 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 The gateway through which the destination is reached.  gateway can be either a host name (or an alias as it appears in /etc/hosts) or an Internet address in “dot” notation. 

count An integer that indicates whether the gateway is a remote host or the local host.  If the route leads to a destination via a remote gateway, count should be a number greater than 0.  If the route leads to destination and the gateway is the local host, count should be 0. The default for count is zero. The result is not defined if count is negative. 

All symbolic names specified for a destination or gateway are looked up first in the host name database, /etc/hosts.  If this lookup fails, route searches for the name in the network name database, /etc/networks.  destination and gateway can be in dot notation (see inet(3N)). If the −n option is not specified, any host and network addresses are printed symbolically according to the databases /etc/hosts and /etc/networks, respectively, except for the default network address (printed as "default") and addresses that have unknown names.  Addresses with unknown names are printed in Internet dot notation (see inet(3N) for more information regarding this format.) If the −n option is specified, any host and network addresses are printed in Internet dot notation except for the default network address which is printed as “default”. 

If the −f option is specified, route deletes all route table entries that specify a remote host for a gateway.  If this is used with one of the commands described above, the entries are deleted before the command’s application. 

Output

add destination: gateway gateway flags flags
The specified route is being added to the tables.

delete destination: gateway gateway flags flags
The specified route is being deleted from the tables.

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

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, the destination host, and all intermediate hosts if routing is to succeed in the cases of virtual circuit connections or bidirectional datagram transfers. 

DEPENDENCIES

The HP-UX implementation of route does not presently support a change command argument. 

AUTHOR

route was developed by the University of California, Berkeley. 

FILES

/etc/networks
/etc/hosts

SEE ALSO

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

Hewlett-Packard Company  —  HP-UX Release 8.05: June 1991

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