HP-UX Reference (11i v2 04/09) - 1M System Administration Commands N-Z (vol 4)

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 inet6
[-f][-n][-p pmtu]
add [nethost] v6destination [/prefix]
v6gateway [count ]
/usr/sbin/route
[-f][-n] delete [net
host] destination [netmask mask] gateway [count ]
/usr/sbin/route inet6
[-f][-n] delete [net
host] v6destination [/prefix] v6gateway
[count ]
/usr/sbin/route -f
[-n]
/usr/sbin/route inet6 -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.
inet6 Specifies an IPv6 route. When this option is used, the destination and the gateway
must have IPv6 addresses. When this option is not used, the command defaults to
an IPv4 route and the destination and the gateway must have IPv4 addresses.
-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 processed.
-n Print any host and network addresses in Internet "dot" notation for IPv4 and in
"colon" notation for IPv6, 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 for IPv4 and 1280 bytes for IPv6; the maximum
is the MTU of the outgoing interface 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 . For IPv4, 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. For IPv6, if the destination has an address that is less than
128 bits, including any leading and trailing 0’s, the route is assumed to be a net-
work; otherwise, it is treated as a route to a host. An exception is the IPv6
"Unspecified Address", typically represented as ::, which is always interpreted as
the default network route.
destination (inet only) The destination host system where the packets will be routed. destina-
tion 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
routing (7)).
Section 1M706 Hewlett-Packard Company 1 HP-UX 11i Version 2: September 2004