Hi everyone! Could someone show me how to set bgp_origin attribute on redistributed prefixes? I have tried if net =10.0.0.0/8 then { bgp_origin = ORIGIN_INCOMPLETE; accept; } But it doesn't work.
Yep, it's not very user friendly... The doc is problematic about this attribute. In fact it appears that you must use 0/1/2 (values following the RFC), so for incomplete you must use 2.
Le 21 déc. 2015 à 21:48, Гаврилов Игорь <iggorok@yandex.ua> a écrit :
Hi everyone! Could someone show me how to set bgp_origin attribute on redistributed prefixes? I have tried if net =10.0.0.0/8 then { bgp_origin = ORIGIN_INCOMPLETE; accept; } But it doesn't work.
Thank you, it work, but why in if statement it works: filter TEST { if bgp_origin = ORIGIN_IGP then { bgp_origin = 2; accept; } reject; } 22.12.2015, 03:05, "Olivier Benghozi" <olivier.benghozi@wifirst.fr>:
Yep, it's not very user friendly... The doc is problematic about this attribute.
In fact it appears that you must use 0/1/2 (values following the RFC), so for incomplete you must use 2.
Le 21 déc. 2015 à 21:48, Гаврилов Игорь <iggorok@yandex.ua> a écrit :
Hi everyone! Could someone show me how to set bgp_origin attribute on redistributed prefixes? I have tried if net =10.0.0.0/8 then { bgp_origin = ORIGIN_INCOMPLETE; accept; } But it doesn't work.
Maybe it's not the doc but the code that is problematic. We need an Ondrej outlook on this.
Le 22 déc. 2015 à 08:31, Гаврилов Игорь <iggorok@yandex.ua> a écrit :
Thank you, it work, but why in if statement it works: filter TEST { if bgp_origin = ORIGIN_IGP then { bgp_origin = 2; accept; } reject; }
22.12.2015, 03:05, "Olivier Benghozi" <olivier.benghozi@wifirst.fr>:
Yep, it's not very user friendly... The doc is problematic about this attribute.
In fact it appears that you must use 0/1/2 (values following the RFC), so for incomplete you must use 2.
Le 21 déc. 2015 à 21:48, Гаврилов Игорь <iggorok@yandex.ua> a écrit :
Hi everyone! Could someone show me how to set bgp_origin attribute on redistributed prefixes? I have tried if net =10.0.0.0/8 then { bgp_origin = ORIGIN_INCOMPLETE; accept; } But it doesn't work.
On Tue, Dec 22, 2015 at 10:31:44AM +0100, Olivier Benghozi wrote:
Maybe it's not the doc but the code that is problematic. We need an Ondrej outlook on this.
Le 22 déc. 2015 à 08:31, Гаврилов Игорь <iggorok@yandex.ua> a écrit :
Thank you, it work, but why in if statement it works: filter TEST { if bgp_origin = ORIGIN_IGP then { bgp_origin = 2; accept; } reject; }
Hi Well, the ORIGIN_* constants are supposed to work, but there is a bug and the attribute is handled as integer. Using 0, 1, 2 instead should work in both setting and testing. For me, testing 'show route where bgp_origin = ORIGIN_IGP' does not work (causes error message in the log), but 'show route where bgp_origin = 0' works. I expect that in the filter (as above) it is the same. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thank you for answer. As I understand it will be fixed in next releases? 22.12.2015, 12:20, "Ondrej Zajicek" <santiago@crfreenet.org>:
On Tue, Dec 22, 2015 at 10:31:44AM +0100, Olivier Benghozi wrote:
Maybe it's not the doc but the code that is problematic. We need an Ondrej outlook on this.
> Le 22 déc. 2015 à 08:31, Гаврилов Игорь <iggorok@yandex.ua> a écrit : > > Thank you, it work, but why in if statement it works: > filter TEST { > if bgp_origin = ORIGIN_IGP then { > bgp_origin = 2; > accept; > } > reject; > }
Hi
Well, the ORIGIN_* constants are supposed to work, but there is a bug and the attribute is handled as integer. Using 0, 1, 2 instead should work in both setting and testing.
For me, testing 'show route where bgp_origin = ORIGIN_IGP' does not work (causes error message in the log), but 'show route where bgp_origin = 0' works. I expect that in the filter (as above) it is the same.
-- Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Olivier Benghozi -
Ondrej Zajicek -
Гаврилов Игорь