The show ip route Command Explained
Routers use the routing table entries to make forwarding decisions. The show ip route command displays routing table entries. This tutorial explains how to interpret the output of this command, how the routing table organizes information, and how to analyze its contents effectively.
Using the show ip route command
The show ip route command reveals the structure and details of the routing table. You can use this command for the following purposes:
- To list the routing table's entries
- To view how many routes are available for a particular destination
- To view the route the router uses to forward data packets for a specific destination
- To know the routes added by a routing protocol
- To know the routes added by the router from the IP configurations
- To view the current status of a route
- To verify and troubleshoot the routing
Understanding the output of the show ip route command
The show ip route command is a Privilege Exec mode command. The output of this command is divided into three main sections: Codes, Default Route, and Routes.
Router>enable Router#show ip route

Codes
The routing table uses an abbreviated code to store the route type. This section displays the meaning of each abbreviated code.
Default route
This section shows the default route. When a router receives a data packet on its interface, it compares the packet’s destination address with all routing table entries. If it finds a match, it uses that entry to forward the packet. If not, it checks the default route. If a default route is present, it forwards the packet using it. If not, it discards the packet.
Routes
This section lists all routes. It organizes routes in blocks. Each block represents a classful network and its associated classless subnets. If a classful network has been subdivided and the router has learned routes for its subnets, it uses a heading to group all related routes. A heading appears only when multiple routes exist for a given classful network. If there is just one route, it is added without a heading.

The heading includes three things: the classful network, the total number of subnets, and the total number of masks used to create the subnets.
The classful network
The routing table groups routes by classful network. When a classful network is subnetted into classless networks and those routes are present, the router treats all these subnets as part of the original classful network.
Total number of subnets
Routers learn routes from multiple sources. This section displays the total number of routes learned for each classful network, including all its classless subnets. When you assign an IP address to an interface, the router automatically creates two routes: one for the network address and one for the interface itself (using a /32 prefix). The first is used to forward data packets, while the second allows the router to reach the interface directly.

Total number of masks
This section represents the total number of unique subnet masks used across all routes and subnets associated with the classful network. The routing table uses a heading to organize all routes created from the same classful network.
Legend code
The legend code appears first in each route entry and identifies the source from which the route was learned. These codes are abbreviated. The first section of the show ip route output explains the meaning of these codes.

Network address / Subnet mask
Each route entry corresponds to a specific destination network. After the legend code, the destination network address and subnet mask are listed.

Routers use their routing tables to determine where to forward data packets. If a destination address matches a network address in the table, the router forwards the packet via the specified interface or to the next-hop router.
AD(Administrative Distance)/Metric

The routing table keeps only the best route for each destination. If a router learns multiple routes for the same destination from different sources, it uses their AD (Administrative Distance) to compare and select the most reliable route. The AD value represents the trustworthiness of a route source. Lower values indicate higher reliability. For example, a router learned two routes for the same destination. The AD value of the first source is 10, and the AD value of the second source is 20. The router will add the route learned from the first source to the routing table.
A router can also learn more than one route from the same source. If the router learns more than one route to a destination from the same source, it uses the route metrics to select the best route. Sources use the metric value to calculate the best route for the destination.

In summary, routers use the AD value to select the best route among different sources, and the metric value to choose the best route among those learned from the same source.
The IP address of the next-hop router
This section shows the IP address of the next-hop router. A router forwards the packet to the next-hop router if the packet's destination address matches the route's destination address.

EIGRP/OSPF Timer
EIGRP and OSPF routing protocols use a timer for each learned route. If the route is learned by EIGRP or OSPF, this section shows the timer.

Exit interface
If the routing table entry uses the exit interface to forward the data packets, this section shows it.

Conclusion
The show ip route command is an essential tool for understanding and troubleshooting network routing. It organizes routing data into sections, displays how routes are learned and prioritized, and provides detailed information about default routes, subnetting, and route selection criteria. By mastering this command, you can efficiently analyze the routing table, verify network paths, and ensure effective data forwarding across your network.
Author Laxmi Goswami Updated on 2025-12-27