Components of the routing table
To further understand how routers make their decisions when it comes to forwarding packets between networks, it's important to understand each component of the routing table within a Cisco IOS router. In this section, we will cover all the essential components that are part of the routing table, including:
- Routing protocol codes
- Prefix
- Network mask
- Next hop
- Administrative distance (AD)
- Metric
- Gateway of last resort
Let's start with routing protocol codes.
Routing protocol codes
When you execute the show ip route
command on a Cisco router, the very first thing you will see is a concise list of codes. These codes are formally referred to as routing protocol codes. Each code is used to help you identify how a route has been learned and added to the routing table.
The following snippet shows the routing protocol codes of a Cisco IOS router: