PracticeLabs
Week 4IP Connectivity19 min

Connected and Local Routes and the Routing Table

Learning objectives

  • Explain why a connected (C) route and a local (L) host route appear automatically for each up/up addressed interface
  • Distinguish the C route (the whole subnet) from the L route (the router's own /32 address) and state the job of each
  • Predict the routing-table entries produced by an interface's IP address and mask
  • Explain why an interface that is administratively down or unaddressed contributes no routes
Mission

Address two router interfaces and predict, then verify, the exact C and L routes that appear in show ip route before any static or dynamic route exists.

Week 4 · Lesson 2 · Active ~19 min · No video · Practice ~10 min · Domain: IP Connectivity

You should already know that a router forwards by matching a destination IP to a routing-table entry.

Prerequisites: routing-fundamentals-forwarding-decision

Baseline check

You give a router's Gi0/0 the address 10.1.1.1/24 and bring it up. Before reading on: how many routes does that one command sequence add to the table, and what are they?

Most learners say "one." The answer is two — and knowing why is the whole point of this short lesson.

Connected and local routes are the routing table's baseline — the entries a router creates for itself before you configure a single route. The previous lesson said routes come from three sources; connected routes are the first, and they cost nothing but an IP address and an up interface.

When an interface is up/up (administratively enabled and line protocol up) and has an IPv4 address, IOS automatically installs two routes derived from that address and mask:

  • A connected route, coded C — the whole subnet the interface belongs to, pointing out that interface. Give Gi0/0 the address 10.1.1.1/24 and you get C 10.1.1.0/24 is directly connected, GigabitEthernet0/0. This is how the router forwards to every host on that LAN: the destination is directly attached, so the router ARPs for it and sends the frame straight out Gi0/0 with no next-hop router.
  • A local route, coded L — the router's own interface address as a /32 host route, also pointing out that interface: L 10.1.1.1/32 is directly connected, GigabitEthernet0/0. Its job is different: it lets the router recognize packets addressed to itself (pings to its interface, management traffic, routing-protocol packets) and hand them to its own control plane instead of trying to forward them onward.

So one addressed, up interface yields exactly two entries: the subnet (C) and the interface's own address (L). The C route is about reaching others on the wire; the L route is about recognizing itself. Neither uses the ip route command — that command is only for static routes, next lesson. Addressing the interface and issuing no shutdown is the entire "configuration."

Info

The /32 on the local route is not a typo and not tied to the interface mask. A host route is a route to a single address, and the router's own interface IP is exactly one address — so it is always a /32 (in IPv6, a /128), whatever the subnet mask on the interface.

No up interface, no route. Because these routes are derived from live interfaces, they vanish the moment the interface stops being up/up. Shut the interface (shutdown), pull the cable so the line protocol drops, or remove the IP address, and both the C and the L route are silently withdrawn from the table. This matters more than it looks: a static route that recurses through a connected next hop, or that names that interface as its exit, also disappears when the underlying connected route goes away. Connected routes are the ground the rest of the table stands on.

Address one interface and watch two routes appear

R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface GigabitEthernet0/1
R1(config-if)# ip address 10.1.2.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# end

R1# show ip route
Codes: C - connected, L - local, S - static, O - OSPF

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.1.1.0/24 is directly connected, GigabitEthernet0/0
L        10.1.1.1/32 is directly connected, GigabitEthernet0/0
C        10.1.2.0/30 is directly connected, GigabitEthernet0/1
L        10.1.2.1/32 is directly connected, GigabitEthernet0/1

Two interfaces, four routes — a C/L pair each. Read them against the interface config:

  • Gi0/0 with 10.1.1.1/24 → C 10.1.1.0/24 (subnet) and L 10.1.1.1/32 (own address).
  • Gi0/1 with 10.1.2.1/30 → C 10.1.2.0/30 (subnet) and L 10.1.2.1/32 (own address).

The header line — variably subnetted, 4 subnets, 2 masks — simply reports that this 10.0.0.0/8 space now holds prefixes of two different lengths (/24 and /30, plus the /32 locals).

Verify with two quick commands. show ip route connected filters to just the C entries, and show ip interface brief confirms which interfaces are actually up/up:

R1# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.1.1.1        YES manual up                    up
GigabitEthernet0/1     10.1.2.1        YES manual up                    up
GigabitEthernet0/2     unassigned      YES unset  administratively down down

Gi0/2 is unassigned and administratively down — so it contributes no routes, which is exactly why the table has entries only for Gi0/0 and Gi0/1.

A router has these three interfaces. Predict every C and L route in the table before revealing.

InterfaceAddress / maskState
Gi0/0172.16.5.1 /24up/up
Gi0/1192.0.2.9 /30up/up
Gi0/210.0.0.1 /24administratively down

Pause and predict

List the connected (C) and local (L) routes this router installs, with prefixes and lengths. State clearly which interface produces nothing and why.

Reveal answer

Gi0/0 (up/up) → C 172.16.5.0/24 + L 172.16.5.1/32. Gi0/1 (up/up) → C 192.0.2.8/30 + L 192.0.2.9/32 (note the subnet is 192.0.2.8/30, not .9). Gi0/2 → nothing: it is administratively down, so despite having an address configured it is not up/up and installs no routes. Total: four entries, two C and two L. The moment someone issues no shutdown on Gi0/2 and the line protocol comes up, C 10.0.0.0/24 and L 10.0.0.1/32 appear.

Confirm your instinct in the Routing Table Trainer — it labels each entry's source, so you can check that you can separate connected/local from static and dynamic at a glance.

Read each generated table and identify which entries are connected/local versus configured or learned.

Open routing-table

Quick check (3 items) · retrieve

Answer from memory:

  1. Addressing one up/up interface with a /24 adds how many routes, and what are their codes and prefix lengths?
  2. What is the job of the L route versus the C route?
  3. An interface has an IP address but is administratively down. What does it contribute to the routing table?
Open quiz

Review sheet

  • One up/up addressed interface → two routes: C for the subnet, L for the router's own /32 address.
  • C reaches others on the directly connected wire; L recognizes traffic to the router itself.
  • No ip route needed — addressing plus no shutdown creates both automatically.
  • The L route is always a /32 (own address), independent of the interface mask.
  • Down/unaddressed interface → no routes, and its loss withdraws any static route that depended on it.
  • show ip route connected isolates the C entries; show ip interface brief confirms up/up state.
Exam trap
A connected route is not configured and not permanent — it exists only while the interface is up/up. If a C route is "missing," check the interface status before touching routing configuration.

Connected routes cover attached subnets; now configure static routes to reach the networks that are one or more hops away.

Next: IPv4 Static Routes