cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
574
Views
3
Helpful
2
Replies

Local Preference attribute on outbound routes

ThomasD86
Level 1
Level 1

topology.jpg

 

Hi,
I am working with the topology in the image. Router A, B and C have an

iBGP

neighborship. B and C announce a

default route

towards A, Router A should prefer the default advertised from B to the one advertised from C.

This is the configuration I have on routers,

Router A:

 

 

 

 

 neighbor 2.2.2.2
  remote-as 65535
  description *** TO ROUTER B ***
  update-source Loopback0
   route-policy BGP_PASS_ALL in
   route-policy BGP_PASS_ALL out
   next-hop-self
   soft-reconfiguration inbound always

neighbor 3.3.3.3
  remote-as 65535
  update-source Loopback0
  address-family ipv4 unicast
next-hop-self
   soft-reconfiguration inbound always

 

 

 

 

Router B:

 

 

 

 

neighbor 1.1.1.1 activate
 neighbor 1.1.1.1 next-hop-self
 neighbor 1.1.1.1 default-originate
 neighbor 1.1.1.1 soft-reconfiguration inbound

 

 

 

 

 Router C:

 

 

 

 

neighbor 1.1.1.1 activate
neighbor 1.1.1.1 default-originate
neighbor 1.1.1.1 soft-reconfiguration inbound
neighbor 1.1.1.1 route-map LP-50 out

 

 

 

 

On router C, I have configured this route-policy:

 

 

 

 

route-map LOCAL-PREF-90, permit, sequence 10
  Match clauses:
    ip address prefix-lists: DEFAULTROUTE 
  Set clauses:
    local-preference 90
  Policy routing matches: 0 packets, 0 bytes

ip prefix-list DEFAULTROUTE
ip prefix-list DEFAULTROUTE: 1 entries
   seq 5 permit 0.0.0.0/0

 

 

 

 

This however doesn't seem to work and router A will receive the

default route

from C with a local pref value of 100 rather than 90. 
Only when configuring a policy on router A the local preference value will be applied. Does local preference only work in the inbound direction?

Thanks

1 Accepted Solution

Accepted Solutions

Harold Ritter
Spotlight
Spotlight

Hi @ThomasD86 ,

The

default route

originated via the

default-originate

command is not subjected to the outbound

rroute-map

. Try applying the following configuration instead.

neighbor 1.1.1.1 default-originate route-map LP90

route-map LP90 permit 10

set local-preference 90

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

2 Replies 2

Harold Ritter
Spotlight
Spotlight

Hi @ThomasD86 ,

The

default route

originated via the

default-originate

command is not subjected to the outbound

rroute-map

. Try applying the following configuration instead.

neighbor 1.1.1.1 default-originate route-map LP90

route-map LP90 permit 10

set local-preference 90

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Thank you Harold,

this worked perfectly.


Have a great day!