cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1860
Views
5
Helpful
7
Replies
Highlighted
Beginner

Longest Prefix match

hi,

 

i went through the following document -

 

http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8651-21.html#building

 

I just wanna know whether longest prefix match is considered first over AD and metric or it is considered separately while routing

 

Thanks,

Vish

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
VIP Mentor

Hey that's the order it goes

Hey that's the order it goes in below longest match always checked first

The Longest Match Rule

Administrative Distance

Metric

View solution in original post

Highlighted
Hall of Fame Guru

VishLongest prefix is always

Vish

Longest prefix is always considered before anything else.

Then if there are multiple routes from different routing protocols with the same prefix and subnet mask it comes down to AD.

Then if there are still multiple routes within the same routing protocol it comes down to metric.

If there are still multiple routes then it depends on the routing protocol ie. IGPs such as EIGRP/OSPF will install equal cost paths although how many depends on the protocol itself whereas BGP, for example, will by default only install one of the routes because it uses additional attributes to select a route.

Jon

View solution in original post

7 REPLIES 7
Highlighted
VIP Mentor

Hey that's the order it goes

Hey that's the order it goes in below longest match always checked first

The Longest Match Rule

Administrative Distance

Metric

View solution in original post

Highlighted
Beginner

Thanks Mark

Thanks Mark

Highlighted
Hall of Fame Guru

VishLongest prefix is always

Vish

Longest prefix is always considered before anything else.

Then if there are multiple routes from different routing protocols with the same prefix and subnet mask it comes down to AD.

Then if there are still multiple routes within the same routing protocol it comes down to metric.

If there are still multiple routes then it depends on the routing protocol ie. IGPs such as EIGRP/OSPF will install equal cost paths although how many depends on the protocol itself whereas BGP, for example, will by default only install one of the routes because it uses additional attributes to select a route.

Jon

View solution in original post

Highlighted
Beginner

Thanks Jon

Thanks Jon

Highlighted
Hall of Fame Guru

No problem.Just to clarify

No problem.

Just to clarify the link you posted to was about building the routing table which is what my answer was about.

Obviously there is also the routing of the packets and this will always use the longest match prefix but the others don't really come into it here ie. you wouldn't have the same prefix and subnet mask with two different ADs because the router would only place one of them in the IP routing table.

Jon

 

Highlighted
Beginner

gotcha!!

gotcha!!

Highlighted
Beginner

Yes longest prefix is always

Yes longest prefix is always preferred and then attributes such as AD come into play.

 

If you have routes to the same destination (with same subnet mask) but the AD is different, the better AD route will be placed in the routing table.  You have routes to the same network, with different masks then both will be installed in the routing table, e.g.:

 

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

 

The traffic towards these networks will then be decided based on the destination IP address and subnet mask.

 

I hope thats clear, if not this this short read should clear it up:

http://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8651-21.html

 

Content for Community-Ad