cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3223
Views
0
Helpful
7
Replies

iBGP neighbor --> route-map in with weight?

hgans
Level 1
Level 1

Hi,

I have a very basic question here...

4 BGP Routers with different eBGP uplinks and iBGP full mesh over all 4.

Routers learn some of the prefixes (only) from other Routers via iBGP and selects the path with "nearest" neighbor (lowest next hop?) - all prefixes have same metrics for all next hops...

I want to prefer an exit point for these prefixes on my own - so I want to change metrics on iBGP....

Question:

Is it legitime to apply a route-map in on iBGP neighbors and set different weight based on communities or other criterias?

Example:

router bgp 1

neighbor 1.2.3.4 remote-as 1

neighbor 1.2.3.4 next-nop-self

neighbor 1.2.3.4 route-map WEIGHT in

route-map WEIGHT permit 10

match community 1:1

set weight 10000

I ask this because I never see filter, metric confguration on iBGP peerings in any networks and not even in documentation.

I configured it and it works, so is this to be declared as bad design then?

Tough, don't see another possiblility to change Metrics on iBGP peerings with >2 neighbors and same metric prefixes...

Thanks for your comments

Herwig

7 Replies 7

JohnTylerPearce
Level 7
Level 7

Hgans,

This is completely doable, and a very good option btw.

Since you have 4 routers running eBGP then iBGP between all 4, you can configure a route-map, to set a specific community value to routes coming in from each eBGP peer, on each router. For instance.

By default, community values are configured using a decimal number on Cisco routers. You can also change to using ASN:NN where ASN is your AS number and NN is an administratively designed value.

So for instance, if you could configure 'ip bgp-community new-format' and for ech eBGP neighbor, you could do a specific eBGP AS, of if they are teh same, you do the following

Different [65512:100, 65513:200, 65514:300, 65515:400]

Same [65512:100, 65513:200, 65514:300, 65514:400]

Decimal [ 100,200,300,400 ]

So you could tag routes coming from a specific eBGP neighbor, and set a weight based upon these values'

Vishesh Verma
Level 1
Level 1

Hello,

Making route preference from one path over the other can't be think as a bad design, if it is bussiness requirement, it is perfectly normal.

Please refer to following docs,

BGP best path selection algorithm -

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

BGP best path selection and manipulation -

https://supportforums.cisco.com/docs/DOC-29905

BGP case studies -

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-bgp-toc.html

Route-map is misconfigured with match community command, refer to following doc, for how to use match community -

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/28784-bgp-community.html

-Vishesh

Gentlemen,

thanks for your replies,

that's exactly what I plan to do - marking learned eBGP peer prefixes with communities and then set a weights with match on these communities on my different iBGP peers...

(because I have two sites and want to direct the exit points per site accordingly)

Just still wondering, also in your posted links Vishesh only route-maps on eBGP peers are set and I am a very sceptic person when I cannot find cisco documentation missing something that I decide to configure

br

Herwig

Hi,

I used route-maps for iBGP neighbors in my network without any problem.

And I have never seen any restrictions for iBGP in Cisco documents.

The only restriction I can imagine might be for "set as-path ..." command but you don't need it in your case.

IMHO, it might be easier to manipulate Local Preference attribute possibly with an ougoing route-map than to mark prefixes by communities and matching them again?

(As noted by Vishesh already, your matching syntax is incorrect.)

Best regards,

Milan

Hi Milan,

thanks for your feedback.

In my setup with two router per geographical site (and all 4 routers are connected onto a shared LAN),

when I want to make sure that site local traffic should leave on same local site, Local Preference won't work because you can only prefer one exit point...

So for that reason I use weight together with commnity matches to make sure every BGP router decides best path in iBGP by its own metrics.

BR

Herwig

Milan,

Route-maps are protocol independent, so it doesn't matter if you apply them on the ebgp or ibgp neighbor. Functionality is the same. It is all about the semantics (logic) that you put in a route-map to be used with different routing protocols. The documents I provided were to help you understand the same.

-Vishesh

Vishesh,

what I was trying to explain is;

Some route-map features will not work with some protocols.

Like set as-prepend will not work with iBGP, e.g.

Or set tag will not work with BGP at all.

Best regards,

Milan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card