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

BGP Question

As a general rule...

BGP selects the shorts prefix match or the longest prefix match..

And could you provide me with some documentation to support your answer..

Thanks

7 REPLIES

Re: BGP Question

Any routing protocol would always prefer the longest mask or the more specific route

This is mentioned in the RFC

Have a look at section 9.1.2.1. Route Resolvability Condition (RFC 4721)

http://www.ietf.org/rfc/rfc4271.txt

The route resolvability condition is defined as follows:

1) A route Rte1, referencing only the intermediate network address, is considered resolvable if the Routing Table contains

at least one resolvable route Rte2 that matches Rte1's ntermediate network address and is not recursively resolved directly or indirectly) through Rte1. If multiple matching routes are available, only the longest matching route SHOULD be considered.

HTH

Narayan

New Member

Re: BGP Question

Narayan,

Thanks for the information..

I could have sworn that it was the shortest prefix length..

I made mistake..

Thanks

Cisco Employee

Re: BGP Question

Narayan,

Actually the routing protocols as such don't really care about shorter or longer prefixes. If a shorter and longer prefix are learnt by a routing protocol, they are considered as two different entities and are both installed in the RIB.

It is at the data plane level that the distinction is made and that the longest prefix match will apply.

Cheers,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: BGP Question

Thanks again..

I just want to get this straight..

If R1 is populating a route through aggregation...

And

R2 is populating a BGP without aggregation..

The non-aggregated route will be perfered down the chain..

correct..

Cisco Employee

Re: BGP Question

You are right.

~Vaibhav

New Member

Re: BGP Question

Thanks again for all your help

Cisco Employee

Re: BGP Question

That is correct. If both routes are installed in the RIB, the non-aggregated route will be used for forwarding packets, assuming the destination address matches this non-aggregated routes obviously.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
183
Views
5
Helpful
7
Replies