Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

route-map preferences

I'm having some trouble configuring route-maps to give preference to one of out backbone links.

We have two backbone links, link A and link B. I'd like to give preference to link B, using route-maps, so that traffic destine to a certain class B will take link B instead of link A.

I've so far managed to do this, a little to well. With the configuration listed below I thought this would match only the class B I intended to and then apply the attrib changes. Instead of restricting the bgp attrib changes to that bgp neightboor for just that perticular class B its tags the entire link with those attribs.

Now to all subnets, using show ip bgp x.x.x.x, will show link b with those attribs, not just those going to the class B.

What do I need to do to restrict the application of these bgp attributes to just the destination and link I want?

router bgp <asn number>

bgp log-neighbor-changes

neighbor <bgp peer> remote-as x

neighbor <bgp peer> route-map routemappref in

works#show route-map routemappref

route-map routemappref, permit, sequence 11

Match clauses:

ip address (access-lists): test

Set clauses:

local-preference 200

weight 200

Policy routing matches: 0 packets, 0 bytes

works#show ip access-lists test

Standard IP access list test

permit 192.168.0.0, wildcard bits 0.0.255.255 (2 matches)

permit any (118889 matches)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: route-map preferences

Try creating a second empty instance of the route-map routemappref . It should look like this..

route-map routemappref permit 11

match ip add test

set local-preference 200

set weight 200

route-map routemappref permit 21

The sequence numbers can be any number.

Hope that works out!

4 REPLIES

Re: route-map preferences

Remove the "permit any" statement on the named-access-list "test" so that only the required network will have the local preference set to 200 and weight set to 200.

The access list test should only match the required class 192.168.0.0

Hope that helps!

New Member

Re: route-map preferences

While that does work - the new bgp attribs are applied to only the class B I am wanting. This has the unwanted side effect of removing link B from the routing decisions of any other link

show ip bgp 1.2.3.4

shows that link B isn't even listed a possible route to any other subnet. I'm kinda stumped - the way I had it before applied to bgp attribs to everything, this way applies the bgp attribs to ONLY that class B..

Grumble....

Since then I've started from scratch -- copeid the startup-config to the running-config and tried everything over. Same result. Looks like this is gonna have to wait til tommorrow.

Re: route-map preferences

Try creating a second empty instance of the route-map routemappref . It should look like this..

route-map routemappref permit 11

match ip add test

set local-preference 200

set weight 200

route-map routemappref permit 21

The sequence numbers can be any number.

Hope that works out!

New Member

Re: route-map preferences

Ah ha!!!!

Thanks -- that did the trick!

97
Views
0
Helpful
4
Replies
CreatePlease to create content