route.1m (2011 09)

r
route(1M) route(1M)
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
routing (7)).
v6destination (inet6 only) The destination host system where the packets will be routed.
v6destination can be one of the following:
A host name (the official name or an alias, see getaddrinfo (3N)).
An IPv6 address in "colon" notation (see inet6 (3N)).
The keyword
default, which signifies the wildcard gateway route.
prefix (inet6 only) The prefix is an integer between 0 and 128 inclusive. It specifies how
many of the leftmost contiguous bits of the v6destination address comprise the
prefix. Its format is similar to the CIDR notation in IPv4. A prefix of 0 would be a
default route. If the prefix is omitted when adding a network route, then the prefix
would be 64 by default. It is advisable to specify the prefix when an IPv6 network
route is added. The prefix option can be applied to network routes only.
netmask mask
(inet only) 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 hexade-
cimal 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 left-most bit posi-
tion of the 32-bit field, can be shorter than the default network mask for the desti-
nation address. (See routing (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 inter-
faces that have the same network address. If there is not any local interface that
has the same network address, then mask will default to the default value of net-
work mask of destination .
gateway (inet only) The gateway through which the destination is reached. gateway can be
one of the following:
A host name (the official name or an alias, see gethostent (3N)).
An Internet address in "dot" notation (see inet (3N)).
v6gateway (inet6 only) The gateway through which the destination is reached. v6gateway can
be one of the following:
A host name (the official name or an alias, see getaddrinfo (3N)).
An IPv6 address in "colon" notation (see inet6 (3N)).
count An integer that indicates whether the gateway is a remote host or the local host. If
the route leads to a destination through a remote gateway, count should be a
number greater than 0. If the route leads to destination and the gateway is the
local host, count should be 0. The default for count is zero. The result is not
defined if count is negative.
source src (inet only) The specified source address. This option allows traffic to be directed to
a selected interface instead of to the system default. When the Strong ES Model is
set to 1, this option allows going out of an interface that would normally be blocked.
Note that the gateway and source must be in the same subnet.
src can be one of the following:
A host name (the official name or an alias, see gethostent (3N)).
An Internet address in "dot" notation (see inet (3N)).
source v6src (inet6 only) The specified source address. This option allows trafc to be directed to
a selected interface instead of to the system default. Note that the gateway and
source must be in the same subnet.
v6src can be one of the following:
A host name (the official name or an alias, see getaddrinfo (3N)).
An IPv6 address in "colon" notation (see inet6 (3N)).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2011