United States-English |
|
|
HP-UX Reference > Rroute(1M)HP-UX 11i Version 3: February 2007 |
|
NAMEroute — manually manipulate the routing tables SYNOPSIS/usr/sbin/route [-f] [-n] [-p pmtu] add [net|host] destination [netmask mask] gateway [count] [source src] /usr/sbin/route inet6 [-f] [-n] [-p pmtu] add [net|host] v6destination [ / prefix] v6gateway [count] [source v6src] /usr/sbin/route [-f] [-n] delete [net|host] destination [netmask mask] gateway [count] [source src] /usr/sbin/route inet6 [-f] [-n] delete [net|host] v6destination [ / prefix] v6gateway [count] [source v6src] /usr/sbin/route -f [-n] /usr/sbin/route inet6 -f [-n] DESCRIPTIONThe route command manipulates the network routing tables manually. You must have appropriate privileges. SubcommandsThe following subcommands are supported.
Options and Argumentsroute recognizes the following options and arguments.
OperationAll symbolic names specified for a destination or gateway are looked up first as a host name using gethostbyname() for IPv4 and getaddrinfo() for IPv6; if the host name is not found, the destination is searched for as a network name using getnetbyname() for IPv4 only. destination and gateway can be in "dot" notation (see inet(3N)). v6destination and v6gateway can be in "colon" notation (see inet6(3N)). If the -n option is not specified, any host and network addresses are displayed symbolically according to the name returned by gethostbyaddr() and getnetbyaddr(), respectively, except for the default network address (printed as default) and addresses that have unknown names. Addresses with unknown names are printed in Internet "dot" notation (see inet(3N)). If the -n option is specified, any host and network addresses are printed in Internet "dot" notation except for the default network address which is printed as default. If the -f option is specified, route deletes all route table entries that specify a remote host for a gateway. If it is used with one of the subcommands described above, the entries are deleted before the subcommand is processed. Path MTU Discovery is a technique for discovering the maximum size of an IP datagram that can be sent on an internet path without causing datagram fragmentation in the intermediate routers. In essence, a source host that utilizes this technique initially sends out datagrams up to the the size of the outgoing interface. The Don't Fragment (DF) bit in the IP datagram header is set. As an intermediate router that supports Path MTU Discovery receives a datagram that is too large to be forwarded in one piece to the next-hop router and the DF bit is set, the router will discard the datagram and send an ICMP Destination Unreachable message with a code meaning "fragmentation needed and DF set". The ICMP message will also contain the MTU of the next-hop router. When the source host receives the ICMP message, it reduces the path MTU of the route to the MTU in the ICMP message. With this technique, the host route in the source host for this path will contain the proper MTU. The -p pmtu option is useful only if you know the network environment well enough to enter an appropriate pmtu for a host or network route. IP will fragment a datagram to the pmtu specified for the route on the local host before sending the datagram out to the remote. It will avoid fragmentation by routers along the path, if the pmtu specified in the route command is correct. ping can be used to find the pmtu information for the route to a remote host. The pmtu information in the routing table can be displayed with the netstat -r command (see netstat(1)). The loopback interface (lo0) is automatically configured when the system boots with the TCP/IP software. For IPv4, the default IP address and netmask of the loopback interface are 127.0.0.1 and 255.0.0.0, respectively. For IPv6, the default IP address and prefix of the loopback interface are ::1 and 128, respectively. When lo0 is configured, the 127.0.0.0 loopback route for IPv4 and the ::1 loopback route for IPv6 are set up automatically so that packets for any 127.*.*.* address and ::1 will loop back to the local host. Users cannot add or delete any 127.*.*.* or ::1 loopback routes. IPv6 OperationThe keyword inet6 is required for adding or deleting IPv6 routes. Examples route inet6 add 2345::1 4444::3
Outputadd destination: gateway gateway
delete destination: gateway gateway
FlagsThe values of the count and destination type fields in the route command determine the presence of the G and H flags in the netstat -r display and thus the route type, as shown in the following table.
DIAGNOSTICSThe following error diagnostics can be displayed: add a route that already exists The specified entry is already in the routing table. delete a route that does not exist The specified route was not in the routing table. cannot update loopback route Routes for any 127.*.*.* loopback destination cannot be added or deleted. WARNINGSReciprocal route commands must be executed on the local host, the destination host, and all intermediate hosts if routing is to succeed in the cases of virtual circuit connections or bidirectional datagram transfers. The HP-UX implementation of route does not presently support a change subcommand. |
Printable version | ||
|