cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4284
Views
0
Helpful
9
Replies

Why my route-map did not set local-preference=200?

news2010a
Level 3
Level 3

Hey, can you help me understand this:

I setup a route-map to set local-preference to 200 if route is coming from 10.0.0.0/24 (ISP1), so I would make routes from ISP1 the preferred ones.

However, I see that my 'show ip bgp' lists only local-preference=100.

Why no routes were set to '200'?

Here is the the output from RouterB, the one I set the access-list 1 and route-map. Detailed diagram with run config is attached. Thanks in advance!!

RouterB#show ip bgp

BGP table version is 48, local router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*>i1.1.1.1/32 192.168.1.1 0 100 0 1803 i

*> 2.2.2.2/32 0.0.0.0 0 32768 i

*>i3.3.3.3/32 192.1.1.3 0 100 0 i

*> 10.0.0.0/24 0.0.0.0 0 32768 i

* i192.1.1.0 192.1.1.3 0 100 0 i

*> 0.0.0.0 0 32768 i

*>i192.168.1.0 192.1.1.3 0 100 0 i

RouterB#show ip access-lists

Standard IP access list 1

10 permit 10.0.0.0, wildcard bits 0.0.0.255

RouterB#

1 Accepted Solution

Accepted Solutions

As you noted, match ip route-source isn't supported as inbound policy under BGP.

This command is used for redistributing from one routing protocol to another:

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_pi1.html#wp1014124

If you want to increase the local-preference on routes coming from the 10.0.0.1 BGP peer, you simply create a route-map with local-pref 200 - apply this route-map under BGP inbound. For instance:

route-map LOCAL-PREF permit 10

set local-preference 200

router bgp 2000

no neighbor 1.1.1.1 remote-as 1803

neighbor 10.0.0.1 remote-as 1803 route-map LOCAL-PREF in

Then on the CLI, clear ip bgp * in

HTH,

__

Edison.

View solution in original post

9 Replies 9

sunilferrao
Level 1
Level 1

Hi ,

Try this

apply route-map SELECT_ISP out to ibgp peer

and do clear ip bgp soft *

Can you clarify how exactly I would apply the route-map out to ibgp peer?

Do you mean that I could do:

access-list 1 permit ?

under bgp 2000

neighbor 192.1.1.3 route-map SELECT_ISP out

rpfinneran
Level 1
Level 1

I am guessing that you are matching ip address in your route map, then setting Local Pref.

That isn't what you are trying to do. What you should do is match ip route-source to ACL1. Then set local preference.

Paste your route map and BGP configs here and will resolve.

Yup, just realize you attached your configs. So, make the following changes on RouterB...

conf t

route-map SELECT_ISP 10

no match ip address 1

match ip route-source 1

exit

router bgp 2000

neighbor 10.0.0.1 route-map SELECT_ISP in

end

wr

I did as your advised. However, I got the message below between the "%" mark. Any ideas what's wrong?

RouterB(config)#route-map SELECT_ISP 10

RouterB(config-route-map)#no match ip address 1

RouterB(config-route-map)#match ip route-source 1

RouterB(config-route-map)#exit

RouterB(config)#router bgp 2000

RouterB(config-router)#neig 10.0.0.1 route-map SELECT_ISP in

% "SELECT_ISP" used as BGP inbound route-map, route source match not supported

RouterB(config-router)#

RouterB#show route-map

route-map SELECT_ISP, permit, sequence 10

Match clauses:

ip route-source (access-lists): 1

Set clauses:

Policy routing matches: 0 packets, 0 bytes

RouterB#

As you noted, match ip route-source isn't supported as inbound policy under BGP.

This command is used for redistributing from one routing protocol to another:

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_pi1.html#wp1014124

If you want to increase the local-preference on routes coming from the 10.0.0.1 BGP peer, you simply create a route-map with local-pref 200 - apply this route-map under BGP inbound. For instance:

route-map LOCAL-PREF permit 10

set local-preference 200

router bgp 2000

no neighbor 1.1.1.1 remote-as 1803

neighbor 10.0.0.1 remote-as 1803 route-map LOCAL-PREF in

Then on the CLI, clear ip bgp * in

HTH,

__

Edison.

I would also recommend removing the BGP session to 1.1.1.1, as you already have a session to routerA (10.0.0.1).

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Thanks. Regarding removing the session to the loopback0 (1.1.1.1), isn't the best practice establish session to loopback addresses for stability reasons? How do you handle it in this case? I am not sure if I could remove the session for the physical IPs and leave only the ones for the loopback in this case...

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco