§ — — Network Administration
Routers connect different IP networks and decide where packets should go next. Routing concepts explain how routers choose paths, build routing tables, and forward packets toward their destinations.
By the end of this module, you should be able to:
A router performs two major tasks:
Routers use routing tables to make these decisions.
When a packet arrives, the router checks the destination IP address and searches the routing table for the best matching route. A route may point to an exit interface, a next-hop IP address, or both.
The best match is not always the route with the smallest network. It is the route with the longest matching prefix.
If multiple routes match a destination, the router chooses the most specific match. A longer prefix length means more network bits match.
Example IPv4 routing entries:
| Route | Prefix Length |
|---|---|
0.0.0.0/0 | least specific default route |
192.168.0.0/16 | broad private network route |
192.168.10.0/24 | more specific LAN route |
192.168.10.50/32 | host route |
For destination 192.168.10.50, the /32 route wins if present. If not, /24 beats /16, and /16 beats /0.
ProReviewer — locked
Drills, code labs, and full solutions.
IPv6 uses the same longest-prefix principle. A route such as 2001:db8:acad:10::/64 is more specific than 2001:db8:acad::/48, and both are more specific than the default route ::/0.
Routes can enter the routing table through several sources:
A route is usable only if its associated interface or next hop is reachable.
A simplified forwarding process is:
Cisco routers have used different forwarding methods over time:
Modern Cisco devices commonly use CEF.
ProReviewer — locked
Drills, code labs, and full solutions.
Routing tables identify how a route was learned. Common codes include:
Exact codes depend on platform and enabled protocols.
When a router interface is configured with an IP address and is up/up, the connected network is installed in the routing table. A local host route for the interface address is often installed as well.
A static route is manually configured by an administrator. Static routes are predictable and efficient, but they do not automatically adapt to topology changes unless additional tracking or floating static routes are used.
Dynamic routing protocols allow routers to exchange route information and adapt to changes. Examples include OSPF, EIGRP, RIP, IS-IS, and BGP. Dynamic routing is useful when networks are larger or change frequently.
A default route is used when no more specific route matches the destination. It is commonly used to send unknown traffic toward an upstream router or internet edge.
IPv4 default route: 0.0.0.0/0
IPv6 default route: ::/0
Administrative distance measures the trustworthiness of a route source. When two routes to the same destination have the same prefix length but different sources, the route with the lower administrative distance is preferred.
For example, a directly connected route is usually preferred over a static route, and a static route is usually preferred over many dynamic routes.
Static routing is useful for:
Dynamic routing is useful for:
Many real networks use both.
Routers choose the best path using routing information such as prefix length, administrative distance, and routing protocol metric. If multiple equal-cost routes exist, the router may load balance traffic across them.
ProReviewer — locked
Drills, code labs, and full solutions.
Routing is the process of choosing paths and forwarding packets between networks. Routers use longest prefix match, route sources, metrics, and administrative distance to decide where traffic should go.
Done with this module? Track it — your progress shows on the subject list.
Up next
IP Static Routing→←Previous: WLAN Configuration