Route (command) (original) (raw)

From Wikipedia, the free encyclopedia

Computer operating system command

route
The ReactOS route command
Developers Fred N. van Kempen, Microsoft, IBM, ReactOS Contributors
Operating system Unix-like, OS/2, Microsoft Windows, ReactOS
Platform Cross-platform
Type Command
License OS/2, Windows: Proprietary commercial softwareReactOS: GPLv2

In computing, **route** is a command used to view and manipulate the IP routing table in Unix-like and Microsoft Windows[1] operating systems and also in IBM OS/2 and ReactOS.[2] Manual manipulation of the routing table is characteristic of static routing.

In Linux distributions based on 2.2.x Linux kernels, the [ifconfig](/wiki/Ifconfig "Ifconfig") and route commands are operated together to connect a computer to a network, and to define routes between computer networks. Distributions based on later kernels have deprecated ifconfig and route, replacing them with [iproute2](/wiki/Iproute2 "Iproute2"). Route for Linux was originally written by Fred N. van Kempen.[3]

The command-syntax is:

route [-nNvee] [-FC] [] # List kernel routing tables route [-v] [-FC] {add|del|flush} ... # Modify routing table for AF. route {-h|--help} [] # Detailed usage syntax for specified AF. route {-V|--version} # Display version/author and exit.

user@linux:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.101.0 192.168.102.102 255.255.255.0 UG 0 0 0 eth0 192.168.102.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.103.0 192.168.102.102 255.255.255.0 UG 0 0 0 eth0 192.168.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.12.1 0.0.0.0 UG 0 0 0 eth0

The command is only available if the TCP/IP protocol is installed as a component in the properties of a network adapter.

The command-syntax is:

route [-f] [-p] [-4|-6] [Command [Destination] [mask Netmask] [Gateway] [[metric Metric]] [[if Interface]]

The -p parameter is only supported on Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP. It is not supported on Windows 95 or Windows 98.

The command-syntax is:

route [-nqv] [COMMAND] [[MODIFIERS] args]

Print the route table:

Add a route:

route add [mask ] [metric ]

Delete a route:

route delete

  1. ^ "Adding a TCP/IP Route to the Windows Routing Table". Archived from the original on 2016-11-13. Retrieved 2016-11-13.
  2. ^ "Reactos/Reactos". GitHub. 4 November 2021.
  3. ^ "Route(8): Show/Change IP routing table - Linux man page".