CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

On a Cisco router running Cisco IOS or Cisco IOS XE, the primary command used to display the active routing table is show ip route. This command queries the router’s Routing Information Base (RIB) and prints every directly connected network, static route, and dynamically learned path currently active in the control plane.

Whether validating connectivity across subnets, auditing route advertisements from dynamic protocols like OSPF and BGP, or diagnosing reachability issues, show ip route serves as the primary diagnostic tool in Cisco networking.


Running the show ip route Command on Cisco IOS

To display the IPv4 routing table, execute the command from the privileged EXEC prompt. Follow these sequential steps to retrieve and inspect the table properly.

Step 1: Enter Privileged EXEC Mode

Log in to your router via console, SSH, or Telnet. If you are in user EXEC mode (indicated by a > prompt), elevate your privileges using the enable command:

Router> enable
Router#

The # symbol indicates that you are in privileged EXEC mode, which provides the administrative access required to view and troubleshoot routing information.

Step 2: Ensure Routing Is Active

On dedicated Cisco routers, IPv4 routing is active by default. However, if you are working on a Layer 3 Cisco Catalyst switch acting as a router, routing must be explicitly enabled globally before any table can form:

Router# configure terminal
Router(config)# ip routing
Router(config)# exit

Step 3: Execute the Base Command

Run the primary command to view the complete IPv4 routing table:

Router# show ip route

Step 4: Review the Initial Output

When executed without arguments, the command displays two main sections:
1. The Route Code Legend: A catalog of letters mapping source protocols (e.g., C for connected, S for static, O for OSPF).
2. The Gateway of Last Resort: Indicates the default route and next-hop address.
3. The Route Entries: The list of subnets and networks known to the device.

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.10.0/24 is directly connected, GigabitEthernet0/0
L        10.1.10.1/32 is directly connected, GigabitEthernet0/0
O     172.16.0.0/16 [110/2] via 192.168.1.2, 00:14:22, GigabitEthernet0/1
S*    0.0.0.0/0 [1/0] via 192.168.1.1

Deciphering the Routing Table: Codes, Administrative Distance, and Metrics

Understanding how to read each segment of a routing table entry enables you to determine how traffic flows through your network. Each line inside the routing table adheres to a standardized syntax.

Consider this standard OSPF route entry:

O    172.16.20.0/24 [110/20] via 10.1.1.2, 02:45:11, GigabitEthernet0/1

Follow this breakdown to interpret each component from left to right:

1. Protocol Source Code (O)

The initial character identifies how the router learned the route. Common protocol designators include:
– L (Local): A /32 host route representing the router’s own interface IP address, allowing the router to efficiently process packets destined for itself.
– C (Connected): A subnet directly attached to an active, operational interface.
– S (Static): A route manually configured by an administrator using the ip route command.
– D (EIGRP): A route learned through the Enhanced Interior Gateway Routing Protocol.
– O (OSPF): A route learned via the Open Shortest Path First protocol.
– B (BGP): A route learned through Border Gateway Protocol.
– * (Candidate Default): Flags a path eligible to serve as the default route (e.g., S*).

2. Destination Prefix and Subnet Mask (172.16.20.0/24)

The target network and its prefix length using CIDR notation. When forwarding a packet, Cisco IOS compares the destination IP against this field using the longest prefix match rule.

3. Administrative Distance (110)

The first value inside the brackets [110/20] is the Administrative Distance (AD). AD defines the trustworthiness of the route source. Lower numbers indicate higher trust. Standard default values include:
– Connected: 0
– Static: 1
– EIGRP internal: 90
– OSPF: 110
– IS-IS: 115
– RIP: 120
– External BGP (eBGP): 20
– Internal BGP (iBGP): 200

4. Metric (20)

The second value inside the brackets [110/20] represents the routing metric calculated by the source protocol. OSPF calculates this as cumulative cost based on bandwidth, EIGRP uses composite metrics (bandwidth and delay), and RIP tracks hop count.

5. Next-Hop Address (via 10.1.1.2)

The IP address of the neighboring router interface to which packets matching this subnet must be forwarded. For directly connected networks (C), this field shows is directly connected.

6. Route Uptime (02:45:11)

