On a Cisco IOS router, the show ip route command can be used to display the IPv4 routing table of a router. A router provides additional route information, including how the route was learned, how long the route has been in the table, and which specific interface to use to get to a predefined destination.
Entries in the routing table can be added as:
- Local Route interfaces - Added when an interface is configured and active. This entry is only displayed in IOS 15 or newer for IPv4 routes and all IOS releases for IPv6 routes.
- Directly connected interfaces - Added to the routing table when an interface is configured and active.
- Static routes - Added when a route is manually configured and the exit interface is active.
- Dynamic routing protocol - Added when routing protocols that dynamically learn about the network, such as EIGRP or OSPF, are implemented and networks are identified.
The sources of the routing table entries are identified by a code. The code identifies how the route was learned. For instance, common codes include:
- L - Identifies the address assigned to a router’s interface. This allows the router to efficiently determine when it receives a packet for the interface instead of being forwarded.
- C - Identifies a directly connected network.
- S - Identifies a static route created to reach a specific network.
- D - Identifies a dynamically learned network from another router using EIGRP.
- O - Identifies a dynamically learned network from another router using the OSPF routing protocol.
Note: Other codes are beyond the scope of this chapter.
The figure shows the routing table of R1 in a simple network.