04-13-2008 09:35 PM
Dear all,
I am having confusion with two of the BGP path selection algorithm
3---Prefer the path that was locally originated via a network or aggregate BGP subcommand or through redistribution from an IGP.
Local paths that are sourced by the network or redistribute commands are preferred over local aggregates that are sourced by the aggregate-address command.
and
5--Prefer the path with the lowest origin type.
Note: IGP is lower than Exterior Gateway Protocol (EGP), and EGP is lower than INCOMPLETE.
It seems same to me. may be anyone can explain me to differentiate this
Please help
Thanks & Regards
Mahesh
Solved! Go to Solution.
04-14-2008 02:58 AM
Hi Mahesh,
Not exactly. The step 3 only is applicable, if locally originated routes are present in the BGP table.
First, assume you have two routers R1 and R2 and both insert 10.1.0.0/16 into BGP. Which one will be the best path for R1? According to "3" it will be the locally inserted 10.1/16 and not the one learned from the other router R2.
Note that only the best path is announced to other BGP speakers. So R1 (and R2 for the same reasons) would announce the locally originated 10.1/16 to other BGP speakers.
Second, assume you have one router R1 and someone chooses to include 10.1.0.0/16 locally into the BGP table through a) redistribution, b) network statement and c) aggregate-address ALL at the same time.
Which one will be the best path? Well, the network statement will "win" the comparison.
Hope this helps! Please use the rating system.
Regards, Martin
04-14-2008 12:20 AM
Hi Mahesh,
3 -- prefer locally originated only applies to networks inserted into the BGP table at the router doing the path selection. This router will also create an origin BGP path attribute for the new BGP table entry.
5--prefer lowest origin type does apply to all BGP routes, as the origin code is a well known mandatory BGP attribute. This means every path entry in a BGP table has an origin code, even if the network was inserted into BGP in another router or even another AS.
The origin code tells about how the route originally came into the BGP table:
i - IGP, through a network command,
e - EGP, through EGP (outdated protocol and not to be seen today)
? - incomplete, through redistribution
Note however that this attribute can be modified with a route-map.
In brief: "3" applies only to those routes/pathes inserted into BGP locally, "5" applies to all the routes/pathes in the BGP table.
Hope this helps! Please use the rating system.
Regards, Martin
04-14-2008 12:59 AM
I have understood 5th one and for 3rd one
Correct me if I am wrong
You mean to say Suppose My AS is 100 and if I am getting Two routes to same prefix from my own AS(100)
one--Inserted via network command
Two: Inserted via aggregate-address
My Router will prefer the first one
Mahesh
04-14-2008 02:58 AM
Hi Mahesh,
Not exactly. The step 3 only is applicable, if locally originated routes are present in the BGP table.
First, assume you have two routers R1 and R2 and both insert 10.1.0.0/16 into BGP. Which one will be the best path for R1? According to "3" it will be the locally inserted 10.1/16 and not the one learned from the other router R2.
Note that only the best path is announced to other BGP speakers. So R1 (and R2 for the same reasons) would announce the locally originated 10.1/16 to other BGP speakers.
Second, assume you have one router R1 and someone chooses to include 10.1.0.0/16 locally into the BGP table through a) redistribution, b) network statement and c) aggregate-address ALL at the same time.
Which one will be the best path? Well, the network statement will "win" the comparison.
Hope this helps! Please use the rating system.
Regards, Martin
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