Theodore Baschak
Theodore Baschak
Routing Guru. IPv6 Advocate. Operator of Hextet Systems (AS395089).
Feb 9, 2019 2 min read

Fastnetmon on Ubuntu 18.04

I’ve spent some time trying to manually install Fastnetmon community edition on Ubuntu 18.04 Bionic Beaver. I was unsuccessful. However, I didn’t do an apt-cache search fastnetmon. There is a package in universe. Bionic Beaver also includes exabgp 4.0.2 by default.

I installed both today as a test, copied the config from my existing install, and started the service. Sending some netflow to it showed expected traffic in fastnetmon_client, and so I set out to figuing out how to configure exabgp 4, since its config file format is new. (I realize exabgp 3 is still recommended, however I wanted to see if I could do an all-packages install and make exabgp 4 work).

Packages Installed

apt install exabgp socat fastnetmon

This installs the packages we’re working with.

Exabgp 4 Config

The config for exabgp 4 is quite different from that in exabgp 3. I looked through the github repo at the example configs, and made the following config which seems to work as intended. I’m not sure if there is a way of making the configs more efficient in terms of lines or not, but this works for now.

process announce-routes {
  run /usr/bin/socat stdout pipe:/var/run/exabgp.cmd;
  encoder text;
}

neighbor 192.0.2.130 {
  local-as 64512;
  peer-as 64512;
  router-id 192.0.2.156;
  local-address 192.0.2.156;
  api {
    processes [ announce-routes ];
  }
}
neighbor 192.0.2.131 {
  local-as 64512;
  peer-as 64512;
  router-id 192.0.2.156;
  local-address 192.0.2.156;
  api {
    processes [ announce-routes ];
  }
}

Experience

This seems to work.

You can test from the CLI that BLACKHOLE routes get injected with this command:

echo "announce route 192.0.2.1/32 next-hop 192.0.2.156 community 65535:666" > /var/run/exabgp.cmd

(and then withdraw after)

echo "withdraw route 192.0.2.1/32" > /var/run/exabgp.cmd

Updates

As of 2019-02-13 (commit 38bf681) fastnetmon community edition now supports Ubuntu 18.04’s newer gcc.