A local route identifies the exact IP address configured on a router interface. The router adds it automatically when the interface has an address and is up/up. Because it uses /32 in IPv4, it matches only that single address. section 9.2.1 section 9.4
Use the local route to understand what happens when traffic targets the router itself:
- A packet matching a local route is received by the router; it is not forwarded to another host. section 9.3
- A connected route covers the entire directly connected network, whereas a local route covers only the interface address. section 9.2.1
- During route selection, /32 is more specific than shorter prefixes, so it precisely identifies the router’s own address. section 9.4
- IPv6 local routes use /128, the IPv6 equivalent of an IPv4 /32 host route. section 21.2.1
Reading the routing table
After configuring R1 with 192.168.1.1/24 on G0/0 and 192.168.2.1/24 on G0/1, the router automatically shows L 192.168.1.1/32 and L 192.168.2.1/32. The command show ip route | include L filters the table to these local entries. A destination of 192.168.1.1 is for R1 itself; 192.168.1.2 does not match that /32 local route.
IPv6 representation
With 2001:DB8::1 on G0/0, R1 displays L 2001:DB8::1/128 via GigabitEthernet0/0, receive. The receive designation indicates that traffic for the address is delivered to R1 rather than forwarded.
R1# show ip route | include L Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP . . . L 192.168.1.1/32 is directly connected, GigabitEthernet0/0 #1 L 192.168.2.1/32 is directly connected, GigabitEthernet0/1 #2 #1 A local route to G0/0’s IP address #2 A local route to G0/1’s IP address
Inspect representative Cisco output showing how local routes identify each interface address. section 9.2.1
