๐ CCNA 200-301 v1.1
3.1 Interpret the Components of a Routing Table
3.1.a Routing protocol code
What is a Routing Table?
A routing table is a list of routes (paths) that a router uses to determine where to send network packets.
When a router receives a packet, it checks the destination IP address in that packet and compares it to the entries in its routing table to decide:
- Which network the destination belongs to.
- Which interface or next-hop IP address to forward it to.
Every router has its own routing table โ this table is stored in the routerโs memory (RAM).
Purpose of the Routing Table
- To tell the router how to reach different networks.
- To decide the best path when there are multiple possible routes.
- To update automatically when new routes are learned from dynamic routing protocols (like OSPF, EIGRP, RIP).
How to View the Routing Table
In Cisco IOS, the routing table is viewed with:
Router# show ip route
Routing Table Format (Output Example)
Hereโs a sample output:
Router# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, i - IS-IS
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
S 10.10.10.0/24 [1/0] via 192.168.1.2
O 172.16.0.0/16 [110/2] via 10.10.10.2, 00:00:12, GigabitEthernet0/1
Understanding the Components of the Routing Table
Each line (route) in the routing table contains several parts:
| Component | Description |
|---|---|
| Routing Protocol Code | Indicates how the router learned about the route (e.g., directly connected, static, OSPF, EIGRP, etc.). |
| Destination Network | The network address and subnet mask (e.g., 192.168.1.0/24). Shows which network can be reached. |
| Administrative Distance (AD) | A number that shows how โtrustworthyโ the source of the route is. Lower number = more preferred. |
| Metric | A value used by the routing protocol to show how โgoodโ or โcostlyโ a route is (smaller metric = better route). |
| Next-hop IP address | The IP address of the next router the packet must go through to reach the destination network. |
| Outgoing Interface | The routerโs interface used to send the packet (e.g., GigabitEthernet0/0). |
| Route Timer | How long ago the route was learned or updated (for dynamic routes). |
3.1.a Routing Protocol Code
Now letโs focus on the Routing Protocol Code, which is the first letter or symbol in each routing table entry.
It tells you where the route came from โ meaning how the router learned that route.
Common Routing Protocol Codes
| Code | Meaning | Description |
|---|---|---|
| C | Connected | The network is directly connected to one of the routerโs interfaces. This is automatically added when you configure an IP address on an interface. |
| L | Local | The IP address assigned directly to the routerโs interface (host route). Used for communication to the routerโs own interface IP. |
| S | Static | Manually added route by the network administrator using the ip route command. |
| R | RIP | Route learned through the Routing Information Protocol (RIP). A distance-vector protocol using hop count as its metric. |
| O | OSPF | Route learned through the Open Shortest Path First (OSPF) protocol. A link-state protocol using cost as its metric. |
| D | EIGRP | Route learned through Enhanced Interior Gateway Routing Protocol (EIGRP), a Cisco proprietary protocol using composite metrics. |
| EX | EIGRP External | EIGRP route that was learned from a different routing domain (external source). |
| B | BGP | Route learned through Border Gateway Protocol (BGP), used between Internet Service Providers or large networks. |
| S* | Static (Candidate Default) | A static route that also acts as a default route (used when no other match is found). |
| ***** | Default Route Indicator | Shows that a route is a candidate for default route (used to forward all unknown destinations). |
Additional (Less Common) Codes
You may also see:
| Code | Meaning | Description |
|---|---|---|
| M | Mobile | Used for mobile routing (rare in modern networks). |
| i | IS-IS | Route learned from Intermediate System-to-Intermediate System (IS-IS) protocol. |
| a | Application | Route learned via an application (like policy-based routing). |
| O IA | OSPF Inter-Area | Route learned from another OSPF area (not the same area as the router). |
| O E1 / O E2 | OSPF External | Route learned from outside OSPF domain (like from static or BGP routes redistributed into OSPF). |
| N1 / N2 | OSPF NSSA | Routes learned from Not-So-Stubby Areas in OSPF. |
| D EX | EIGRP External | External route redistributed into EIGRP from another source. |
Example Explanation
Letโs analyze one line:
O 172.16.0.0/16 [110/2] via 10.10.10.2, 00:00:12, GigabitEthernet0/1
- O โ Learned via OSPF (Routing Protocol Code)
- 172.16.0.0/16 โ Destination network
- [110/2] โ Administrative Distance = 110, Metric = 2
- via 10.10.10.2 โ Next-hop IP (neighbor router)
- 00:00:12 โ Last updated 12 seconds ago
- GigabitEthernet0/1 โ Outgoing interface
Key Points for CCNA Exam
- Know the meaning of each routing code (C, L, S, R, D, O, B).
- Understand how routes appear in the routing table and what each field represents.
- Be able to read and interpret the
show ip routeoutput. - Remember:
- Directly connected routes have the highest priority (AD = 0).
- Static routes (AD = 1) are more preferred than dynamic routing protocols.
- Dynamic routing protocols like EIGRP (AD = 90), OSPF (AD = 110), RIP (AD = 120) have increasing AD values.
Quick Summary Table
| Route Type | Code | AD | How Added |
|---|---|---|---|
| Connected | C | 0 | Automatic |
| Local | L | 0 | Automatic |
| Static | S | 1 | Manual |
| EIGRP | D | 90 | Dynamic |
| OSPF | O | 110 | Dynamic |
| RIP | R | 120 | Dynamic |
| BGP (External) | B | 20 | Dynamic |
| BGP (Internal) | B | 200 | Dynamic |
โ
In summary:
The routing protocol code is the first and most important clue in a routing table entry โ it tells you where the route came from.
Understanding these codes allows you to quickly interpret the routing table and troubleshoot routing problems โ a key skill tested in the CCNA 200-301 exam.
