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

Prefer BGP route and questions

Here is my bgp config. How do I prefer the routes from the 200.30.6.225 neighbor over the ones received from the 200.30.6.229 neighbor?

router bgp 1000

no synchronization

bgp router-id 200.30.6.226

bgp log-neighbor-changes

bgp deterministic-med

network 10.3.2.0 mask 255.255.254.0

network 172.16.1.0 mask 255.255.255.0

neighbor 200.30.6.225 remote-as 2828

neighbor 200.30.6.225 transport path-mtu-discovery

neighbor 200.30.6.225 description MPLS

neighbor 200.30.6.225 send-community

neighbor 200.30.6.225 soft-reconfiguration inbound

neighbor 200.30.6.229 remote-as 2828

neighbor 200.30.6.229 transport path-mtu-discovery

neighbor 200.30.6.229 description DMZ

neighbor 200.30.6.229 send-community

neighbor 200.30.6.229 soft-reconfiguration inbound

neighbor 200.30.6.229 distribute-list BLOCK_BGP_TO_DMZ in

neighbor 200.30.6.229 distribute-list BLOCK_BGP_TO_DMZ out

no auto-summary

Extended IP access list BLOCK_BGP_TO_DMZ

    10 deny ip 10.0.0.0 0.255.255.255 any (1976 matches)

3 REPLIES
VIP Red

Prefer BGP route and questions

Use local preference, to distinguish between the two.

For example, you wanted to prefer the neighbor 200.30.6.229

:

routerbgp1000

neighbor 200.30.6.225 route-map LOWPREF in

neighbor 200.30.6.229  route-map HIGHPREF in

route-map LOWPREF permit 10

set local-preference 90

route-map HIGHPREF permit 10

set local-preference 110

Highest local preference is most preferred.

=============================
Please remember to rate useful posts, by clicking on the stars below. 

=============================

Please remember to rate useful posts, by clicking on the stars below.

Silver

Re: Prefer BGP route and questions

Hi,

if your neighbors are advertising routes to the same destination, then you can locally prefer one neighbor over another using WEIGHT attribute.

Default value is 0. Higher value is more preferred.

For example:

Router(config-router)#neighbor 200.30.6.225 weight 100

Check this link for more information:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#weight

Best regards,

Jan

Re: Prefer BGP route and questions

If you want to prefer the route on this router only, then use WEIGHT, as long as it's a Cisco router. If it needs to be prefered for the entire local AS, then use LOCAL_PREFERENCE.

Obviously this is only for outbound preference.

I didn't both showing any configuration, since these two guys that posted ahead of me, did a good job.

122
Views
0
Helpful
3
Replies
CreatePlease to create content