The process that routers use to determine the path that IP packets should take over a network to reach their destination
Routing table
Where routers store routes to all of their known destinations
Two main routing methods
Dynamic routing
Static routing
A route tells the router: to send a packet to destination X, you should send the packet to next-hop Y
Next-hop means the next router in the path to the destination
If the destination is directly connected to the router, send the packet directly to the destination
If the destination is the router's own IP address, receive the packet for yourself, don't forward it
This example network has four routers connected together, representing a WAN
R1 and R4 have LANs connected to them
IP addresses used in the example network
192.168.1.0/24
12.0/24
13.0/24
24.0/24
34.0/24
192.168.4.0/24
In the next video, we will configure static routes on the routers to allow PC1 and PC4 to communicate with each other over the network
This video will focus on two types of routes automatically added to a router's routing table: Connected and Local routes
Configuring IP addresses on R1
1. Configure G0/0 interface
2. Configure G0/1 interface
3. Configure G0/2 interface
When an interface is configured and enabled, two routes per interface are automatically added to the routing table: a connected route and a local route
Connected route
A route to the network the interface is connected to
Local route
A route to the exact IP address configured on the interface
A /32 netmask is used for a local route to specify the exact IP address of the interface
A route 'matches' a packet's destination if the packet's destination IP address is part of the network specified in the route
When a packet's destination matches multiple routes, the router will choose the 'most specific' matching route
The 'most specific' route is the one with the longest prefix length (smaller subnet mask)
Route selection
The process of a router determining the best path to forward a packet to its destination
R1 has a connected route to 192.168.1.0/24 and a local route to 1.1/32
R1 receives a packet with destination IP 192.168.1.1
The packet matches both the 192.168.1.0/24 and 1.1/32 routes
Most specific matching route
The matching route with the longest prefix length
R1 will select the 1.1/32 route for the packet destined for 192.168.1.1
Local route
A route that tells the router to keep the packet, don't forward it
R1 will receive the packet destined for 192.168.1.1 and look at the contents, because it is addressed to R1 itself
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
These lines about subnetting are not actual routes in the routing table
R1 receives a packet destined for 192.168.1.1
R1 will select the 1.1/32 local route
R1 receives a packet destined for 192.168.13.3
R1 will select the 13.0/24 connected route and forward the packet
R1 receives a packet destined for 192.168.1.244
R1 will select the 1.0/24 connected route and forward the packet
R1 receives a packet destined for 192.168.12.1
R1 will select the 12.1/32 local route and receive the packet
R1 receives a packet destined for 192.168.4.10
R1 will drop the packet since there is no matching route
Routers store information about destinations they know in their routing table