Newbie question about 'export' semantics

Mark Petrovic mspetrovic at gmail.com
Fri Aug 3 01:07:18 CEST 2018


I get it now.  There *is* a local route that would match that if-statement
in the context of the export. I misunderstood this routing table entry as
ip-route presented it (that won't happen again).

$ ip route
...
blackhole 10.6.130.64/26 proto bird

If I read the routes using the old 'route' command, the existence of this
route in the local table is clearer to me.

$ route
...
10.6.130.64      0.0.0.0         255.255.255.192 U     0      0        0 *




On Thu, Aug 2, 2018 at 10:50 AM Mark Petrovic <mspetrovic at gmail.com> wrote:

> Hi.  I am new to bird, and am studying an existing bird 1.6 configuration
> to understand how the system it supports works.  Nothing is broken on my
> system; I just want to understand how it works.
>
> In the main bird.cfg within a bgp template, I see this
>
> export filter calico_pools;
>
> that calico_pools filter calls this via a bird function
>
>      if ( net = 10.6.130.64/26 ) then { accept; }
>
> Now, I correctly see this route as advertised when viewed from a BGP
> peer.  What I don't understand are the semantics of this if-statement.  In
> an export statement, the docs say the relationship is from routing  table
> to protocol
>
> export:  "This is similar to the import keyword, except that it works in
> the direction from the routing table to the protocol."
>
> What confuses me is that there is *no* net = 10.6.130.64/26 in the local
> routing table, so where is the value of "net" coming from such that the
> if-net comparison can be made and the export makes sense works?  I know the
> statement somehow does the right thing; I just don't know how to read and
> explain it to others in the export context.
>
> Can someone please help me understand how to read this?
>
> Thanks.
>
>

-- 
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20180802/eef16686/attachment.html>


More information about the Bird-users mailing list