Skip to content

Instantly share code, notes, and snippets.

@idosch
Created October 2, 2019 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idosch/2eb96efe50eb5234d205e964f0814859 to your computer and use it in GitHub Desktop.
Save idosch/2eb96efe50eb5234d205e964f0814859 to your computer and use it in GitHub Desktop.
#!/bin/bash
ns_setup()
{
ip netns add ns1
for i in $(seq 1 5); do
ip -n ns1 link add name out$i up type dummy
ip -n ns1 addr add 203.0.113.$((i*2))/31 dev out$i
done
}
test_run()
{
local routes=$1; shift
ip netns exec ns1 ./insert-from-bgp -n $routes --batch 1000 \
203.0.113.3 203.0.113.5 203.0.113.7 203.0.113.9 203.0.113.11
}
ns_setup
test_run 500000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment