use dockerized bgpdump and cidrmerge

This commit is contained in:
Yifan Gao 2017-01-22 23:33:38 +08:00 committed by Yifan Gao
parent acf4b7f6ac
commit 0dfd939514

View File

@ -26,7 +26,7 @@ get_asn(){
prepare_data(){
wget http://bgp.potaroo.net/as1221/asnames.txt
wget http://archive.routeviews.org/dnszones/rib.bz2
bgpdump -m -O rib.txt rib.bz2
docker run -it --rm -v `pwd`:/bgpdump -w /bgpdump gaoyifan/bgpdump bgpdump -m -O rib.txt rib.bz2
}
set -e
[[ $DEBUG != true ]] && prepare_data
@ -35,5 +35,5 @@ find operator -type f -name '*.conf' |
while read file; do
operator=${file%.*}
operator=${operator##*/}
get_asn $file | xargs bgptools | uniq > result/$operator.txt
get_asn $file | xargs bgptools | docker run -i --rm gaoyifan/cidrmerge > result/$operator.txt
done