cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
278
Views
1
Helpful
3
Replies

How does this BGP route map work?

eagleeye
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Torbjørn
Spotlight
Spotlight

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

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

View solution in original post

3 Replies 3

Torbjørn
Spotlight
Spotlight

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

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

.

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

Review Cisco Networking for a $25 gift card