<html><head></head><body>Hello!<br>This is currently not possible. There are some thoughts how to make it possible, yet never finished and implemented.<br>Maria<br><br><div class="gmail_quote">On January 22, 2021 9:26:59 PM GMT+01:00, David Johnson <dave@oort.io> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Hi,<br><br>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.<br><br>Quick summary:<br>I want to be able to modify a route (the actual IP/mask) between 2 interfaces.<br><br><br>Setup is as follows: <br><br>table A: routes learned as normal<br><br>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.<br><br>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.<br><br><br>My first attempt was to use a proto pipe between the two tables and simply change the net variable:<br><br> protocol pipe a_b_pipe {<br> table b;<br> peer table a;<br> import filter { # a -> b<br> if net ~ A.B.C.D/E then { net = F.G.H.I/J; accept; };<br> reject;<br> };<br> export none; # b -> a<br> }<br><br>but that doesn't work:<br>bird: /etc/bird/bird.conf:24:56 This static attribute is read-only.<br><br><br>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.<br><br><br>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.<br><br>Other suggestions appreciated, or is this just not possible?<br><br></div>
</blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>