Mailing List Archive

bgp neighbor defeult-originate route-map usage ?
Hi,

Can someone please, confirm or not my understanding of route-map usage
on bgp
neighbor default-originate command.

I would like my router to originate a default route with a local
preference of
150 instead of tge default one. For this i thought route-map xas the way
to go,
so i wrote:

neighbor xxxx remote-as 64512
neighbor xxxx default-originate route-map test

route-map test permit 10
// this apply to all route so i first do not put match condition
set local-preference 150

no success... so i try applying match condition...either access-list or
prefix-list.. nothing works.

Since i see that the route-map option is not in the official
documentation i
wonder wether it is *really* implemented or not.

If not, any clue about he way to go to set local pref to only this
default route
? I also tried a filter-list out for this neighbor but it does not seem
to match
the default-originate.

Thx.
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: bgp neighbor defeult-originate route-map usage ? [ In reply to ]
On May 15, 2017, at 3:04 AM, mr.q@free.fr wrote:
> Can someone please, confirm or not my understanding of route-map usage on bgp
> neighbor default-originate command.
>
> I would like my router to originate a default route with a local preference of
> 150 instead of tge default one. For this i thought route-map xas the way to go,
> so i wrote:
>
> neighbor xxxx remote-as 64512
> neighbor xxxx default-originate route-map test
>
> route-map test permit 10
> // this apply to all route so i first do not put match condition
> set local-preference 150
>
> no success... so i try applying match condition...either access-list or
> prefix-list.. nothing works.
>
> Since i see that the route-map option is not in the official documentation i
> wonder wether it is *really* implemented or not.
>
> If not, any clue about he way to go to set local pref to only this default route
> ? I also tried a filter-list out for this neighbor but it does not seem to match
> the default-originate.

What exactly are you trying to do?

Default-originate creates a default route for your neighbor, not you. And local-prefs are ONLY for you, not your neighbors. So what you're actually doing makes no sense.

If you want your neighbor to do something with that default, like set localpref to 150, you'll have to set a community, not localpref. Then on the other router, in the import route-map for that bgp, check for the community you set, and set loclpref if you have a match.

/a
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: bgp neighbor defeult-originate route-map usage ? [ In reply to ]
On May 16, 2017, at 12:41 PM, mr.q@free.fr wrote:
> But, i still have issue with the route-map match sentence...

I don't actually know if there's a bug in applying a route-map to default-originate. However:

1) You should use "show ip bgp neighbor R2 advertised-routes" to see what R1 thinks it is sending.

2) You should turn on soft-reconfig, then "show ip bgp nei R1 received-routes" on R2 to see what R1 is actually sending.

3) A minor point - in route-map test stanzas 2 and 3, you should be doing "set community xx:yy additive" or all you'll ever see is 65200:2300.

/a

> On router R1:
> =============
> router bgp 65200
> bgp router-id 192.168.1.254
> neighbor 192.168.1.253 remote-as 65200
> !! without the route-map test the routes on R2 are associated with local pref 150 --> OK
> ! neighbor 192.168.1.253 default-originate
> !! with the route-map test the routes on R2 sees no route --> KO
> neighbor 192.168.1.253 default-originate route-map test
> !
> ip route 0.0.0.0/0 Null0 250
> !
> access-list 100 permit ip host 0.0.0.0 host 0.0.0.0
> !
> ip prefix-list def-route seq 10 permit 0.0.0.0/0
> !
> ! none of these following works ??
> route-map test permit 1
> match ip address prefix-list def-route
> set community 65200:2100
> !
>
> route-map test permit 2
> match ip address 100
> set community 65200:2200
> !
>
> route-map test permit 3
> set community 65200:2300
>
> On router R2:
> =============
> router bgp 65200
> bgp router-id 192.168.1.253
> neighbor 192.168.1.254 remote-as 65200
> neighbor 192.168.1.254 route-map testin in
> !
> route-map testin permit 5
> !! will put later a match community here
> set local-preference 150

_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: bgp neighbor defeult-originate route-map usage ? [ In reply to ]
On May 17, 2017, at 5:34 AM, mr.q@free.fr wrote:
> Le 2017-05-16 21:25, Alexis Rosen a écrit :
>> On May 16, 2017, at 12:41 PM, mr.q@free.fr wrote:
>>> But, i still have issue with the route-map match sentence...
>> I don't actually know if there's a bug in applying a route-map to
>> default-originate. However:
>> 1) You should use "show ip bgp neighbor R2 advertised-routes" to see
>> what R1 thinks it is sending.
> with route-map, sh ip bgp neighbor advertised-routes returns nothing !
> though i think the syntax of my route-map was OK.

Then that looks like a bug. Maybe default-originate's default is "special" in some way and it doesn't match your prefix list. Crazy idea - try adding "le 32" to your prefix-list and see if that helps.

Anyway, it's easy (if annoying) to work around this. Apply your route-map with "neighbor 192.168.1.253 route-map test out". Or add it to whatever route map you already use.

/a
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users