BSD 4_3_Reno development
[unix-history] / usr / share / man / cat8 / route.0
ROUTE(8) 1990 ROUTE(8)
N\bNA\bAM\bME\bE
route - manually manipulate the routing tables (Interim)
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
r\bro\bou\but\bte\be [ -\b-n\bn ] [ -\b-q\bq ] [ -\b-v\bv ] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [ [ _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs ] _\ba_\br_\bg_\bs ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bR_\bo_\bu_\bt_\be is a program used to manually manipulate the network
routing tables. It normally is not needed, as the system
routing table management daemon, _\br_\bo_\bu_\bt_\be_\bd(8C), should tend to
this task.
_\bR_\bo_\bu_\bt_\be accepts five commands: _\ba_\bd_\bd, to add a route, _\bf_\bl_\bu_\bs_\bh, to
remove all routes, _\bd_\be_\bl_\be_\bt_\be, to delete a specific route,
_\bc_\bh_\ba_\bn_\bg_\be, to changes aspects of a route (such as its gateway),
and _\bm_\bo_\bn_\bi_\bt_\bo_\br, to report any changes to the routing informa-
tion base, routing lookup misses, or suspected network par-
tionings.
The monitor command has the syntax
r\bro\bou\but\bte\be [ -\b-n\bn ] m\bmo\bon\bni\bit\bto\bor\br
The flush command has the syntax
r\bro\bou\but\bte\be [ -\b-n\bn ] [ -\b-n\bn ] f\bfl\blu\bus\bsh\bh [ _\bf_\ba_\bm_\bi_\bl_\by ]
where the address family may be specified by any of the -\b-
o\bos\bsi\bi, -\b-x\bxn\bns\bs, or -\b-i\bin\bne\bet\bt keywords.
The other commands have the following syntax:
r\bro\bou\but\bte\be [ -_\bn ] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [ -\b-n\bne\bet\bt | -\b-h\bho\bos\bst\bt ] _\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn _\bg_\ba_\bt_\be_\bw_\ba_\by
where _\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn is the destination host or network, _\bg_\ba_\bt_\be_\b-
_\bw_\ba_\by is the next-hop gateway to which packets should be
addressed. Routes to a particular host are distinguished
from those to a network by interpreting the Internet address
associated with _\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn. The optional keywords -\b-n\bne\bet\bt and
-\b-h\bho\bos\bst\bt force the destination to be interpreted as a network
or a host, respectively. Otherwise, if the _\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn has
a ``local address part'' of INADDR_ANY, or if the _\bd_\be_\bs_\bt_\bi_\bn_\ba_\b-
_\bt_\bi_\bo_\bn is the symbolic name of a network, then the route is
assumed to be to a network; otherwise, it is presumed to be
a route to a host.
For example, 128.32 is interpreted as -_\bh_\bo_\bs_\bt 128.0.0.32,
128.32.130 is interpreted as -_\bh_\bo_\bs_\bt 128.32.0.130; -_\bn_\be_\bt _\b1_\b2_\b8._\b3_\b2
is interpreted as 128.32.0.0, and -_\bn_\be_\bt _\b1_\b2_\b8._\b3_\b2._\b1_\b3_\b0 is inter-
preted as 128.32.130.0.
If the route is via an interface rather than via a gateway,
the -_\bi_\bn_\bt_\be_\br_\bf_\ba_\bc_\be modifier should be specified; the gateway
given is the address of this host on the common network,
Printed 7/27/90 June 1
ROUTE(8) 1990 ROUTE(8)
indicating the interface to be used for transmission.
The optional modifiers -_\bx_\bn_\bs, and -_\bo_\bs_\bi specify that all sub-
sequent addresses are in the XNS or OSI address families,
and the names must be numeric specifications rather than
symbolic names.
The optional -_\bn_\be_\bt_\bm_\ba_\bs_\bk qualifier is intended to acheieve the
effect of an OSI ESIS redirect with the netmask option. One
specifies an additional ensuing address parameter (to be
interpreted as a network mask). One can override the impli-
cit network mask generated in the inet case by making sure
this option follows the destination parameter.
The optional modifiers -_\br_\bt_\bt, -_\br_\bt_\bt_\bv_\ba_\br, -_\bs_\be_\bn_\bd_\bp_\bi_\bp_\be, -_\br_\be_\bc_\bv_\bp_\bi_\bp_\be,
-_\bm_\bt_\bu, -_\bh_\bo_\bp_\bc_\bo_\bu_\bn_\bt, -_\be_\bx_\bp_\bi_\br_\be, and -_\bs_\bs_\bt_\bh_\br_\be_\bs_\bh provide initial
values to metrics maintained in the routing entry. These
may be individually locked by preceding each such modifier
to be locked by the -_\bl_\bo_\bc_\bk meta-modifier, or one can specify
that all ensuing metrics may be locked by the -_\bl_\bo_\bc_\bk_\br_\be_\bs_\bt
meta-modifier.
All symbolic names specified for a _\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn or _\bg_\ba_\bt_\be_\bw_\ba_\by
are looked up first as a host name using _\bg_\be_\bt_\bh_\bo_\bs_\bt_\bb_\by_\bn_\ba_\bm_\be(3N).
If this lookup fails, _\bg_\be_\bt_\bn_\be_\bt_\bb_\by_\bn_\ba_\bm_\be(3N) is then used to
interpret the name as that of a network.
_\bR_\bo_\bu_\bt_\be uses a routing socket and the new message types
RTM_ADD, RTM_DELETE, and RTM_CHANGE. As such, only the
super-user may modify the routing tables.
If the f\bfl\blu\bus\bsh\bh command is specified, _\br_\bo_\bu_\bt_\be will ``flush'' the
routing tables of all gateway entries. One can choose to
flush only those routes whose destinations are of a given
address family, by specifying an optional keyword describing
which address family.
The -\b-n\bn option prevents attempts to print host and network
names symbolically when reporting actions. The -\b-v\bv option
causes additional details to be printed. The -\b-q\bq option
supresses all output.
D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
``a\bad\bdd\bd [\b[ h\bho\bos\bst\bt |\b| n\bne\bet\btw\bwo\bor\brk\bk ]\b] %\b%s\bs:\b: g\bga\bat\bte\bew\bwa\bay\by %\b%s\bs f\bfl\bla\bag\bgs\bs %\b%x\bx''
The specified route is being added to the tables. The
values printed are from the routing table entry supplied in
the _\bi_\bo_\bc_\bt_\bl call. If the gateway address used was not the
primary address of the gateway (the first one returned by
_\bg_\be_\bt_\bh_\bo_\bs_\bt_\bb_\by_\bn_\ba_\bm_\be), the gateway address is printed numerically
as well as symbolically.
Printed 7/27/90 June 2
ROUTE(8) 1990 ROUTE(8)
``d\bde\bel\ble\bet\bte\be [\b[ h\bho\bos\bst\bt |\b| n\bne\bet\btw\bwo\bor\brk\bk ]\b] %\b%s\bs:\b: g\bga\bat\bte\bew\bwa\bay\by %\b%s\bs f\bfl\bla\bag\bgs\bs %\b%x\bx''
As above, but when deleting an entry.
``%\b%s\bs %\b%s\bs d\bdo\bon\bne\be''
When the -\b-f\bf flag is specified, each routing table entry
deleted is indicated with a message of this form.
``N\bNe\bet\btw\bwo\bor\brk\bk i\bis\bs u\bun\bnr\bre\bea\bac\bch\bha\bab\bbl\ble\be''
An attempt to add a route failed because the gateway listed
was not on a directly-connected network. The next-hop gate-
way must be given.
``n\bno\bot\bt i\bin\bn t\bta\bab\bbl\ble\be''
A delete operation was attempted for an entry which wasn't
present in the tables.
``r\bro\bou\but\bti\bin\bng\bg t\bta\bab\bbl\ble\be o\bov\bve\ber\brf\bfl\blo\bow\bw''
An add operation was attempted, but the system was low on
resources and was unable to allocate memory to create the
new entry.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
netintro(4), routed(8), XNSrouted(8)
Printed 7/27/90 June 3