When your router receives a packet for a remote network, it has to decide which path the packet should take. Without a routing table, your router doesn’t know where to send it, and the packet cannot reach its destination.

Figure 1 – Packet entering R1, routing table needed for decision
To solve this problem, every router is equipped with a routing table. This table is essential because it tells your router which path a packet should take to reach its destination. The process of choosing this path is called a routing decision, and it gives your router the ability to forward packets instead of staying blocked.
Answer the question below
Each router has its own routing table. In this table, your router lists the IP networks (Layer 3) it knows and the paths packets should follow to reach them. (See also our OSI Model lesson for a reminder of the layers.)

Figure 2 – Router must use its routing table to forward the packet
You can think of it like road signs on a highway. Just like signs guide you to the right exit to reach your destination, the routing table guides packets step by step until they arrive where they need to go.
Answer the question below
What does a router use to know reachable networks?
Routers can learn routes in different ways:
Connected routes: these are created automatically when one of the router’s interfaces is up and has an IP address.
Static routes: these are added manually by the administrator.
Dynamic routes: these are learned from other routers using routing protocols like OSPF, RIP, or EIGRP.
Default route: this is a special route used when no other entry matches, usually pointing to the Internet.

Figure 3 – A routing table can include connected, static, dynamic, and default routes
Sometimes the same network is learned from more than one source. In that case, your router will choose only one route to keep in its routing table.
Answer the question below
Which special route is used when no entry matches?
Once your router has learned routes, it stores them in the routing table.
On Cisco IOS, you can use the commandshow ip routeto display the table.
Figure 4 – Example of connected, static, dynamic, and default routes in Cisco IOS
At the top of the output, you’ll see a legend with codes. These codes tell you how each route was learned. For CCNA, you mainly need to focus on the following:
Code
Type of Route
Example
Meaning
C (orange)
Connected route
192.168.1.0/24 is directly connected, GigabitEthernet0/0
Your router knows this network because one of its interfaces belongs to it.
S (blue)
Static route
192.168.20.0/24 [1/0] via 10.0.0.254
This route was configured manually by the administrator.
O (green)
OSPF route
192.168.3.0/24 [110/2] via 10.0.0.2, GigabitEthernet0/1
This network was learned dynamically using the OSPF protocol.
S* (red)
Default route
0.0.0.0/0 [1/0] via 195.238.2.22
This is the route your router uses when no other entry matches, usually to reach the Internet.
Table 1 – Route Codes in Cisco IOS
When you look at the routing table, each line corresponds to a destination network, with a code that shows you where the route comes from.
40 % Complete: you’re making great progress
Unlock the rest of this lesson
If you’d like to continue your CCNA journey, simply create your free account.
Access all CCNA lessons
Practice with hands-on labs
Train with Practice exams and Quizzes
Progress tracking in your dashboard
Made by network engineers - CCNP certified
learners globally
Routing Table
A routing table is one of the most important elements inside a router. In this lesson you will learn how it works, what it contains, and why it is essential for packet forwarding.