I have some confusion in BGP Best path selection process. As per order,
2. LOC Pref
3. Locally generated path via Network/redistribution command
5. Lowest Origin
Here i am confused between 3rd and 5th Point. For me Both seems to be same.
Because Point 3 states that, perfer Network or redistribution commands ( ORIGIN=i for network ORIGIN=? for redistribution)
Again, 5th point states the lowest origin for path (ie IGP<EGP<incomplete)
Actually where i am going wrong. Please explain
the origin code is attached to the advertisement and travels with it.
So even if it is true that a network statement means origin code i and a redistribution means origin code ? also non locally generated routes have the origin code.
So point 3 says: if there is a BGP path locally generated prefer it over the other possible choices.
Cisco implementation does this by providing a Cisco weight of 32,768 to locally generated routes.
The BGP next-hop is set to 0.0.0.0 as seen by the local node.
Point 5 says: if multiple paths with same parameters for points 1-4 exist choice the one with the lowest origin code i < e < ?
So they are different.
see the BGP selection process as a sequence of checks with a strict hierarchy :
if at step N there is a single winner path there is no need to go on.
Hope to help