On Tue, 25 Sep 2018 21:18:30 +0900,
Rinaldo Buratti wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> Dear all,
>
> i'm trying to set local preference for some bgp announcements. To do this
> i'm using the method speaker.attribute_map_set.
> When i run the controller it seems to work properly because i see this
> message:
>
> "*API method neighbor.attribute_map.set called with args: {'ip_address':
> '75.0.0.3', 'attribute_map':
> [AttributeMap(filters=[PrefixFilter(prefix=100.0.0.0/24,policy=PERMIT,ge=None,le=None)
> <http://100.0.0.0/24,policy=PERMIT,ge=None,le=None)>],attribute_type=LOCAL_PREF,attribute_value=150)]}*
> "
>
> however when announcements arrive, local preference is not set properly (in
> the RIB i can't see the value), and also the best route is not the one that
> i expect.
How those paths are provided to the bgp speaker? Via iBGP or from a
local config file?
local_pref must be set in the path attributes but I guess that isn't
happening somehow.
ryu.services.protocols.bgp.processor has the best path calculation
implementation. Debug logging can be added there to analyze this issue.
> Here the code i'm using:
>
> "pref_filter = PrefixFilter('100.0.0.0/24', PrefixFilter.POLICY_PERMIT)
> attribute_map = AttributeMap([pref_filter], AttributeMap.ATTR_LOCAL_PREF,
> 150)
> self.RyuBGPSpeaker.speaker.attribute_map_set('75.0.0.2', [attribute_map])"
>
> Thanks to all,
>
> Rinaldo Buratti
--
IWAMOTO Toshihiro
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel