Converting a route between tables via pipe proto?

Maria Matějka maria.matejka at nic.cz
Fri Jan 22 22:18:56 CET 2021


Hello!
This is currently not possible. There are some thoughts how to make it possible, yet never finished and implemented.
Maria

On January 22, 2021 9:26:59 PM GMT+01:00, David Johnson <dave at oort.io> wrote:
>Hi,
>
>I'm trying to see if bird can accomplish the following and so far I
>can't
>seem to find a way to do it.
>
>Quick summary:
>I want to be able to modify a route (the actual IP/mask) between 2
>interfaces.
>
>
>Setup is as follows:
>
>table A: routes learned as normal
>
>table B: I want to advertise a specific route into table B if there is
>another specific route learned on table A.  Note that the route in
>table B
>is different than A but I want to link/convert them somehow.
>
>Why would I want to do this?  This Linux setup is performing NETMAP to
>convert IPs when forwarded between 2 interfaces.  I know the exact
>prefixes
>so I can enter them in the config but I want to dynamically advertise
>those
>into B but only if they are reachable via A.
>
>
>My first attempt was to use a proto pipe between the two tables and
>simply
>change the net variable:
>
>  protocol pipe a_b_pipe {
>    table b;
>    peer table a;
>    import filter {   # a -> b
>      if net ~ A.B.C.D/E then { net = F.G.H.I/J; accept; };
>      reject;
>    };
>    export none;  # b -> a
>  }
>
>but that doesn't work:
>bird: /etc/bird/bird.conf:24:56 This static attribute is read-only.
>
>
>My second attempt was to setup filters/functions on the protos in table
>A
>to set some variable if the specific route is seen, then reference that
>variable via a static proto route in table B.  This seems to be a no go
>as
>there are global constants (define xxx;) but attributes are local and
>function variables are also local scope.
>
>
>My third thinking was to somehow use bfd to cross the bridge as it
>were..
> setup a static route with the bfd option in table B and have it
>communicate with a bfd in table A, but there doesn't seem to be any way
>to
>start/stop bfd on the table B side based on learning a specific route
>in
>table B.
>
>Other suggestions appreciated, or is this just not possible?

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20210122/2764af67/attachment.htm>


More information about the Bird-users mailing list