O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

route

Synopsis

                  route [options] [command]

TCP/IP command. Add or remove entries in the routing tables 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 [modifiers]
del [-net | -host] 
                  address [modifiers]

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. Using route modifiers, you can specify the gateway through which to route packets headed for that address, its netmask, TCP mss, or the device with which to associate the route; you can also mask certain routes. Only a privileged user may modify the routing tables.

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

Options

-n, --numeric

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

-e, --extend

Use netstat -r format to print routing table. Use twice to print extended information. Same as netstat -ree.

-h, --help

Print help message, then exit.

-v, --verbose

Verbose mode.

-A family, -- family

Specify an address family to use with an add or del command. family may be inet, inet6, ax25, netrom, ipx, ddp, or x25.

-C, --cache

Perform command on the routing cache instead of the forwarding information base (FIB) routing table.

-F, --fib

Perform command on the forwarding information base (FIB) routing table. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required