Route (command)
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, route is a
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
used to view and manipulate the IP routing table in
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
and
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s and also in IBM
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
and
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been not ...
. Manual manipulation of the routing table is characteristic of static routing.


Implementations


Unix and Unix-like

In Linux distributions based on 2.2.x
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
s, the ifconfig and route commands are operated together to connect a computer to a network, and to define routes between
computer network A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
s. Distributions based on later kernels have deprecated ifconfig and route, replacing them with
iproute2 iproute2 is a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel, including routing, network interfaces, tunnels, traffic control, and network-related device drivers. iproute2 ...
. Route for Linux was originally written by Fred N. van Kempen.


Syntax

The command-syntax is: route nNvee FC AF> List kernel routing tables route v FC ... Modify routing table for AF. route AF> Detailed usage syntax for specified AF. route Display version/author and exit.


Example

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


Microsoft Windows

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


Syntax

The command-syntax is: route f p -6 ommand_[Destination[mask_Netmask.html" ;"title="estination.html" ;"title="ommand [Destination">ommand [Destination[mask Netmask">estination.html" ;"title="ommand [Destination">ommand [Destination[mask Netmask[Gateway] metric Metric if Interface


Parameters

* -f: Clears the routing table * -p: The route is added to the Windows Registry and is used to initialize the IP routing table whenever the TCP/IP protocol is started (only when used with the add command) * Command: The command to run (add, change, delete, print) * -4: Force using
IPv4 Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version d ...
* -6: Force using
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. I ...
* Destination: Network destination of the route * mask Netmask: The netmask ( subnet mask) associated with the network destination * Gateway: The forwarding or next hop IP address over which the set of addresses defined by the network destination and subnet mask are reachable * metric Metric: Integer cost metric (ranging from 1 to 9999) for the route * if Interface: The index of the interface over which the destination is reachable * /?: Command help The -p parameter is only supported on
Windows NT 4.0 Windows NT 4.0 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the direct successor to Windows NT 3.51, which was released to manufacturing on July 31, 1996, and then to retail ...
,
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was offici ...
, Windows Millennium Edition, and
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
. It is not supported on
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturi ...
or
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
.


IBM OS/2


Syntax

The command-syntax is: route nqv OMMAND MODIFIERSargs]


Parameters

* -n: Bypasses translating IP addresses to symbolic host names * -q: Suppresses all output * -v: Verbose * COMMAND: The command to run (add, delete, change, get, monitor, flush) * -net: is a network address * -host: is host name or address (default) * -netmask: the mask of the route * : IP address or host name of the destination * : IP address or host name of the next-hop router


ReactOS


Syntax

Print the route table: route print Add a route: route add ask etric Delete a route: route delete


See also

* Routing table *
Internet Protocol Suite The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the sui ...
*
iproute2 iproute2 is a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel, including routing, network interfaces, tunnels, traffic control, and network-related device drivers. iproute2 ...
*
BusyBox BusyBox is a software suite that provides several Unix utilities in a single executable file. It runs in a variety of POSIX environments such as Linux, Android, and FreeBSD, although many of the tools it provides are designed to work with inte ...


Further reading

* *


References


External links

* * * *
route
- o
technet.microsoft.com
{{Windows commands Internet Protocol based network software OS/2 commands Routing Unix network-related software Windows communication and services Windows administration