The length of time in hours, minutes, and seconds that this specific route has been present in the RIB without changes.

7. Outbound Egress Interface (GigabitEthernet0/1)

The physical or logical interface through which matching packets exit the router.


Filtering the Routing Table by Protocol, Prefix, and CLI Modifiers

In enterprise networks containing thousands of prefixes, running show ip route without filters can overwhelm terminal sessions. You can target specific protocols, query individual IP addresses, or apply CLI pipe filters.

! ==============================================================================
! TEMPLATE 1: FILTER BY ROUTING PROTOCOL
! ==============================================================================
Router# show ip route [protocol]

! Examples:
Router# show ip route ospf
Router# show ip route static
Router# show ip route bgp
Router# show ip route eigrp
Router# show ip route connected

! ==============================================================================
! TEMPLATE 2: QUERY A SPECIFIC IP ADDRESS OR SUBNET
! ==============================================================================
Router# show ip route <destination-ip> [subnet-mask]

! Exact address evaluation (finds the best matching route for a target destination):
Router# show ip route 192.168.10.45

! Specific subnet prefix evaluation:
Router# show ip route 10.10.0.0 255.255.0.0

! Include subnets that fall inside a larger network:
Router# show ip route <network-prefix> <subnet-mask> longer-prefixes
Router# show ip route 10.0.0.0 255.0.0.0 longer-prefixes

! ==============================================================================
! TEMPLATE 3: DISPLAY ROUTING TABLE SUMMARIES
! ==============================================================================
Router# show ip route summary
Router# show ip route supernets-only

! ==============================================================================
! TEMPLATE 4: CLI PIPE FILTERS (REGULAR EXPRESSIONS & OUTPUT CONDITIONING)
! ==============================================================================
! Filter lines containing a specific keyword:
Router# show ip route | include <keyword>
Router# show ip route | include GigabitEthernet0/0
Router# show ip route | include 192.168.

! Start display at a specific section or network:
Router# show ip route | begin Gateway
Router# show ip route | begin 172.16.0.0

! Filter out specific unwanted patterns:
Router# show ip route | exclude L        

Frequently Asked Questions: Inspecting IPv6 Routing Tables

What command displays the IPv6 routing table on a Cisco router?

The command to display IPv6 routes on a Cisco router is show ipv6 route.

Cisco IOS maintains distinct Routing Information Bases (RIB) for IPv4 and IPv6. As a result, running show ip route only exposes IPv4 entries; it will never display IPv6 unicast paths.

Router# show ipv6 route

What does the show ipv6 route output look like?

The layout mirrors the IPv4 routing table, listing routing codes, global destination prefixes, administrative distance, metric, and link-local or global next-hop addresses:

Router# show ipv6 route
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - User
       B - BGP, R - RIP, I1 - ISIS L1, I2 - ISIS L2
       O - OSPF, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2

C   2001:DB8:1::/64 [0/0]
     via GigabitEthernet0/0, directly connected
L   2001:DB8:1::1/128 [0/0]
     via GigabitEthernet0/0, receive
O   2001:DB8:2::/64 [110/2]
     via FE80::21A:A2FF:FE34:5678, GigabitEthernet0/0
S   ::/0 [1/0]
     via 2001:DB8:1::254

Can you filter IPv6 routing entries like IPv4?

Yes. You can isolate specific IPv6 protocols and address blocks using analogous syntax:

Router# show ipv6 route ospf
Router# show ipv6 route static
Router# show ipv6 route 2001:db8:2::/64
Router# show ipv6 route summary

Troubleshooting Guide: Why a Configured Route Is Missing from the Table

When a configured static route or dynamic protocol prefix fails to populate in the routing table output, systematic troubleshooting across the following validation steps will isolate the issue.

Step 1: Check Physical and Line Protocol Status

A route will not enter the RIB if its associated egress interface is down.
– Run show ip interface brief to check the Status and Protocol columns.
– Both columns must display up/up. If an interface is down/down or administratively down, any connected route or static route bound to that interface will be suppressed from the table.

Router# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.1.1.1        YES manual up                    up      
GigabitEthernet0/1     unassigned      YES unset  administratively down down    

Step 2: Validate Next-Hop IP Reachability

