HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
r
route(1M) route(1M)
NAME
route - manually manipulate the routing tables
SYNOPSIS
/usr/sbin/route [-f][-n][-p pmtu] add [nethost] destination [netmask mask] gateway
[count]
/usr/sbin/route [-f][-n] delete [nethost] destination [netmask mask] gateway [count]
/usr/sbin/route -f [-n]
DESCRIPTION
The route command manipulates the network routing tables manually. You must have appropriate
privileges.
Subcommands
The following subcommands are supported.
add Add the specified host or network route to the network routing table. If the route
already exists, a message is printed and nothing changes.
delete Delete the specified host or network route from the network routing table.
Options and Arguments
route recognizes the following options and arguments.
-f Delete all route table entries that specify a remote host for a gateway. If this is used
with one of the subcommands, the entries are deleted before the subcommand is pro-
cessed.
-n Print any host and network addresses in Internet dot notation, except for the default
network address, which is printed as default.
-p pmtu Specifies a path maximum transmission unit (MTU) value for a static route. The
minimum value allowed is 68 bytes; the maximum is the MTU of the outgoing inter-
face for this route. This option can be applied to both host and network routes.
net
or
host
The type of destination address. If this argument is omitted, 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 The destination host system where the packets will be routed. destination can be one
of the following:
A host name (the official name or an alias, see gethostent(3N)).
A network name (the official name or an alias, see getnetent(3N)).
An Internet address in dot notation (see inet(3N)).
The keyword default, which signifies the wildcard gateway route (see rout-
ing(7)).
netmask
mask The mask that will be bit-wise ANDed with destination to yield a net address where
the packets will be routed. mask can be specified as a single hexadecimal number
with a leading 0x, with a dot-notation Internet address, or with a pseudo-network
name listed in the network table (see networks(4)). The length of the mask, which is
the number of contiguous 1’s starting from the leftmost bit position of the 32-bit field,
can be shorter than the default network mask for the destination address. (see rout-
ing(7)). If the
netmask option is not given, mask for the route will be derived from
the netmasks associated with the local interfaces. (see ifconfig(1M)). mask will be
defaulted to the longest netmask of those local interfaces that have the same network
address. If there is not any local interface that has the same network address, then
mask will be defaulted to the default network mask of destination.
gateway The gateway through which the destination is reached. gateway can be one of the fol-
lowing:
HP-UX Release 11i: December 2000 1 Section 1M729
___
___