inetb
inetb is a benchmarking tool for BGP RIB / FIB convergence
Output
Overview
inetb assumes a test environment below:
- router to be tested(DUT) has 2 eBGP sessions to gobgpds
- gobgpds are configured with different ASNs
- gobgpds run on the same server
inetb counts BGP updates:
- inetb controls gobgpds via gRPC
- Make gobgpds send and receive many BGP updates to and from the router(DUT)
- inetb monitors which prefixes are advertised or withdrawn on peering interfaces with libpcap, without interrupting gobgpd behaviors
Then inetb dumps the results with timestamp to JSON files.
You can draw charts with your favorite libraries. An example of convergence time charts is included in this repository.
Scenario 1: The router(DUT) receives new routes
- gobgpd1 advertises new routes to the router(DUT)
- inetb counts NLRIs in BGP updates passed through router(DUT) - gobgpd1 peer
- After router(DUT) gets converged for the new NLRI, it should advertise the same NLRIs to gobgpd2
- inetb also counts NLRIs on router(DUT) - gobgpd2 peer
Scenario 2: The router(DUT) receives stronger routes
- gobgpd2 advertises stronger routes to the router(DUT)
- inetb counts NLRIs in BGP updates passed through router(DUT) - gobgpd2 peer
- After router(DUT) gets converged for the new NLRI, it should advertise the same NLRIs to gobgpd1
- inetb also counts NLRIs on router(DUT) - gobgpd1 peer
Scenario 3: The router(DUT) receives withdrawals of stronger routes
- gobgpd2 sends withdrawals of stronger routes to the router(DUT)
- inetb counts withdrawn prefixes in BGP updates passed through router(DUT) - gobgpd2 peer
- After router(DUT) gets converged for the withdrawn BGP updates, it should send the same withdrawals back to gobgpd1
- inetb also counts withdrawals on router(DUT) - gobgpd1 peer
Scenario 4: The router(DUT) receives withdrawals of the rest
- gobgpd1 sends withdrawals of all routes to the router(DUT)
- inetb counts withdrawn prefixes in BGP updates passed through router(DUT) - gobgpd1 peer
- After router(DUT) gets converged for the withdrawn BGP updates, it should send the same withdrawals back to gobgpd2
- inetb also counts withdrawals on router(DUT) - gobgpd2 peer
Installation
go get github.com/codeout/inetb
How to Use
1 . Start 2 gobgpds with different ASNs.
- See gobgp document for details
- Config example is available here
- gobgpds should be configured with local-address so that inetb can identify the 2 BGP sessions
gobgpd -f gobgpd1.conf --disable-stdlog
gobgpd -f gobgpd2.conf --disable-stdlog --api-hosts :50052
2 . Download MRT File
Table dump v2 for full routes is available at Route Views Project for instance.
3 . Start inetb
inetb rib.20170707.1200
It will examine 4 test scenarios above and then dump JSON reports in report/
directory.
Tips
Disable MRAI
- After router(DUT) receives routes and get settled, it may unexpectedly wait for a while until advertises routes to other peers when MRAI is implemented
- Try
out-delay
option in Juniper oradvertise-interval
in Cisco to disable it
Create Chart
Run
ruby $GOPATH/src/github.com/codeout/inetb/report/make.rb report
And open report/chart.html
.
Features to be implemented
- FIB convergence benchmark
Copyright and License
Copyright (c) 2017 Shintaro Kojima. Code released under the MIT license.
Code includes a part of gobgp which is distributed in the Apache License 2.0.