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

BGP IP Routing Question

Hi

If I'm advertising a route let's 10.20.0.0/16 to go to router X (i.e in AS1234), and then I advertise that 10.20.10.0 needs to go to router Z (AS4321), will the BGP routers in the MPLS send a packet with a destination of 10.20.10.4 to router "Z" or will it match the 10.20.0./16 route?

Hopefully I've made myself clear, if not please let me know.

Thanks

Dan

7 REPLIES
Hall of Fame Super Blue

Re: BGP IP Routing Question

Dan

Is 10.20.10.0 with a /.24 subnet mask. If so then a longest match will always be used but that is assuming that all things about the routes advertised are equal. BGP has a lengthy path selection process so to say for sure it will use 10.20.10.0 would be a bit premature, but if all other things about the routes are the same then it will pick the longest match.

Jon

Re: BGP IP Routing Question

Jon is right...It will always use the longest mask

Actually the routers would have 2 different prefixes in the BGP table with different masks and will chose the longest one

Narayan

Blue

Re: BGP IP Routing Question

Hi, Jon! Long time...

If I may, I just want to make a slight clarification on what you wrote.

"BGP has a lengthy path selection process so to say for sure it will use 10.20.10.0 would be a bit premature, but if all other things about the routes are the same then it will pick the longest match."

You're right that we need the OP to tell us the length of the mask for the 10.20.10.0 network. However, the BGP route selection process in which BGP attributes are compared is performed when comparable routes are received by a BGP speaker. By "comparable", I mean routes that have the SAME prefix length. This is true because, like other routing protocols, BGP will use the "prefix length first" rule to select the best match. So, if the 10.20.10.0 prefix is a /24, it will automatically be selcted for a destination that falls in both the /16 and /24 prefix advertisements -- before any BGP route selection algorithm is applied.

Am I making sense?

Victor

Hall of Fame Super Blue

Re: BGP IP Routing Question

Victor

"Am I making sense?"

Do you ever really make sense my friend :-)

That's the second time you have corrected me on BGP matters. This has got to stop !! :-)

Hope your'e well - thanks for clarifying, suppose i have to rate you :-)

Jon

Blue

Re: BGP IP Routing Question

LOLOLOL..Jon, you're the best!

Good "seeing" you, man...

And I didn't correct you -- I simply realigned what you said. ;-)

Thanks

Victor

New Member

Re: BGP IP Routing Question

Hi

Thanks for the replies. Yes you are correct the 10.20.10.0 network has a /24 prefix. Since I don't have access to the MPLS network I'm going to assume that they are equal. If they are equal does the match stand i.e it will choose the /24 path before it choosed the /16 path?

Thanks

Dan

Hall of Fame Super Blue

Re: BGP IP Routing Question

Dan

Yes you can assume this especially taking into account Victor's point.

Jon

108
Views
5
Helpful
7
Replies
CreatePlease to create content