pmacct and BIRD on the same box

Ondrej Zajicek santiago at crfreenet.org
Sun Sep 20 13:25:35 CEST 2015


On Sat, Sep 19, 2015 at 04:35:35PM -0500, Charles van Niman wrote:
> Hello,
> 
>       I am looking to feed BGP data into pmacct on a linux router I
> have running BIRD. Right now, BIRD runs iBGP to five other boxes
> [quagga/BIRD mix], on one IP [172.22.150.126], assigned to the
> loopback interface, and a handful of eBGP peers on another IP
> [172.22.150.127].
> 
>      I see two practical approaches to this, but I am all ears for
> more! My original plan was to just put pmacct's BGP peer IP on a
> separate loopback IP [172.22.150.119], and peer between BIRD
> 172.22.150.126:179 and pmacct 172.22.150.119:179, however since I am
> using two different listening IPs in BIRD, it binds to 0.0.0.0.
> 
>      I attempted to use the global listen bgp option, but it seems I
> am forced to pick between eBGP, iBGP, running multiple BIRD instances,
> or renumbering sessions, which I want to avoid :(
> 
>      Another way around this seemed to be to use a different TCP port
> for pmacct to bind to, however BIRD doesn't seem to support
> per-neighbor port settings. Maybe I have just missed this feature, if
> so hooray!

Hello

You can set per-neighbor remote port for BGP in version 1.5.0, but it
seems that the documentation on the web is not updated. The documentation
in the source package (doc/bird.sgml) or in Debian packages (bird-doc)
from the web is up-to-date:

   neighbor [ip] [port number] [as number]

       Define neighboring router this instance will be talking to and
       what AS it is located in. In case the neighbor is in the same AS
       as we are, we automatically switch to iBGP. Optionally, the remote
       port may also be specified. The parameter may be used multiple
       times with different sub-options (e.g., both neighbor 10.0.0.1 as
       65000; and neighbor 10.0.0.1; neighbor as 65000; are valid). This
       parameter is mandatory.


Setting per-neighbor listening port or address is not implemented.

Setting up pmacct on a different port and binding BIRD on 0.0.0.0
seems more sane to me than depending on outgoing TCP connections.

Note that BIRD will not establish outgoing direct BGP connection to a
neighbor address that is also an address of a local interface. But
incoming connections from such addresses and multihop/iBGP outgoing
connections are accepted. Perhaps we should not try to outsmart the
user and should handle such addresses as usual.

You can workaround that issue either by using multihop BGP or removing
the iface from known ifaces in 'device' protocol.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at 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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150920/db2ceca3/attachment.asc>


More information about the Bird-users mailing list