Processes Involved
Three components involved in building and maintaining the routing table:- processes that run a routing protocol (such as EIGRP, OSPF, BGP, and IS-IS)
- the routing table itself (accepts information from the routing protocols and replies to requests from forwarding processes)
- the forwarding process, which requests information from the routing table to make a packet forwarding decision
Building the Routing Table
Three main considerations when building the routing table:- Prefix length - Each unique prefix is considered as a separate destination.
- Administrative distance - The measure of trustworthiness of the source of the route. If the route is learned from multiple sources, the lowest administrative distance (the believability of the source) is preferred.
- Metric - The measure used by the routing protocol to calculate the path cost to a given destination. Each routing protocol uses a different metric.
Backup Routes
- What happens to routes that are not installed in the routing table?
- What if the most preferred route fails?
- Two approaches to solve this problem:
- Have the routing process attempt to install its best route periodically.
- Have the routing protocol keep the route in its own database, and instruct the routing process to report if the best path fails.
- If the routing protocol does not have its own database, it attempts to install the updated information in the routing table.
- If there's already a route to the same destination, the installation attempt fails.
- For protocols that have their own database (EIGRP, OSPF, BGP, IS-IS, and RIP), a backup route is registered when the initial attempt to install the route fails.
- If the best path fails, the routing table process calls each routing protocol process that has registered a backup route, and asks them to reinstall the route (the lowest administrative distance wins).
Adjusting the Administrative Distance
- Changing the administrative distance can be very dangerous!
- For an entire routing protocol, the change is quite easy; simply specify the distance under the routing process.
- For static routes, the distance can be configured for each route individually.
How Metrics Determine the Route Selection Process
- Routes are chosen in the routing table based on the lowest administrative distance.
- If there are multiple paths to the same destination from a single routing protocol, the best path is selected based on the lowest metric.
- The parameters used to determine the metrics differ for each routing protocol.
- If there are multiple paths to the same destination with equal metrics, all routes are installed in the routing table and load balancing is done between them.
Prefix lengths
- Let's assume that a router has learned the following routes:
- EIGRP (internal): 192.168.32.0/26
- RIP: 192.168.32.0/24
- OSPF: 192.168.32.0/19
- What will be installed in the routing table?
- All of them, because they have different prefix lengths, so they are considered different destinations.
Making Forwarding Decisions
- Longer prefixes are always preferred!
- Let's look at the three routes previously installed in the routing table.
router# show ip route
....
D 192.168.32.0/26 [90/25789217] via 10.1.1.1
R 192.168.32.0/24 [120/4] via 10.1.1.2
O 192.168.32.0/19 [110/229840] via 10.1.1.3
....
- A packet destined to 192.168.32.1 matches all routes but it is forwarded according to the EIGRP route because of the longest prefix length.
- Similarly, a packet to 192.168.32.254 would be forwarded 10.1.1.2 (RIP route) because of the most specific match.
IP Classless
- Only affects the forwarding process, not the building of the routing table.
- If IP classless isn't configured (no ip classless), the router won't forward packets to supernets.
- If one part of a major network is known, but the subnet toward which the packet is destined within that major network is unknown, the packet is dropped.
- The router only uses the default route if the destination major network doesn't exist in the routing table at all.
- Configuring ip classless allows the router to ignore the classful boundaries of the networks in its routing table and simply route to the longest prefix match it can find.
Summary
- Making a forwarding decision actually consists of three processes: the routing protocols, the routing table, and the forwarding process.
- Installing a route into the routing table: the lowest administrative distance wins; if there are multiple paths to the same destination, compare the metric (install all equal-cost routes).
- Making a forwarding decision: the longest prefix wins.
- The process is illustrated in the diagram below.
References
Route Selection in Cisco RoutersWhat is Administrative Distance?
No comments:
Post a Comment