PracticeLabs
Week 4Lesson 2Required19 min estimated0% progress

Connected and Local Routes

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.

Lesson orientation

What you'll learn (4 objectives)~19 min: video → lesson → check → apply → lab prep

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) 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

Terms you will see

Connected route (C)Local route (L)Host routeup/upLine protocolVariably subnetted

Time breakdown

  • Read the notes9 min
  • Routing Table Trainer6 min
  • Predict the table4 min

One interface, two routes

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 interface that is up.

When an interface is up/up — administratively enabled and with its line protocol up — and has an IPv4 address, IOS automatically installs two routes derived from that address and mask. Most learners guess one. Knowing why it is two is the whole point of this short lesson.

What Gi0/0 with 10.1.1.1/24 produces
CodeEntryWhat it is for
C10.1.1.0/24 is directly connected, Gi0/0The whole subnet. This is how the router reaches every host on that LAN — the destination is directly attached, so it ARPs for the host and sends the frame straight out Gi0/0 with no next-hop router.
L10.1.1.1/32 is directly connected, Gi0/0The router's own interface address as a host route. It lets the router recognise packets addressed to itself — pings to its interface, management traffic, routing-protocol packets — and hand them to its own control plane instead of forwarding them onward.
The /32 is not a typo
The local route's length has nothing to do with 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, or a /128 in IPv6, whatever mask the interface carries. Give an interface a /30 and you still get an L route with a /32.

Neither entry uses the ip route command; that is only for static routes, which are the next lesson. Addressing the interface and issuing no shutdown is the entire configuration. The C route is about reaching others on the wire; the L route is about recognising itself.

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, pull the cable so the line protocol drops, or remove the IP address, and both the C and the L route are silently withdrawn.

Why this matters more than it looks
Connected routes are the ground the rest of the table stands on. 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. Lesson 3 shows exactly that failure — and it is why a missing route is so often an interface problem rather than a routing problem.

Address two interfaces and watch four routes appear

Configuration, then the resulting table
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, 3 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 and L pair each. Read them against the configuration: Gi0/0 with 10.1.1.1/24 gives the subnet 10.1.1.0/24 and the own-address 10.1.1.1/32; Gi0/1 with 10.1.2.1/30 gives 10.1.2.0/30 and 10.1.2.1/32.

Reading the header line
The line variably subnetted, 4 subnets, 3 masks reports that this 10.0.0.0/8 space now holds four entries using three different prefix lengths — /24, /30 and /32. Count the distinct lengths in the list to check yourself: the two /32 locals count once between them. If the header and your count disagree, you have miscounted the masks, not found a bug.
Confirm which interfaces are actually contributing
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 nothing — which is exactly why the table has entries only for Gi0/0 and Gi0/1. show ip route connected filters to just the C entries when you want to audit them alone.

What you should retain

  • One up/up addressed interface produces two routes: C for the subnet, L for the router's own address.
  • The C route reaches others on the directly connected wire; the L route recognises traffic to the router itself.
  • No ip route command is involved — addressing plus no shutdown creates both automatically.
  • The L route is always a /32, independent of the interface mask.
  • A down or unaddressed interface contributes 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.
Pause and predictNot scored — nothing is recorded

Before you read on

A router has Gi0/0 at 172.16.5.1/24 up/up, Gi0/1 at 192.0.2.9/30 up/up, and Gi0/2 at 10.0.0.1/24 administratively down. List every C and L route it installs, with prefixes and lengths, and say which interface produces nothing and why.

Interactive tool
Required~6 min

Routing Table Trainer

Read each generated table and identify which entries are connected or local versus configured or learned. Separating the automatic entries from the ones somebody chose is the first thing you do when you open an unfamiliar router's table.

Section quiz

Check this section before moving on

Required8 questions~10 min

Routing Table Foundations

The quiz opens on its own page so you can focus on it. It is a Week 1 milestone, tracked separately from this lesson's own completion.

Topics covered

  • The per-packet forwarding loop and what happens with no match
  • What is preserved and what is rewritten at each hop
  • The three route sources and their codes
  • Connected and local routes, and when they disappear
Start the quiz

Study deeper

Topic guides extend this lesson — they do not replace the first-party walkthrough above.

Device Configuration & Verification

For the wider show ip route and show ip interface brief field reference used throughout this week