06-12-2008 03:53 AM - edited 03-05-2019 11:34 PM
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
06-12-2008 03:56 AM
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
06-12-2008 04:57 AM
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
06-12-2008 04:57 AM
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
06-12-2008 05:07 AM
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
06-12-2008 05:12 AM
LOLOLOL..Jon, you're the best!
Good "seeing" you, man...
And I didn't correct you -- I simply realigned what you said. ;-)
Thanks
Victor
06-12-2008 05:13 AM
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
06-12-2008 05:15 AM
Dan
Yes you can assume this especially taking into account Victor's point.
Jon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide