Inexpensive software bgp router that supports route tags?

Hi all, I was wondering if anyone can recommend a software (preferable), or
hardware-based router with an API, that supports BGP with tags on
advertised routes? I want to use it for a RTBH feed and having it in
software would make certain things easier to automate. I tried
Quagga/Zebra but it doesn't support tags. I see Mikrotik hardware routers
have an API, but I can't tell if the API supports adding BGP networks, so I
need to investigate that further. I can go hardware if I have to, with
some ssh/expect scripts, but thought there may be other options that are



FYI, Mikrotik is software (ROS) you can run it on an x86 platform (physical or virtual machine).
Not sure about the API and BGP, but they have extensive support for scripting.
Additionally check the Mikrotik Forums for other user developed API/Interfaces...


Faisal Imtiaz
Snappy Internet & Telecom


check out exabgp


Quagga supports BGP communities,


My voice for awesome ExaBGP too!

Did you look at BIRD? It is one of the most beautiful open source BGP

BIRD does not have anything like an restful API, but you can just
generate the config file and reload it on the fly to accomplish the

Can you elaborate on what you mean with 'tags'? Could you use BGP
communities instead?

Kind regards,


Thanks all; I'll check out ExaBGP and the software version of Mikrotik;
didn't realize it wasn't tied to hardware.

Sorry I wasn't clear on that. Traditionally on a hardware, e.g.
cisco/brocade, router performing the RTBH role, I'd add blackhole routes by
way of static routes with a particular tag; one tag for block this source,
one tag for block this destination. Redistribute static would let route
maps operate against those tags to turn into bgp communities being applied
to the announcements, and then the real routers can do what they need to
do. When I tried out Quagga/Zebra as an alternative, it doesn't work this
way, so while it was nice that it could pick up static routes from the OS,
or have them added manually just like a hardware router, there was no
concept of the route tag getting to Zebra for it to do the rest of the work
on the BGP side.

I'll check out Bird too; thanks.

We're using Quagga to inject blackhole routes upstream, which can match
routes on the OS's metric value:

# IPv4 blackhole
~$ ip route add dev lo metric 666

route-map map_bad_routes permit 10
match metric 666
set community xxxxx:yyy

+1 for BIRD.

Basically, what you want is to have several different static (blackhole)
routes, and be able to differenciate them at BGP level, for marking with
communities, etc. Correct?

This is easy with BIRD. Just use separate instances of the "static"
protocol, and filter using "proto" to distinguish between them.


protocol static default_sink {
  # sink all local prefixes by default, to avoid loops
  # (low localpref, let other routes override us)
  import filter { preference = 1; accept; };

  route blackhole;

protocol static forbidden {
  # these guys looked at me the wrong way
  route blackhole;

protocol static temp_block {
  # DDOS mitigation, etc
  route blackhole;

protocol bgp customer1 {
  export filter {
    if proto = "default_sink" then reject;
    if proto = "temp_block" then set_tempblock_community();
    if proto = "forbidden" then do_other_stuff();
  # ...

Didn't make it clear in my example, but you can obviously have multiple
routes in a static instance:

protocol static temp_block {
  route blackhole;
  route blackhole;

  # redirect to honeypot for gathering info
  route via;