There are two separate processes involved here and it's 
important to make a distinction between them.  There is the 
process by which the router builds the routing table and then 
there is the route selection process.

When building the routing table, the router looks at the 
various routes available to it.  For any given route, if it's 
learned from multiple protocols the Administrative Distance 
wins.  It's important to remember that AD comes into play when 
comparing identical prefixes.

For example, let's say you learn 205.243.23.0/24 via EIGRP and 
via OSPF.  The router will install the EIGRP route into the 
routing table because its AD is lower.

However, if the router learns 205.243.23.0/24 via EIGRP and 
205.243.23.0/25 via OSPF, both routes will be installed because 
the prefix length (subnet mask) is different.

The router does this comparison--if necessary--with all the 
routes it has learned from all available sources and then 
compiles a final routing table.

Now, a packet arrives that needs to be forwarded.  It is here 
that the longest match rule really applies.  The route that 
most closely matches the destination for the packet is the 
route that will be used.  Using our previous example, let's say 
a packet is destined for 205.243.23.42.  In this case, the /25 
route learned via OSPF will be chosen.

If the destination were 205.243.23.150, though, then the /24 
route would be the closest match.

HTH,
John

---- On Tue, 16 Apr 2002, Sean Wolfe 
([EMAIL PROTECTED]) wrote:

> Quick question, hope it's not too trivial:
> 
> When a router decides to forward a packet based on the 
longest match
> principle, does this supersede other factors?
> 
> For example, if there is a route to network A via EIGRP, but 
a more specific
> route available via OSPF, does it choose OSPF because of 
longest match, or
> EIGRP because of lower administrative distance (90 vs. 110)?
> 
> Thanks folks, fun reading your posts as always. Wish me luck 
as I take BCSN
> this week. -Sean.
[EMAIL PROTECTED]




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=41697&t=41692
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to