routel
Show or modify the routing table
SYNOPSIS
routel
[SELECTOR...] [OPTION...]
PARAMETERS
table TABLE_ID
Specifies the routing table to display. Examples: main, local, default, or a numeric ID. Defaults to main if not specified. This is a SELECTOR for ip route show
.
dev DEVICE
Displays routes associated with a specific network interface, e.g., eth0 or enp0s3. This is a SELECTOR for ip route show
.
to PREFIX
Filters routes to a specific destination network or host, e.g., 192.168.1.0/24 or 10.0.0.1. This is a SELECTOR for ip route show
.
from PREFIX
Filters routes originating from a specific source address (relevant for policy routing). This is a SELECTOR for ip route show
.
proto PROTOCOL
Filters routes by their originating protocol, such as kernel, boot, static, dhcp, or redirect. This is a SELECTOR for ip route show
.
scope SCOPE
Filters routes by their scope, e.g., host (for routes to local addresses), link (for directly connected networks), or global (for internet-routable addresses). This is a SELECTOR for ip route show
.
type TYPE
Filters routes by their type, such as unicast, local, broadcast, nat, unreachable, prohibit, or blackhole. This is a SELECTOR for ip route show
.
metric VALUE
Filters routes by their metric value, which influences route preference when multiple routes exist to the same destination. This is a SELECTOR for ip route show
.
exact
When used with selectors, forces an exact match rather than a longest-prefix match. This is an OPTION for ip route show
.
cached
Displays routes from the routing cache, rather than the main routing table. This is an OPTION for ip route show
.
DESCRIPTION
routel
is typically a shell script wrapper or an alias for the ip route show
command, part of the modern iproute2
utilities. It provides a convenient way to display the kernel's IP routing tables. While the older route
command is still available on many systems, ip route
(and thus routel
as its wrapper) offers more advanced and flexible capabilities for managing and inspecting network routes, including support for multiple routing tables, policy routing, and various address families. routel
simplifies the common task of viewing active routes, often defaulting to showing the main routing table. Its output typically includes destination networks, gateways, device interfaces, and route metrics.
CAVEATS
routel
is not a standard, standalone utility across all Linux distributions. It is typically implemented as a wrapper script or an alias for ip route show
. Its existence and exact behavior (e.g., which ip route
options it supports or defaults to) can vary significantly depending on the system configuration or distribution. For comprehensive routing table management (adding, deleting, changing routes), the underlying ip route
command should be used directly, as routel
is primarily for display purposes.
DEFAULT ROUTE LISTING
To display the main routing table, similar to ip route show without any filters:routel
This typically shows all active unicast routes in the main routing table, including default gateways.
LISTING ROUTES FOR A SPECIFIC INTERFACE
To view routes associated with a particular network interface, e.g., eth0:routel dev eth0
This can be helpful in debugging connectivity issues related to a specific network adapter or VLAN.
FILTERING BY DESTINATION NETWORK
To list routes pointing to a specific destination network or host, e.g., 192.168.1.0/24:routel to 192.168.1.0/24
Or for a single host:routel to 8.8.8.8
DISPLAYING A SPECIFIC ROUTING TABLE
Linux supports multiple routing tables. To display routes from a table other than the default main table, for instance, table 200 or the local table:routel table 200
routel table local
HISTORY
The routel
command itself does not have a distinct history as a separate project or standard utility. Instead, its 'history' is intrinsically tied to the evolution of Linux networking tools. It emerged as a user-friendly wrapper or alias for the ip route
command, which gained prominence with the iproute2
utilities. The iproute2
suite was developed to replace the older net-tools
utilities (like route
, ifconfig
, netstat
) due to their limitations in handling modern Linux network features, such as multiple routing tables, policy routing, and advanced traffic control. routel
likely appeared as a convenience, particularly in some distributions or custom environments, to provide a concise way to list routes, similar to how route -n
was historically used, but leveraging the more powerful and flexible ip route show
functionality.