03-13-2024 08:07 PM
Hi, can someone explain what is going on with this Cisco configuration? This configuration is on router1 at a customer site that connects to an upstream BGP core router2, both routers are in the same AS and running iBGP, assume traffic flows from customer router1 to backbone router2 and vice versa. Also, what is going on with community statement, are specific prefixes getting received and advertised by backbone router2? Customer router1 has a loopback address of 1.1.1.1
Customer router1 configuration:
ip prefix-list cust-announce seq 400 deny 0.0.0.0/0 le 32
!
route-map static-to-bgp permit 20
match ip address prefix-list cust-announce
set ip next-hop 1.1.1.1
set origin igp
set as-path tag
set community 2152:65502 2153:65418
Solved! Go to Solution.
03-14-2024 02:14 AM
Looks like a route-map used for setting various attributes for static routes redistributed into BGP. It seems like it is currently filtering all routes from being redistributed into BGP. I am however just guessing that this is what the route-map is used for based on the name. Could you post the bgp configuration for the router too?
The prefix list matches all routes with a deny statement, causing no routes to be redistributed. I am guessing that there at some point has been some permit statements further up in the prefix list that has been used for matching specific routes.
Set ip next-hop 1.1.1.1 causes the next-hop PA to be set to 1.1.1.1, causing routes to forward the traffic of matched routes towards 1.1.1.1.
Set origin igp sets the origin PA for the routes to "igp" instead of "?" which redistributed routes get by default. This is used in best-path selection where "igp" is better than "?".
set as-path tag causes route tags to be inserted into the as-path PA. This is also used in best-path selection. You typically do this to be able to match based on existing route tags in BGP as well.
set community 2152:65502 2153:65418 sets the community PA. This is not directly used in best-path selection. Communities are similar to route tags in that their purpose is to be something for other routers to match based on, such that policy can be applied in the inbound direction on other routers. This is useful whenever other attributes arent sufficient to achieve the intended result.
You can read more about BGP best-path selection here: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
03-14-2024 02:14 AM
Looks like a route-map used for setting various attributes for static routes redistributed into BGP. It seems like it is currently filtering all routes from being redistributed into BGP. I am however just guessing that this is what the route-map is used for based on the name. Could you post the bgp configuration for the router too?
The prefix list matches all routes with a deny statement, causing no routes to be redistributed. I am guessing that there at some point has been some permit statements further up in the prefix list that has been used for matching specific routes.
Set ip next-hop 1.1.1.1 causes the next-hop PA to be set to 1.1.1.1, causing routes to forward the traffic of matched routes towards 1.1.1.1.
Set origin igp sets the origin PA for the routes to "igp" instead of "?" which redistributed routes get by default. This is used in best-path selection where "igp" is better than "?".
set as-path tag causes route tags to be inserted into the as-path PA. This is also used in best-path selection. You typically do this to be able to match based on existing route tags in BGP as well.
set community 2152:65502 2153:65418 sets the community PA. This is not directly used in best-path selection. Communities are similar to route tags in that their purpose is to be something for other routers to match based on, such that policy can be applied in the inbound direction on other routers. This is useful whenever other attributes arent sufficient to achieve the intended result.
You can read more about BGP best-path selection here: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
03-14-2024 10:56 AM - edited 03-16-2024 05:42 PM
.
03-14-2024 03:59 AM - edited 03-14-2024 04:28 AM
You don't mention what is the direction of route-map but I am sure it Inbound,
set as-path tag <<- this set use only when we redistribute IGP into Bgp,
So the scenario is
AS - IGP - AS
The IGP redistribute prefix between two AS and tag use to prevent routing loop.
MHM
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