This topic is to discuss the following lesson:
Hi Molenaarā¦ Thanks a lot of this tutorialā¦its very helpful to who are intersted in bgp. I was facing the problem with this originate attribute when i was not read thisā¦ Now i am very happy. I never forget this concept. Once again thaksā¦God Bless Youā¦
Nice. thanks.
Nice. I had doubt about this, now is crystal clear.
Rene,
It means Jack will reach 1.1.1.0/24 network through Jim because of this output
*> 192.168.12.1 0 0 1 i
However, it still learns from John but it will not install in the BGP table because of this
* 1.1.1.0/24 192.168.23.3 0 0 1 ?
Question is both Jim and John are advertizing 1.1.1.0/24 but why it is incomplete in Jackās table from Johnās standpoint.
Please confirm this to me.
Thanks
Hamood
Hi Hamood,
It shows with the ā?ā as incomplete because this route had been redistributed. If a route is advertised with the network command then it will show up with an āiā.
Rene
Thank you Rene, it is always a case within BGP if a route is redistributed will show up as ? It means do not redistribute into BGP
Hamood
Hi Hamood,
Thatās right, if you redistribute it into BGP then it will show up with a ?. This is no problem though. It basically means that BGP doesnāt āknowā where it came from.
Rene
Hi Hamood,
Thatās right, if you redistribute it into BGP then it will show up with a ?. This is no problem though. It basically means that BGP doesnāt āknowā where it came from.
Rene
Rene, question, for example i have multiple loopbacks that i want to redistribute to bgp, lets say 3 loopbacks (Lo1, Lo2 and Lo3), but i only want to redistribute Lo1. Is route-map the answer to this? or is there other way? Thanks!
Hi John,
Thatās right, this is when you should use a route-map.
Rene
Hi Rene,
what happen if the BGP router receive a route with the same path and origin code ?
thanks
Hussein Sameer
Hi Hussein,
Thereās a long list that BGP uses to select the best path, this is from the Cisco.com website:
- Prefer the path with the highest WEIGHT.
Note: WEIGHT is a Cisco-specific parameter. It is local to the router on which it is configured.
- Prefer the path with the highest LOCAL_PREF.
Note: A path without LOCAL_PREF is considered to have had the value set with the bgp default local-preferencecommand, or to have a value of 100 by default.
- 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.
- Prefer the path with the shortest AS_PATH.
Note: Be aware of these items:
- This step is skipped if you have configured the bgp bestpath as-path ignore command.
- An AS_SET counts as 1, no matter how many ASs are in the set.
- The AS_CONFED_SEQUENCE and AS_CONFED_SET are not included in the AS_PATH length.
- Prefer the path with the lowest origin type.
Note: IGP is lower than Exterior Gateway Protocol (EGP), and EGP is lower than INCOMPLETE.
- Prefer the path with the lowest multi-exit discriminator (MED).
Note: Be aware of these items:
- This comparison only occurs if the first (the neighboring) AS is the same in the two paths. Any confederation sub-ASs are ignored.
In other words, MEDs are compared only if the first AS in the AS_SEQUENCE is the same for multiple paths. Any preceding AS_CONFED_SEQUENCE is ignored.
- If bgp always-compare-med is enabled, MEDs are compared for all paths.
You must disable this option over the entire AS. Otherwise, routing loops can occur.
- If bgp bestpath med-confed is enabled, MEDs are compared for all paths that consist only of AS_CONFED_SEQUENCE.
These paths originated within the local confederation.
- THE MED of paths that are received from a neighbor with a MED of 4,294,967,295 is changed before insertion into the BGP table. The MED changes to to 4,294,967,294.
- THE MED of paths that are received from a neighbor with a MED of 4,294,967,295 are considered valid and are inserted into BGP table with effect to Codes fixed for Cisco bug ID CSCef34800.
- Paths received with no MED are assigned a MED of 0, unless you have enabled bgp bestpath med missing-as-worst .
If you have enabled bgp bestpath med missing-as-worst , the paths are assigned a MED of 4,294,967,294.
If you have enabled bgp bestpath med missing-as-worst , the paths are assigned a MED of 4,294,967,295 with effect to Codes fixed for Cisco bug ID CSCef34800.
- The bgp deterministic-med command can also influence this step.
Refer to How BGP Routers Use the Multi-Exit Discriminator for Best Path Selection for a demonstration.
- This comparison only occurs if the first (the neighboring) AS is the same in the two paths. Any confederation sub-ASs are ignored.
- Prefer eBGP over iBGP paths.
If bestpath is selected, go to Step 9 (multipath).
Note: Paths that contain AS_CONFED_SEQUENCE and AS_CONFED_SET are local to the confederation. Therefore, these paths are treated as internal paths. There is no distinction between Confederation External and Confederation Internal.
- Prefer the path with the lowest IGP metric to the BGP next hop.
Continue, even if bestpath is already selected.
- Determine if multiple paths require installation in the routing table for BGP Multipath.
Continue, if bestpath is not yet selected.
- When both paths are external, prefer the path that was received first (the oldest one).
This step minimizes route-flap because a newer path does not displace an older one, even if the newer path would be the preferred route based on the next decision criteria (Steps 11, 12, and 13).
Skip this step if any of these items is true:
- You have enabled the bgp best path compare-routerid command.
Note: Cisco IOS Software Releases 12.0.11S, 12.0.11SC, 12.0.11S3, 12.1.3, 12.1.3AA, 12.1.3.T, and 12.1.3.E introduced this command.
- The router ID is the same for multiple paths because the routes were received from the same router.
- There is no current best path.
The current best path can be lost when, for example, the neighbor that offers the path goes down.
- You have enabled the bgp best path compare-routerid command.
- Prefer the route that comes from the BGP router with the lowest router ID.
The router ID is the highest IP address on the router, with preference given to loopback addresses. Also, you can use thebgp router-id command to manually set the router ID.
Note: If a path contains route reflector (RR) attributes, the originator ID is treated as the router ID in the path selection process.
- If the originator or router ID is the same for multiple paths, prefer the path with the minimum cluster list length.
This is only present in BGP RR environments. It allows clients to peer with RRs or clients in other clusters. In this scenario, the client must be aware of the RR-specific BGP attribute.
- Prefer the path that comes from the lowest neighbor address.
This address is the IP address that is used in the BGP neighbor configuration. The address corresponds to the remote peer that is used in the TCP connection with the local router.
Ā
Thanks Rene your answer was very helpful .
this is also a possible way of making a specific add i/e or ?
neighbor 192.168.23.2 route-map cisco
route-map cisco permit 10
match ip address 1
set origin incomplete
Yes, using a route-map allows you to change the origin.
RENE I GUESS THERE IS LITTLE MISTAKE
In the output above you can see that router John learned both ā¦
It should be Jack right?
Thatās right Alexander, thanks for letting me know. Just fixed it.
Very good post!!!
18 posts were merged into an existing topic: BGP Origin Code Attribute explained