ย Routing protocol code

๐Ÿ“˜ 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:

ComponentDescription
Routing Protocol CodeIndicates how the router learned about the route (e.g., directly connected, static, OSPF, EIGRP, etc.).
Destination NetworkThe 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.
MetricA value used by the routing protocol to show how โ€œgoodโ€ or โ€œcostlyโ€ a route is (smaller metric = better route).
Next-hop IP addressThe IP address of the next router the packet must go through to reach the destination network.
Outgoing InterfaceThe routerโ€™s interface used to send the packet (e.g., GigabitEthernet0/0).
Route TimerHow 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

CodeMeaningDescription
CConnectedThe network is directly connected to one of the routerโ€™s interfaces. This is automatically added when you configure an IP address on an interface.
LLocalThe IP address assigned directly to the routerโ€™s interface (host route). Used for communication to the routerโ€™s own interface IP.
SStaticManually added route by the network administrator using the ip route command.
RRIPRoute learned through the Routing Information Protocol (RIP). A distance-vector protocol using hop count as its metric.
OOSPFRoute learned through the Open Shortest Path First (OSPF) protocol. A link-state protocol using cost as its metric.
DEIGRPRoute learned through Enhanced Interior Gateway Routing Protocol (EIGRP), a Cisco proprietary protocol using composite metrics.
EXEIGRP ExternalEIGRP route that was learned from a different routing domain (external source).
BBGPRoute 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 IndicatorShows that a route is a candidate for default route (used to forward all unknown destinations).

Additional (Less Common) Codes

You may also see:

CodeMeaningDescription
MMobileUsed for mobile routing (rare in modern networks).
iIS-ISRoute learned from Intermediate System-to-Intermediate System (IS-IS) protocol.
aApplicationRoute learned via an application (like policy-based routing).
O IAOSPF Inter-AreaRoute learned from another OSPF area (not the same area as the router).
O E1 / O E2OSPF ExternalRoute learned from outside OSPF domain (like from static or BGP routes redistributed into OSPF).
N1 / N2OSPF NSSARoutes learned from Not-So-Stubby Areas in OSPF.
D EXEIGRP ExternalExternal 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

  1. Know the meaning of each routing code (C, L, S, R, D, O, B).
  2. Understand how routes appear in the routing table and what each field represents.
  3. Be able to read and interpret the show ip route output.
  4. 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 TypeCodeADHow Added
ConnectedC0Automatic
LocalL0Automatic
StaticS1Manual
EIGRPD90Dynamic
OSPFO110Dynamic
RIPR120Dynamic
BGP (External)B20Dynamic
BGP (Internal)B200Dynamic

โœ… 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.


Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee