A connected route identifies a network directly attached to an interface with an IP address in an operationally up/up state. The router adds one automatically for each qualifying interface, so no manual route configuration is required. section 9.2.1 section 9.4
Read a connected route by checking these details:
- Identify code C in the routing table; it marks a connected route. section 9.2.1
- Match the network and prefix to the interface address. An address of 192.168.1.1/24 creates a route to 192.168.1.0/24. section 9.2.1
- Distinguish it from the automatically created local route: the connected route covers a network, while the local route uses /32 for the router’s exact interface address. section 9.4
- Forward directly to a destination in the connected network; use static or dynamic routing for networks that are not directly attached. section 9.3
R1 creates connected routes automatically
Configure and enable two interfaces: R1(config)# interface g0/0 R1(config-if)# ip address 192.168.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# interface g0/1 R1(config-if)# ip address 192.168.2.1 255.255.255.0 R1(config-if)# no shutdown The command show ip route then displays C 192.168.1.0/24 as directly connected to GigabitEthernet0/0 and C 192.168.2.0/24 as directly connected to GigabitEthernet0/1. Filter with show ip route | include C to display only connected routes. section 9.2.1
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
. . .
Gateway of last resort is not set
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0 #1
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0 #1
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, GigabitEthernet0/1 #2
L 192.168.2.1/32 is directly connected, GigabitEthernet0/1 #2
#1 Two routes for G0/0
#2 Two routes for G0/1
Inspect representative Cisco routing-table output showing connected C routes alongside local L routes. section 9.2.1
