snar / bgpq3

bgpq3
BSD 2-Clause "Simplified" License
362 stars 53 forks source link

Different results between OpenBGP and Bird AS-SET query #41

Closed kiraum closed 5 years ago

kiraum commented 5 years ago

Hello,

I have different results using -B and -b on the number of ASNs on the query, if I'm using the same AS and the same AS-SET this number should be the same, I'm right?

root@heimdall:~# bgpq3 -T -h whois.radb.net -B -f 1299 AS-TELIANET | awk '{print $6}' | sort | uniq | wc -l 63725 root@heimdall:~# bgpq3 -T -h whois.radb.net -b -f 1299 AS-TELIANET | tr ',' '\n' | sed 's/NN = [//' | sed 's/];//' | awk 'NF>0' | expand | sed 's/ //g' | sort | uniq | wc -l 44594

[]s

kiraum commented 5 years ago

root@heimdall:~# bgpq3 | grep version bgpq3 version: 0.1.35-rc2

snar commented 5 years ago

On Tue, Sep 25, 2018 at 04:45:27AM -0700, kiraum wrote:

Hello,

I have different results using -B and -b on the number of ASNs on the query, if I'm using the same AS and the same AS-SET this number should be the same, I'm right?

Right. However, there is a minor difference in handling Bird and OpenBGPD: OpenBGPD supposed to be asn32-safe by default (so the output for OpenBGPD includes AS numbers > 65535) and Bird is not (so all AS numbers > 65535 are replaced with AS 23456 (transition as) by default).

Add -3 to get the same results.

root@heimdall:[DEL:# bgpq3 -T -h whois.radb.net -B -f 1299 AS-TELIANET | awk ' {print $6}' | sort | uniq | wc -l 63725 root@heimdall::DEL]# bgpq3 -T -h whois.radb.net -b -f 1299 AS-TELIANET | tr ',' '\n' | sed 's/NN = [//' | sed 's/];//' | awk 'NF>0' | expand | sed 's/ //g' | sort | uniq | wc -l 44594

[]s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.*

kiraum commented 5 years ago

Thanks @snar