LGTM

Looks Good To Me

Time Attack: bgpsimple vs exabgp 2nd Heat

After @exabgp thankfully gave me an advice on my previous post, I carried out performance tests of bgpsimple and exabgp again.

Right, API might be faster than massive config loading.

Full Route Advertisement

Service providers are struggling with the growing IPv4 full route and recently some people abandon default-free zone due to TCAM space problem. But they still sometimes need full route for analysis and forensic purpose. So, I'm curious, in such a case, is there good toolbox to inject full route into their network?

I think that simple BGP daemons are good options,

  • bgpsimple
  • exabgp with mrtparse

can read a full-table bgpdump archive and advertise to neighbor routers. Then, how fast are they?

Test Equipments

Firefly was configured as a dumb BGP neighbor rejecting any route so that it couldn't affect route injector's performance.

Benchmark

bgpsimple exabgp with config file exabgp with API
Until BGP turnup 0'00" 2'58" 0'02"
To complete advertising since BGP turnup 2'38" 1'13" 4'13"
To complete advertising since "clear bgp neighbor" 2'43" 2'09" 2'31"

Version tested: *1

  • bgpsimple 0.12 + perl 5.14.2
  • exabgp 3.4.10 + python 2.7.3

It took bgpsimple 2'38" to advertise full route, while exabgp required 4'11" ~ 4'15" in total.

exabgp shows different behavior depending on its configuration. exabgp with config file in the table above means "a bunch of static routes configured in .conf converted by mrtparse", exabgp with API means "configured to run an external script for route injection". The script looks like:

import sys
import time

messages = [
    'announce route 1.0.0.0/24 origin IGP as-path [2497 15169 ] next-hop 192.168.0.78',
    ...
]

while messages:
    message = messages.pop(0)
    sys.stdout.write( message + '\n')
    sys.stdout.flush()

while True:
    time.sleep(1)

See exabgp's wiki for more details.

Conclusion

bgpsimple is handier and faster way to inject full route from bgpdump archive. It simply assumes that the route information is given as a file in bgpdump -m format, read it with no signal handling and process routes in a simple loop with generating a minimal set of objects.

*1:Different version of exabgp from the previous post