- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:24 AM - edited 03-08-2019 11:57 AM
This is how I understood from ICND1.
AD is only used to distinguish between two routes with the same length. Longest prefix always win.
1) Longest match - Longest Prefix Matching Rule
2) AD
Please let me know if I am wrong :)
Solved! Go to Solution.
- Labels:
-
Other Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 02:09 AM - edited 09-07-2017 02:14 AM
Hi all,
Please allow me to join.
I believe that we are confusing and mixing two independent things: How a routing table is populated, and how a routing table is searched through after it is populated.
When populating a routing table, the tiebreakers if multiple sources offer the same [Network, Netmask] entry for the routing table are:
- Administrative distance
- Metric
As an example, consider this:
- OSPF offers:
- 10.0.1.0/24, metric 100
- 10.0.0.0/16, metric 50
- 0.0.0.0/0, metric 20
- EIGRP offers:
- 10.0.1.0/24, metric 9999
- 10.0.0.0/24, metric 5555
- 0.0.0.0/0, metric 1000
For each of these networks above, the routing protocols may also know about longer paths that have higher metrics, but they are uninteresting - what is shown above are only the least cost paths as known to the respective protocols.
Notice that these two protocols compete only for networks 10.0.1.0/24 and 0.0.0.0/0 - they both are trying to insert the very same network into the routing table. However, 10.0.0.0/16 and 10.0.0.0/24 are different networks because they differ in their netmask (or prefix length), and so there is no competition here. Therefore, the routing table will be:
- 10.0.1.0/24, EIGRP, metric 9999 (due to lower AD)
- 10.0.0.0/24, EIGRP, metric 5555
- 10.0.0.0/16, OSPF, metric 50
- 0.0.0.0/0, EIGRP, metric 1000 (due to lower AD)
Once again, when multiple protocols tried to insert the same network they know about, the protocol with the lower AD was preferred, and that protocol in turn installed the least cost path it knows, hence - lowest AD first, lowest metric second.
However, when searching this routing table for a match, the longest-prefix-match rule applies, and it always depends on the destination IP address of the packet to see which entry is matching:
- Packet for 10.0.1.1 would be matched by 10.0.1.0/24, 10.0.0.0/16, and 0.0.0.0/0, but 10.0.1.0/24 is the most specific, and so this one will be used.
- Packet for 10.0.0.1 would be matched by 10.0.0.0/24, 10.0.0.0/16, and 0.0.0.0/0, but 10.0.0.0/24 is the most specific, and so this one will be used.
- Packet for 10.0.2.2 would be matched by 10.0.0.0/16 and 0.0.0.0/0, but 10.0.0.0/16 is the most specific, and so this one will be used.
- Packet for 10.1.2.3 would be only matched by 0.0.0.0/0, so this one will be used.
Note: In this process, we were not looking at modifying the routing table contents anymore; we were just pondering the best match from the choices that were already available. Building a routing table is a different process than performing lookups in a routing table.
The bottom line is: There are two aspects to a routing table - one relates to how a routing table is populated with entries, the other is related how the contents of a routing table are used once they are there. When populating the routing table, the order of preference is AD first, metric second; when performing a lookup in the routing table, the longest-prefix-match rule is the exclusive rule.
Best regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:40 AM
Your right
- Prefix Length - The longest-matching route is preferred first. Prefix length trumps all other route attributes.
- Administrative Distance - In the event there are multiple routes to a destination with the same prefix length, the route learned by the protocol with the lowest administrative distance is preferred.
- Metric - In the event there are multiple routes learned by the same protocol with same prefix length, the route with the lowest metric is preferred. (If two or more of these routes have equal metrics, load balancing across them may occur.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 12:57 AM
What about that you are both right? He probably means that all three processes anounce the same networks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 01:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 01:22 AM
No the one with the longest match prefix wins between the 3 protocols even if EIGRP is there
check this example exactly what your asking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 01:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 02:09 AM - edited 09-07-2017 02:14 AM
Hi all,
Please allow me to join.
I believe that we are confusing and mixing two independent things: How a routing table is populated, and how a routing table is searched through after it is populated.
When populating a routing table, the tiebreakers if multiple sources offer the same [Network, Netmask] entry for the routing table are:
- Administrative distance
- Metric
As an example, consider this:
- OSPF offers:
- 10.0.1.0/24, metric 100
- 10.0.0.0/16, metric 50
- 0.0.0.0/0, metric 20
- EIGRP offers:
- 10.0.1.0/24, metric 9999
- 10.0.0.0/24, metric 5555
- 0.0.0.0/0, metric 1000
For each of these networks above, the routing protocols may also know about longer paths that have higher metrics, but they are uninteresting - what is shown above are only the least cost paths as known to the respective protocols.
Notice that these two protocols compete only for networks 10.0.1.0/24 and 0.0.0.0/0 - they both are trying to insert the very same network into the routing table. However, 10.0.0.0/16 and 10.0.0.0/24 are different networks because they differ in their netmask (or prefix length), and so there is no competition here. Therefore, the routing table will be:
- 10.0.1.0/24, EIGRP, metric 9999 (due to lower AD)
- 10.0.0.0/24, EIGRP, metric 5555
- 10.0.0.0/16, OSPF, metric 50
- 0.0.0.0/0, EIGRP, metric 1000 (due to lower AD)
Once again, when multiple protocols tried to insert the same network they know about, the protocol with the lower AD was preferred, and that protocol in turn installed the least cost path it knows, hence - lowest AD first, lowest metric second.
However, when searching this routing table for a match, the longest-prefix-match rule applies, and it always depends on the destination IP address of the packet to see which entry is matching:
- Packet for 10.0.1.1 would be matched by 10.0.1.0/24, 10.0.0.0/16, and 0.0.0.0/0, but 10.0.1.0/24 is the most specific, and so this one will be used.
- Packet for 10.0.0.1 would be matched by 10.0.0.0/24, 10.0.0.0/16, and 0.0.0.0/0, but 10.0.0.0/24 is the most specific, and so this one will be used.
- Packet for 10.0.2.2 would be matched by 10.0.0.0/16 and 0.0.0.0/0, but 10.0.0.0/16 is the most specific, and so this one will be used.
- Packet for 10.1.2.3 would be only matched by 0.0.0.0/0, so this one will be used.
Note: In this process, we were not looking at modifying the routing table contents anymore; we were just pondering the best match from the choices that were already available. Building a routing table is a different process than performing lookups in a routing table.
The bottom line is: There are two aspects to a routing table - one relates to how a routing table is populated with entries, the other is related how the contents of a routing table are used once they are there. When populating the routing table, the order of preference is AD first, metric second; when performing a lookup in the routing table, the longest-prefix-match rule is the exclusive rule.
Best regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2017 08:27 PM
Cisco Employee so smart!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 12:15 AM
>Cisco Employee so smart!
especially this one ... ;-)
