Finding an IP Route

Problem

You want to find a particular route in your router’s routing tables.

Solution

The EXEC level command to look at the entire IP routing table is:

Router>show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route, o - ODR

Gateway of last resort is 172.25.1.1 to network 0.0.0.0

     192.168.17.0/27 is subnetted, 1 subnets
C       192.168.17.0 is directly connected, Loopback1
     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Async1
     172.25.0.0/16 is variably subnetted, 6 subnets, 3 masks
C       172.25.25.0/30 is directly connected, Tunnel0
C       172.25.1.0/24 is directly connected, Ethernet0
C       172.25.9.0/24 is directly connected, Ethernet1
C       172.25.10.1/32 is directly connected, Loopback0
O       172.25.100.1/32 [110/11] via 172.25.9.2, 4d09h, Ethernet1
O IA    172.25.100.0/24 [110/11] via 172.25.1.1, 2d11h, Ethernet0
     192.168.1.0/32 is subnetted, 1 subnets
S       192.168.1.1 [1/0] via 172.25.1.4
O*E1 0.0.0.0/0 [110/11] via 172.25.1.1, 1d07h, Ethernet0

You can also find the route to a particular device, such as 172.25.100.15:

Router>show ip route 172.25.100.15 Routing entry for 172.25.100.0/24 Known via "ospf 55", distance 110, metric 11, type inter area Redistributing ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.