Viewing a Router's Routing Table - dummies

By Edward Tetz

Debugging problems with your router may require that you review the contents of the routing table. To view the routing table on your router, you connect to the command-line interface and type the following commands:

Router2#show ip route
Codes: 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
Gateway of last resort is to network
C is directly connected, FastEthernet0/1
C is directly connected, FastEthernet0/0 is variably subnetted, 2 subnets, 2 masks
S [1/0] via
S [1/0] via
S* [1/0] via

Note that the routing table output includes a list of all known routes and the routing protocol that those routes were learned from. In this case, two networks are directly connected (C) to the routers’ interfaces: and Directly connected interfaces are always added to the routing table. Because the router is directly connected to those networks, the router knows that data can be sent to them.

In addition to these directly connected networks are three static (“S”) or manually typed routes, one for a network (, one for an IP host (, and one for everything else ( The last route is the default gateway or gateway of last resort, which means that if a better route is not found, this route is chosen.

After you connect your router in a single router network, if you need to route only to directly connected networks, you do not have to worry about setting up static routes or enabling a routing protocol.

In the preceding routing table, you have routes to all systems on the and networks. For data going to either of these networks, you use the appropriate router interface, FastEthernet0/0 or FastEthernet0/1. If you have data for a system on the network, you send that data on to the next router, which is found at

Bear in mind that this next router must be on a network to which you are directly connected. There is one routing table entry for the network, but there is also the exception for the address of The host has a special route and the router passes the data to the router, rather than to the normal router for that network (

You might use a special route such as this one if, for example, you want to use different security settings that make it easier (or harder) to communicate with system; or, perhaps the physical links going from that router may be faster (or slower), and based on the role of, using links with specific speed settings makes more sense.

The point is that you tailor your routing table to pass data for sections of the same network over different paths, and the router always chooses the route based on the route that most closely matches the destination address.