Directly connected routes

Directly connected networks are added to the router’s routing table if the interface connected to the network has an IP address configured and is in the up and up state. Connected routes always take precedence over static or dynamically discovered routes because they have the administrative distance value of(the lowest possible value).


The administrative distance is the first critera that a router uses to determine which route to use if two protocols provide route information for the same destination. Because the directly connected routes have the lowest possible administrative distance value, they will always be placed in the routing table. We will learn about the administrative distance in the later lessons.


Consider the following example network:

directly connected routes example

In the picture above you can see that both routers are directly connected to two networks. Here is the routing table of R1:

route r1

The routing table of R2:

route r2

In the pictures above you can see that both routers know about the network because they are both directy attached to that network. R1 also knows about the, while R2 knows about the Note that, however, R1 doesn’t know about the network; R2 doesn’t know about the In fact, if R1 receives the packet destined for the network, it will discard it because it doesn’t have any information about that network in its routing table and doesn’t know where to route the packets.


In the examples above we’ve used the show ip route connected command to display only the directly connected routes in the routing table.
Geek University 2021