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.
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
Thanks & Regards
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.