DB consistancy checking tools
mediaWays Hostmaster hostmaster at mediaways.net
Mon Mar 6 14:27:16 CET 2000
Hi,
we do
whois -h whois.ripe.net -r -m <our Allocation/16> | grep inetnum | sed
"s/inetnum: //" | sed "s/ - /./" > <some file>
for our Allocations once a month and
analyse this with awk script
#!/usr/bin/sh
nawk -F. 'BEGIN{summe=0}
NF==8 {
for(i=1; i<=NF; i++)
byte[i]=$i;
if(byte[3]!=byte[7]) {
size=(byte[7]-byte[3])*256;
if(byte[4]>byte[8])
size-=byte[8]-byte[4];
else
size+=byte[8]+byte[4];
size++;
} else {
size=byte[8]-byte[4]+1;
}
summe+=size;
printf("%s: %d IPs\n", $0, size);
}
END{printf("Summe %ld\n", summe);}' < <some file>
so we could calculate the #IPs, check overlappings, check our own IP-DB
against it ... and so on.
We hope that this querys do not bother the RIPE-DB ;-)
Kind Regards,
_____________________________
Stephan Mankopf
+49 5241 80 88729
stephan.mankopf at mediaways.net
[ lir-wg Archives ]