Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

routed(8)

ioctl(2)



  route(8)                            CLIX                            route(8)



  NAME

    route - Manually manipulates routing tables

  SYNOPSIS

    /usr/bin/route [-f] [-n] [command [[net] destination gateway [metric]]]

  FLAGS

    -f   Flushes the routing tables of all gateway entries.  If this is used
         with one of the route commands described below, the tables are
         flushed before the command's application.

    -n   Suppresses attempts to display host and network names symbolically
         when reporting actions.

  DESCRIPTION

    The route command is used to manually manipulate the network routing
    tables.  It normally is not needed, as the system routing table management
    daemon, routed, should handle this task.

    The route command uses the I_RIADD, I_RIDEL, and the I_RITBL ioctl().  As
    such, only the superuser may modify the routing tables.

    The route command accepts the following commands:

    add      Adds a route.  When the specified route is added to the table,
             the following message is displayed:

             add: lan: %s rtr: %s flags: %x proto: %x

             The displayed values come from the routing table entry supplied
             in the ioctl() call.  If the gateway address used was not the
             primary gateway address (the first one returned by
             gethostbyname()), the gateway address is displayed numerically as
             well as symbolically.

    delete   Deletes a route.  When a route is deleted from the table, the
             following message is displayed:

             delete: lan: %s rtr: %s flags: %x proto: %x

             The displayed values come from the routing table entry supplied
             in the ioctl() call.  If the gateway address used was not the
             primary gateway address (the first one returned by
             gethostbyname()), the gateway address is displayed numerically as
             well as symbolically.

             The -f flag will also produce delete messages.



  2/94 - Intergraph Corporation                                              1






  route(8)                            CLIX                            route(8)



             If a delete operation was attempted for an entry that was not
             present in the tables, the following message is displayed:

             Entry not found in kernel routing table. Network: %s Gateway: %s


    list     Lists the kernel routing table.  Using the -n option with this
             command will produce faster output.

    The destination parameter is the destination network.  The gateway
    parameter is the next-hop gateway to which packets should be addressed.
    The metric parameter is a count indicating the number of hops to the
    destination.

    The metric parameter is required for the add command.  The metric
    parameter must be 0 if the destination is on a directly attached network
    and nonzero if the route uses one or more gateways.

    If adding a route with metric 0, the gateway given is the address of this
    host on the common network, indicating the interface to be used for
    transmission.

    The optional keyword net is provided for compatibility and does not effect
    the operation of the route command.

    Host routes are not supported.

    If the route leads to a destination connected by a gateway (that is, the
    route is not to a logically equivalent network), metric should be greater
    than zero.

    All symbolic names specified for a destination are looked up with
    getnetbyname().  Symbolic names specified for gateway are looked up with
    gethostbyname().

  EXIT VALUES

    The route commands exits with a value of 0 if successful, -1 if an error
    from the system call occurs, and 1 if any other error occurs.

  RELATED INFORMATION

    Commands:  routed(8)

    Functions:  ioctl(2)









  2                                              Intergraph Corporation - 2/94




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