Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

metric and route path choosing

I have the following routing table:

ip classless

2.0.0.0/30 is subnetted, 1 subnets

C 2.2.2.0 is directly connected, Loopback2

3.0.0.0/30 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback3

9.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

S 9.9.9.0/28 [100/0] via 3.3.3.3

S 9.9.9.0/27 [10/0] via 2.2.2.3

S 9.9.9.16/28 [100/0] via 3.3.3.3

When I try go to 9.9.9.1 or 9.9.9.18 i.e., I pass through Loopback3 (3.3.3.3):

Tracing the route to 9.9.9.2

1 3.3.3.2 4 msec 0 msec 0 msec

2 ...

Tracing the route to 9.9.9.18

1 3.3.3.2 0 msec 4 msec 0 msec

2 ...

I can't understand - why? If this route have highest distance (100) from route through Loopback2 (2.2.2.2) with distance 10. Just because the prefix length?

I read this: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml but I don't see there relationship between AD, metric and prefix length. Who is preffered?

According to my results - the prefix length is preferred than AD..

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: metric and route path choosing

Prefix length is always preferred first. So the longest match route in the routing table will always be preferred.

Next, suppose you have 2 routes with the same length subnet mask, AD will be used to select route.

Next, suppose you have 2 routes with the same length subnet mask and equal AD, the metric will be used for route selection.

Hope this helps! If so, please rate.

2 REPLIES
Cisco Employee

Re: metric and route path choosing

Prefix length is always preferred first. So the longest match route in the routing table will always be preferred.

Next, suppose you have 2 routes with the same length subnet mask, AD will be used to select route.

Next, suppose you have 2 routes with the same length subnet mask and equal AD, the metric will be used for route selection.

Hope this helps! If so, please rate.

Re: metric and route path choosing

I believe that you should also mention that with OSPF things change a bit too.

After you consider the longest prefix you'd then prefer route type O, then O IA, then E1 and then E2 before considering costs.

Vlad

117
Views
5
Helpful
2
Replies
CreatePlease login to create content