Reference Manual |
NAME
route - modify the routing tableSYNOPSIS
route add dst mask gateway [metric] [ttl] [src] [proto] [portl] [porth]DESCRIPTION
route addi dst mask ifn [metric] [ttl] [src] [proto] [portl] [porth]
route delete dst mask [src] [metric]
route delete all ifn
route delete alt | main ifn
route copy rtype [ifn]
route vpn [ip | name] [delete]
route alt [ip | name] [delete]
route aux [ip | name] [delete]
route main [ip | name] [delete]
routes
...
Command route add attempts to add an entry to the routing table. The arguments are:NOTESArgument metric can have the values 0 (for direct delivery) or 1 - 15 (for indirect delivery). Argument proto can be any IP protocol type, but the values 6 (TCP) or 17 (UDP) require an additional port range specification. Argument portl then specifies the lower value of the destination port range; argument porth specifies the highest destination port for the entry. To specify only a single port, argument portl is used and argument porth can be omitted.
dst destination host (name or IP) or network address mask subnet mask for the specified destination address gateway address of the next hop for this entry metric RIP metric ttl time-to-live in seconds for this entry (infinity = 0) src source address or subnet for Route Selection via Source Address proto protocol type in IP Header portl Lowest protocol port number porth Highest protocol port number Command route addi is identical to route add, except that argument ifn specifies an interface rather than a gateway.
Command route delete deletes the routes matching dst and mask and (optionally) src and metric from the routing table.
Command route delete all ifn deletes all routes with a non-zero source address for the specified interface.
Command route delete alt ifn deletes the alternate gateway route for the specified interface.
Command route delete main ifn deletes the main gateway route for the specified interface.
Command route copy copies routes of the type specified by rtype from the Windows Routing Table. If ifn is specified, only those routes pertaining to that interface are copied. Argument rtype should be 4 for routes to remote destinations or 3 for routes to local destinations.
The route copy command should be used with caution, because it may copy Windows routes that are of no interest to NAT32.Command route vpn | aux is used to add/delete a source-specific route to/from the routing table. Argument ip or name specifies the desired source address. This command is used when an OpenVPN connection or an Auxiliary connection is in place and a specified machine is to use or not use that connection for Internet access.
The source-specific route ensures that the host always uses the connection for Internet access. If the connection goes down, the host will have no Internet access until the connection is again established.Command route alt | main is used to add/delete a source-specific route to/from the routing table. Argument ip or name specifies the desired source address. This command is used when an alternate or main gateway is available on the Primary interface and a specified machine is to use or not use that gateway for Internet access.
When an alternate gateway is in use, DNS requests are redirected to that gateway's name server (usually NSERVER2).
All addresses and masks are specified in dotted decimal notation.SEE ALSORoutes to be added must point to an IP address on the specified network. The route add command cannot be used to add interfaces to NAT32.
Default routes are characterised by the destination address: 0.0.0.0 and the mask: 0.0.0.0, and 0 denotes "any" for most other arguments.
OpenVPN, routes, setgwx, setis, setns, setsr