Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP best path problem

Hi

I have setup something like, 1EBGP->1IBGP->2IBGP-2EBGP. and try to do best path selection.

I found what ever I set on 1EBGP for localpreference or metrix or comunity, to only pass to 1IBGP, not to 2IBGP. so, the problem is 1IBGP select 1EBGP and 2IBGP select 2EBGP.

do I have anywhere to fix this?

do I have to make direct neighbour between 1EBGP and 2IBGP?

any comments will be appreciated

Thanks in advance

julxu

11 REPLIES
Bronze

BGP best path problem

LocalPref has local (inside AS) significance. You may set it for inbound (from eBGP peers) routes and it will be passed to iBGP peers.

MED by default is significant only between two ASes (the must be the same if you do not use bgp bestpath always-compare-med command).

Community (cost community for example) is different. You need to allow passing communities between neighbors first of all. And if you need cost community it will be AS-local significant.

You may use any topology and you may achieve neccessary result only by manipulating BGP attributes. I'm sure.

New Member

BGP best path problem

what I did is;

router 1EBGP:

==========

router bgp 64650

bgp route-id 10.2.2.2

....

neighbor 111.111.111.111 remote-as 2222

neighbor 111.111.111.111 route-map default-in in

neighbor 111.111.111.111 route-map  mynet-out out

neighbor 10.1.1.1 remote-as 64650

.....

route-map default-in permit 10

match ip address default-list

set local-preference 150

.....

router 1iBGP:

==========

router bgp 64650

bgp router-id 10.1.1.1

neighbor 10.2.2.2 remote-as 64650

neighbor 10.3.3.3 remote-as 64650

router 2iBGP

==========

router bgp 65650

bgp router-id 10.3.3.3

neighbor 10.1.1.1 remote-as 64650

neighbor 10.4.4.4 remote-as 64650

router 2EBGP:

===========

router bgp 64650

bgp router-id 10.4.4.4

neighbor 10.3.3.3 remote-as 64650

neighbor 555.555.555.555 remote-as 2222

neighbor 555.555.555.555.road-map default-in in

neighbor 555.555.555.555 road-map mynet-out out

road-map default-in permit 10

   match ip address default-list

   set localpreference 200

the result is

the router 2iBGP get defult route from 555.555.555.555, and 1iBGP get default route from 111.111.111.111.

it should be both 1iBGP and 2iBGP all get default from 555.555.555.555 because I have set local preference 200 here.

how can I get the both (1iBGP and 2iBGP) get default from 555.555.555.555?

Please advice

julxu

Bronze

Re: BGP best path problem

Could you send your topology map. Without it and with faked IP addresses your config is not so clear... What is AS 2222, IPs 111.111.111.111 and 555.555.555.555?..

New Member

Re: BGP best path problem

briefly draw something, hope it can be seen.

the problem is the local preference can automatically go to the neighbour, but can not go next hop, so the next ibgp router, even in same AS, will not get the local preference, it thi

the as 2222 is BGP AS, and both 111.111.111.111 and 555.555.555.555 are inside AS 2222, but not at same location.

in diagram, you can see, it is r from of the route, because I have to put a static route to force both 1iBGP and 2iBGP all go to same direction.

please advice

Julxu

Bronze

Re: BGP best path problem

Well, first of all you need to set up any IGP in your AS 64650 (it may be static though).

Second. 1iBGP never get routes obtained by 2eBGP because of iBGP nature (same thing about 2iBGP and 1eBGP). BGP router DOES NOT send any iBGP route to any of it's iBGP peer. You need to make route-reflection or BGP confederation to ovverride this. You may make 1iBGP and 2iBGP route-reflector-clients of each other and eBGPs - clients of correspondent iBGPs.

New Member

Re: BGP best path problem

ok first,

as you suggest, add router eigrp on 1ibgp and 2ibgp:

eigrp 1

......

redistribute bgp 64650 metric 5000 10 255 1 1500 route-map permit-default.

or

redistribute bgp 64650 metric 10000 100 255 1 1500 route-map permit-default.

tried put but one of redistribute statement into one box and another into another box.

but, it do not seems work, it looks like the if one take the default, and another one will put r in front.

Bronze

Re: BGP best path problem

No, no, .... Don't do redistribution. IGP is for iBGP to work properly. Mainly - for NEXT HOP attribute to be correclty recognized because of the fact that NEXT HOP is not changed during iBGP transmission.

New Member

Re: BGP best path problem

the NEXT HOP means "next-hop-self"? if so, it is in the configuration already, if not, please advice how to do it.

basically, I want 1ibgp and 2ibgp can see two routes, not only one.

Many Regards

Julie

Bronze

Re: BGP best path problem

NEXT HOP is an attribute of every route in BGP. Because of the fact that NEXT HOP in BGP may be far far away of the router that receives route, it (router) needs to have NEXT HOP in it's routing table for route recursion to implement. NEXT HOP changes in eBGP peering, it does not change in iBGP peering. Therefore if 1eBGP gets a route from AS2222 that route has NEXT HOP equals to IP address of AS2222 router. When 1eBGP send that route to 1iBGP NEXT HOP does not change and hence 1iBGP does need to have it in it's routing table (through any IGP for example). If you use next-hop-self in neighborship between 1i and 1e (it must be configured on 1e) than you change NEXT HOP to be an IP address of 1eBGP and here you do not need any IGP. But you also need to do the same thing in ALL iBGP neighbor statements.

Next. When 1iBGP receves a route from 1eBGP through iBGP it will not send this route to another iBGP peer (2iBGP) because of iBGP nature. Here you need to implement route reflection or confederation.

If you need more explanation, please let me know. I'll to do my best

New Member

Re: BGP best path problem

for the second. I tried to put "bgp confederation peers " it says 64650 local memeber-as not allowed in confed peer list.

I guess, I need totally reconfig every thing to make AS as small as possible, right?

if I want do it, what I should do? I am not very clear what I should do, please advice

Many Regards

julxu

Bronze

Re: BGP best path problem

Well, confederation is bit tricky. If in normal situation your AS is 64650, in confederation it would be another. For example, you need to configure

router bgp 65001

bgp confed id 64650

bgp confed peers

591
Views
0
Helpful
11
Replies