this is regarding BGP Weight attribute!
Let us say we have three router A, B and C in the three Different AS 100, 200 and 300 respectively. And B and C are propagating updates to A about a same network. I configure
a routemap on A for updates from B and C with different weights, weight configured for neighbour B being higher. So, A installs the routes from B into its routing table. And this is
what is expected.
Now coming to my problem, I have a setup as follows.
A(RR) --ibgp(AS 100)-- B(RRC) --ebgp(AS 200)-- D
ibgp (AS 100) |
ebgp(AS 300) |
E --------------------------------------------------[AS X (10.10.10.0)]
I have three routers A, B and C in AS 100, D in AS 200 and E in AS 300. B and C haves D and E as their EBGP peers respectively. A is the route reflector in AS 100 and B, C are
the route reflector clients. D and E are connected to same network(through a different AS), say 10.10.10.0. So, now D and E will send routing updates about 10.10.10.0 to B and C
respectively. Hence, B and C will send the routing updates about 10.10.10.0 to A. And on A i have routemaps configured for routemaps neighbours B and C with weights 100 and
200. Hence, i expect A to install updates from C into A's routing table. But this is not happening...
What do you all think this setup should work or not??
thanks in advance,
Try clearing the BGP session ( preferably a soft reconfiguration, if its a production network), and see if the policy change does appear. ( command to use is " clear ip bgp * soft in|out)
My interest is to know if the weight attribute should reflect in routemaps for IBGP peers from the coneptual point of view...
Thanks for your reply.
I've never read anything indicating that weight only applies to routes learned via EBGP peers, and I can't think of any reason why it would make sense for it to be that way. But I've never tried it myself so I can't speak for certain.
I have had a similar physical setup as the one you describe, I haven't tried the policy map method of adding weighting but there are many other ways of achieving the same result, try looking up the many variables in the BGP decision making process, a good one to use is MED, set the meds differently and then use 'bgp always-compare-med ' but this is one suggestion in many ways you can achieve your goal.
Weight is a Cisco specific BGP Parameter which applies only to routes within
an individual router. It is not communicated to other routers. So it should be possible to set the weight on an incoming base on a router and make a path preferable for this router. I still would say there are better ways to reach what you want to do.
As a sample you could make it in AS 100 with AS prepend or you also could do it from the other AS with med.
Hope that helps you.
Thanks for all your replies. BGP has many attributes which we can use for for decision making. But my primary goal is not to reach the network in the other AS. But what i want is... Can i use weight in the route reflector configuration?? with in the AS? And, should weight affect the route selection when same updates coming from IBGP peers.
To give you all, what i exactly require, can i/should i implement it this way, if i'm coding for BGP on a new product and support weight attribute, though it's cisco specific.
Waiting for your replies...
Thanks in advance,
BGP's decision process does take weight into account when deciding path to a destination. If your primary goal is not to reash a specific network I'd use a dist list or As path prepend.. but you should be able to use weight as well. The decision process is below if you're interested or did not know already.
If the next hop is inaccessible, do not consider it.
Consider larger BGP administrative weights first.
If the routers have the same weight, consider the route with higher local preference.
If the routes have the same local preference, prefer the route that the specified router originated.
If no route was originated, prefer the shorter autonomous system path.
If all paths are of the same autonomous system path length, prefer the lowest origin code (IGP < EGP < INCOMPLETE).
If origin codes are the same and all the paths are from the same autonomous system, prefer the path with the lowest Multi Exit Discriminator (MED) metric. A missing metric is treated as zero.
If the MEDs are the same, prefer external paths over internal paths.
If IGP synchronization is disabled and only internal paths remain, prefer the path through the closest neighbor.
Prefer the route with the lowest IP address value for the BGP router ID.
Hope this helps,
Let me try to understand what you are are asking. You want to receive routing updates about network 10.10.10.0. You also want those updates to come to router A from router C and not from router B. You are trying to accomplish this by setting the weight on the connection from router A to C higher than the weight on the connection from router A to B. Is this correct?
yeah.. this is what i'm looking at! I have two routes to 10.10.10.0 from A through two different routers, in our case B, C. And also B, C are Route Reflectors Clients to A. And i want to receive routers only from C by setting higher weight. Is it possible to do this?
Many opther BGP attributes can be used but i'm particular about using weight.
I believe all you have to do is use a route-map on A to set the weight of routes received from C to be higher than routes received from B. You'll still receive the routes from both B and C but only the routes from C will be put into the routing table.
This sounds like what you said you tried in your original message, so I think we'll need to see your configuration to make a diagnosis.
An ideal route-map should look like this....
On router A,
router bgp XXX
route-map setWeight200 permit 10
match ip add 1
set weight 200
route-map setWeight200 permit 20
route-map setWeight300 permit 10
match ip add 1
set weight 300
route-map setWeight300 permit 20
access-list 1 permit 10.10.10.0
One more thing you should notice is that, B and C wouldnt change the next-hop of the EBGP route (EBGP route 10.10.10.0, advertised by D and E) when they pass, the route to router A. So first of all make sure, that router A knows how to reach the next-hop to 10.10.10.0. \
For this you can set on routers B and C, "neighbor
We definitely need to see your BGP routing table on router A, its configuration as well as router B and C configurations. .
I think weights can still be applied on RR for IBGP learned routes. In your case, check whether the RR can reach the next-hop value for the route 10.10.10.0 since B and C by default will not modify the NH attribute when they pass on EBGP routes to the IBGP peer A. Also, since it is IBGP, you need to take care of synchronization rule also. Only if the NH is reachable and sync rule is satisfied, the route is considered to be valid for being used in the IP routing table. But, still if you check the BGP table with 'show ip bgp' on A, you should be able to see the weights that you have configured for each neighbor since the BGP table will have all routes that you receive even if they are not installed in the IP routing table.