Name

route

Synopsis

route [option] [command]

Description

TCP/IP command. Manually manipulate the routing tables normally maintained by routed. route accepts two commands: add, to add a route, and del, to delete a route. The two commands have the following syntax:

                  add [-net | -host]                    address                    [gw                    gateway]     [netmask                    mask[mss                    tcp-mss[dev                    device] del                    address                

address is treated as a plain route unless -net is specified or address is found in /etc/networks. -host can be used to specify that address is a plain route whether or not it is found in /etc/networks. The keyword default means to use this route for all requests if no other route is known. You can specify the gateway through which to route packets headed for that address, its netmask, TCP mss, and the device with which to associate the route. Only a privileged user may modify the routing tables.

If no command is specified, route prints the routing tables.

Option

-n

Show numerical addresses; do not look up hostnames. (Useful if DNS is not functioning properly.)

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.