IP routing table - default route
A router will look through all of its routing entries in the Routing Table to find the one that best matches the intended destination. If no match is found, and if the “gateway of last resort” (or the default route) is set, only then will it send the packet to the default route.
For example, take a look at this routing table:
R1
A destination IPv4 address of 192.168.12.5 will match the directly connected network on FastEthernet0/0. However, a destination address of 10.10.10.5 will not match any entry, and will thus be sent via the gateway of last resort, which has a next hop of 192.168.24.254, and an exit interface of FastEthernet0/1.
IPv6 operates in much the same way.
So the gateway of last resort, as its name suggests, will only be used if all other entries do not match.
Links
https://networklessons.com/cisco/ccna-200-301//ip-routing-explained
Links to this page:
- BGP - IGP-BGP redistribution best practices
- DMVPN - using a default route
- IP Routing table - process by which entries are matched
- IP SLA - Route Flapping Problem
- MPLS - VPN redistributing default route from CE into BGP
- OSPF - Default route advertisement next hop IP
- OSPF - NSSA no automatic default route
- OSPF - default-information originate always command
- OSPF NSSA ABR advertises default route
- OSPF Stub Area vs Totally Stub Area
- Routing - default gateway