For static routes configured with a next-hop IP (e.g., ip route 10.20.0.0 255.255.255.0 192.168.1.5), Cisco IOS verifies that the next-hop address itself can be resolved via an existing route in the RIB.
– If the router cannot find a valid path to reach 192.168.1.5, it drops the static route as unresolvable.
– Test reachability by pinging the next-hop IP: ping 192.168.1.5.

Step 3: Verify Dynamic Protocol Adjacencies

If an OSPF, EIGRP, or BGP route is missing:
– Verify neighbor status:
text
Router# show ip ospf neighbor
Router# show ip eigrp neighbors
Router# show ip bgp summary

– If the neighbor state is not established (such as FULL for OSPF or established state for BGP), the router cannot exchange prefixes, and routes will not be injected into the RIB.

Step 4: Check for Route Filtering and Distribution Lists

Inbound routing updates may be filtered before they can enter the routing table.
– Inspect the active configuration for inbound distribute-list, route-map, or prefix-list statements attached to your routing processes:
text
Router# show run | section router

– If an access list or prefix list denies the prefix, it will be omitted from the table even if the neighboring router advertises it.

Step 5: Check Administrative Distance Conflicts

If two routing sources offer the exact same destination prefix, Cisco IOS installs only the route with the lower Administrative Distance, as detailed in the route interpretation section above.
– If an OSPF process (AD 110) advertises 10.5.0.0/24, but a static route (AD 1) exists for the same subnet, the OSPF route will be kept out of the RIB.
– Use show ip route <prefix> to evaluate all available candidate sources.


Cisco IOS Command Specifications and Reference Details

The following reference details outline the formal command syntax, operational modes, and implementation guidelines according to Cisco technical documentation.

Command Syntax

show ip route [vrf vrf-name] [protocol [as-number]] [ip-address [mask] [longer-prefixes]] [summary] [supernets-only] [traffic-engineering]

Parameter Descriptions

ParameterTypeDescription
vrf vrf-nameOptionalDisplays the routing table associated with a specified Virtual Routing and Forwarding (VRF) instance.
protocolOptionalLimits output to routes derived from a specific routing protocol (bgp, eigrp, ospf, rip, isis, static, connected, local).
as-numberOptionalAutonomous system number; filters EIGRP or BGP route output to a specific AS.
ip-address [mask]OptionalQueries the table for a specific host address or subnet; evaluates longest prefix match.
longer-prefixesOptionalDisplays subnets that fall inside the specified network prefix.
summaryOptionalDisplays aggregate route counts, memory consumption, and totals per routing source.
supernets-onlyOptionalRestricts output strictly to supernet/classless summarization entries.

Command Modes

  • User EXEC Mode (Router>)
  • Privileged EXEC Mode (Router#)

Note: While available in user EXEC mode on older IOS versions, privileged EXEC mode is recommended to access full parameters, VRF scopes, and detailed metric counters.

Release History

Cisco IOS / IOS XE ReleaseModification Details
Cisco IOS 10.0Command introduced in base releases for standard IPv4 RIB queries.
Cisco IOS 12.0(5)TAdded support for the vrf vrf-name parameter to support Multi-VRF and MPLS VPN architectures.
Cisco IOS 12.2(8)TIntroduced the longer-prefixes keyword for flexible subnet analysis.
Cisco IOS XE 16.1.1Standardized unified CLI behavior across enterprise routing platforms (ASR 1000, ISR 4000, Catalyst 9000 Series).

Usage Guidelines

The show ip route command reports the control plane’s best paths collected in the RIB. It does not reflect hardware forwarding tables directly. Cisco devices deploy Cisco Express Forwarding (CEF), which compiles the active routes from show ip route into the Forwarding Information Base (FIB) and adjacency tables. To inspect hardware-level switching paths programmed onto the data plane, use show ip cef.


The show ip route command remains the definitive starting point for inspecting and verifying network paths on Cisco equipment. By combining the base command with protocol filters, address queries, and output modifiers, you can isolate routing anomalies, verify failover paths, and ensure your router correctly directs traffic across the enterprise. For modern dual-stack environments, pairing this command with show ipv6 route gives you complete visibility across all operational layers of your network.

Please follow and like us:
Last modified: October 31, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.