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. And see here for current known issues.

New Member

Setting BGP Local Preference

Hello All,

 

Wonder if anyone can help? I have a WAN CE router running ebgp to a provider MPLS network PE router. The CE router is runnng iBGP to a core switch. The core switch also has point to point links to a DC( running ebgp), which has a connection to a provider MPLS. I am trying to manipulate the routing so DC traffic goes over the point to point link, and traffic to other remote sites goes via the MPLS WAN.

I noticed that the point to point link to the DC was being used for WAN bound traffic, rather than the local WAN link being used. I tried to set a local preference of 200 from the CE router to the core switch. This sort of worked, however now all traffic goes via the WAN, including traffic to the DC (which should use the point to point link). I then tried using an access-list to deny the DC networks. The access-list was used as a match in a route map, with the set being to set an LP of 200, and applied the routemap outbound towards the core switch. I was hoping the this would apply the LP to all networks, apart from the DC networks that were denied in the access-list. It didn't work!... it appeared to block the advertisement of the DC network from the CE to Core switch.

Can anyone give me any insight as to how I can selectivly not apply local pref to certain networks?

 

Thanks in advance

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Hi,IMHO, you need an ACL

Hi,

IMHO, you need an ACL which permits your DC subnets then.

Create a route-map with two entries:

The first entry just matching the ACL but not setting anything.

The second entry not matching anything but setting local preference to 200.

 

So after applying the route-map outbound, the DC prefixes will be advertised with the default LP=100 and all other prefixes will be advertised with LP=200.

 

Isn't  that what you want?

 

Best regards,

Milan

 

4 REPLIES
Hall of Fame Super Blue

it appeared to block the

it appeared to block the advertisement of the DC network from the CE to Core switch.

Not sure i follow.

You say the DC networks are not beind advertised from the CE to the core switch but isn't that what you want ie. the core switch receives advertisements for the DC over the point to point links so then it would take that path.

Is it that you want the CE to advertise the DC routes so you can use them as backup if the other link fails ? .

In terms of your route map they may be being blocked because of the way you wrote it. Try this -

1) write your acl to only match the non DC networks

2) you need two permit entries in your route map -

a) the first entry will be as it is now but with the modified acl

b) the second will just be a permit statement with no match or set statement

the idea being that anything routes not matched in the first statement are simply allowed through as is.

Jon

New Member

Thanks for your reply Jon,I

Thanks for your reply Jon,

I would like the WAN route to the DC to be available as a backup.

In terms of the ACL, I don't think I could write the ACL with the non DC networks, as there are over 1000 non DC routes. If I recall correctly, I did have the second line of the route map with a permit line.

thanks 

 

Hi,IMHO, you need an ACL

Hi,

IMHO, you need an ACL which permits your DC subnets then.

Create a route-map with two entries:

The first entry just matching the ACL but not setting anything.

The second entry not matching anything but setting local preference to 200.

 

So after applying the route-map outbound, the DC prefixes will be advertised with the default LP=100 and all other prefixes will be advertised with LP=200.

 

Isn't  that what you want?

 

Best regards,

Milan

 

New Member

Thanks Milan, your solution

Thanks Milan, your solution works a treat smiley

 

Thanks again, and thanks Jon for your reply also

186
Views
0
Helpful
4
Replies
CreatePlease login to create content