Annotation of 43BSDTahoe/man/man8/route.8, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1983 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)route.8c    6.2 (Berkeley) 5/24/86
                      6: .\"
                      7: .TH ROUTE 8C "May 24, 1986"
                      8: .UC 5
                      9: .SH NAME
                     10: route \- manually manipulate the routing tables
                     11: .SH SYNOPSIS
                     12: .B /etc/route
                     13: [
                     14: .B \-f
                     15: ] [
                     16: .B \-n
                     17: ] [
                     18: .I command args
                     19: ]
                     20: .SH DESCRIPTION
                     21: .I Route
                     22: is a program used to manually manipulate the network
                     23: routing tables.  It normally is not needed, as the
                     24: system routing table management daemon,
                     25: .IR routed (8C),
                     26: should tend to this task.
                     27: .PP
                     28: .I Route
                     29: accepts two commands:
                     30: .IR add ,
                     31: to add a route, and
                     32: .IR delete ,
                     33: to delete a route.
                     34: .PP
                     35: All commands have the following syntax:
                     36: .PP
                     37: .ti +0.25i
                     38: .B /etc/route 
                     39: .I command
                     40: [
                     41: .B net
                     42: |
                     43: .B host
                     44: ]
                     45: .I destination gateway
                     46: [
                     47: .I metric
                     48: ]
                     49: .PP
                     50: where
                     51: .I destination
                     52: is the destination host or network,
                     53: .I gateway
                     54: is the next-hop gateway to which packets should be addressed, and
                     55: .I metric
                     56: is a count indicating the number of hops to
                     57: the
                     58: .IR destination .
                     59: The metric is required for
                     60: .I add
                     61: commands; it must be zero if the destination is on a directly-attached network,
                     62: and nonzero if the route utilizes one or more gateways.
                     63: If adding a route with metric 0,
                     64: the gateway given is the address of this host on the common network,
                     65: indicating the interface to be used for transmission.
                     66: Routes to a particular host are distinguished from those to
                     67: a network by interpreting the Internet address associated with
                     68: .IR destination .
                     69: The optional keywords
                     70: .B net
                     71: and
                     72: .B host
                     73: force the destination to be interpreted as a network or a host, respectively.
                     74: Otherwise, if the 
                     75: .I destination
                     76: has a ``local address part'' of INADDR_ANY,
                     77: or if the
                     78: .I destination
                     79: is the symbolic name of a network, then the route is
                     80: assumed to be to a network; otherwise, it is presumed to be a
                     81: route to a host.  If the route is to a destination connected
                     82: via a gateway, the 
                     83: .I metric
                     84: should be greater than 0.  All symbolic names specified for a
                     85: .I destination 
                     86: or 
                     87: .I gateway
                     88: are looked up first as a host name using
                     89: .IR gethostbyname (3N).
                     90: If this lookup fails,
                     91: .IR getnetbyname (3N)
                     92: is then used to interpret the name as that of a network.
                     93: .PP
                     94: .I Route
                     95: uses a raw socket and the SIOCADDRT and SIOCDELRT
                     96: .IR ioctl 's
                     97: to do its work.  As such, only the super-user may modify
                     98: the routing tables.
                     99: .PP
                    100: If the 
                    101: .B \-f
                    102: option is specified, 
                    103: .I route
                    104: will ``flush'' the routing tables of all gateway entries.
                    105: If this is used in conjunction with one of the commands
                    106: described above, the tables are flushed prior to the command's
                    107: application.
                    108: .PP
                    109: The
                    110: .B \-n
                    111: option prevents attempts to print host and network names symbolically
                    112: when reporting actions.
                    113: .SH DIAGNOSTICS
                    114: ``\fBadd [ host | network ] %s: gateway %s flags %x\fP''
                    115: .br
                    116: The specified route is being added to the tables.  The
                    117: values printed are from the routing table entry supplied
                    118: in the 
                    119: .I ioctl
                    120: call.
                    121: If the gateway address used was not the primary address of the gateway
                    122: (the first one returned by
                    123: .IR gethostbyname ),
                    124: the gateway address is printed numerically as well as symbolically.
                    125: .PP
                    126: ``\fBdelete [ host | network ] %s: gateway %s flags %x\fP''
                    127: .br
                    128: As above, but when deleting an entry.
                    129: .PP
                    130: ``\fB%s %s done\fP''
                    131: .br
                    132: When the 
                    133: .B \-f
                    134: flag is specified, each routing table entry deleted
                    135: is indicated with a message of this form.
                    136: .PP
                    137: ``\fBNetwork is unreachable\fP''
                    138: .br
                    139: An attempt to add a route failed because the gateway listed was not
                    140: on a directly-connected network.
                    141: The next-hop gateway must be given.
                    142: .PP
                    143: ``\fBnot in table\fP''
                    144: .br
                    145: A delete operation was attempted for an entry which
                    146: wasn't present in the tables.
                    147: .PP
                    148: ``\fBrouting table overflow\fP''
                    149: .br
                    150: An add operation was attempted, but the system was
                    151: low on resources and was unable to allocate memory
                    152: to create the new entry.
                    153: .SH "SEE ALSO"
                    154: intro(4N),
                    155: routed(8C),
                    156: XNSrouted(8C)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.