Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

routed(1M)

hosts(4)

intro(4)

networks(4)

route(1M)  —  ADMINISTRATOR COMMANDS

NAME

route − manually manipulate the routing tables

SYNOPSIS

route [ −f ] [ −n ] [ command destination gateway [ metric ] ]

DESCRIPTION

The route program is used to manipulate the network routing tables manually.  Normally, route is not needed, since the routing daemon, routed will manage the system Routing Table and therefore would handle this function. 

If the −f option is specified, route will “flush” the Routing Tables of all gateway entries.  If this is used in conjunction with one of the commands described below, the Routing Tables will be flushed prior to the command’s execution. 

The −n option will prevent any attempt to print host and network names symbolically when reporting the actions. 

The route command will accept three command options:

    add − to add a route,
    delete − to delete a route, and
    change − to change a route (not supported). 

All commands have the following syntax:

route command destination gateway [ metric ]

where

command has the following options:
“add [ host | network ] name: gateway host flags metric”
  The specified route is being added to the tables.
  The printed values are from the Routing Table entry supplied in the
  ioctl call.  “delete host: gateway host flags metric”
   As add, but when deleting an entry. 

destination
is a host or network for which the route is “to”,

gateway
is the gateway to which packets should be addressed, and

metric
is an optional count indicating the number of hops to the destination.  If metric is unspecified, route assumes a default value of 0 for metric . 

Any routes to a particular host can be 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 , this route will be assumed to be to a network; otherwise, it will be presumed to be a route to a host. 

route will use a “raw socket” and the SIOCADDRT and SIOCDELRT ioctl’s to do its work.  As such, only the super-user may modify the Routing Tables. 

DIAGNOSTICS

“host host done”

When the −f flag is specified, each routing table entry deleted will appear with a message of this form. 

“not in table”

A delete operation was attempted for an entry which did not appear in the Routing Tables. 

“routing table overflow”

An add operation was attempted, but the system was low on resources and could not allocate memory to create the new entry. 

“invalid destination gateway”

An add gateway operation was attempted, but the destination gateway is actually one of this system’s interfaces. 

SEE ALSO

routed(1M), hosts(4), intro(4), networks(4). 

NOTE

If the route is to a destination connected via a gateway, metric should be greater than 0.  All symbolic names specified for a destination or for a gateway will be looked up first in the host name database [see hosts(4)].  If this lookup fails, then the name will be looked for in the network name database [see networks(4)]. 

  —  Internet Utilities

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