10-05-2012 11:19 PM - edited 03-12-2019 04:44 PM
Hi,
I have a question on bgp route selection. If weight and local pref are same, then bgp would prefer the following as per text book.
-----------
3 The routes are evaluated based on the origination, with preference to the path that was sourced locally on the router. Here is the complete order with decreasing preference: default-originate (configured per neighbor), default-information originate (config- ured per address family), network, redistribute, aggregate-address.
--------------
Let us assume that R1 receives a default route from R2 and R3. R2 generates default route with the command "default-originate"(per-neighbor command) whereas R3 generates using default-information originate (config- ured per address family). Receiving router R1 how does it differentiate those two routes? Any special attributes are defined?
Thanks,
Balajee
Solved! Go to Solution.
10-06-2012 04:55 AM
Hello Balajee,
in your example R1 cannot know how R2 and R3 have generated a defaul route. It receives a default route from both and it choices one as BGP best path.
The origin code BGP attribute can discriminate between origin IGP ( network command) and origin ? (result of redistribution) with the first preferred.
But in your example no info about the way R2 or R3 generates a default route can be seen in BGP origin code.
The sentence that you have quoted provides the order of preference among all the possible methods of locally generating a BGP route: for example network command is preferred over redistribution and redistribution is preferred over an aggregate-address.
This is important to solve cases where configuration leads to competition between different methods of generating a BGP route in local node, for example between a network command and redistribute connected.
Hope to help
Giuseppe
10-06-2012 04:55 AM
Hello Balajee,
in your example R1 cannot know how R2 and R3 have generated a defaul route. It receives a default route from both and it choices one as BGP best path.
The origin code BGP attribute can discriminate between origin IGP ( network command) and origin ? (result of redistribution) with the first preferred.
But in your example no info about the way R2 or R3 generates a default route can be seen in BGP origin code.
The sentence that you have quoted provides the order of preference among all the possible methods of locally generating a BGP route: for example network command is preferred over redistribution and redistribution is preferred over an aggregate-address.
This is important to solve cases where configuration leads to competition between different methods of generating a BGP route in local node, for example between a network command and redistribute connected.
Hope to help
Giuseppe
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