Number of public IP address in an AS (example IAM)

You can get the number of public address in an AS by using whois and ipcalc tools like this query :

$ for ip in $(whois -i origin AS6713 | awk ‘/route/ { print $2 }’); do ipcalc $ip; done | awk ‘/\/Net/{ ip+=$2 } END { printf ip “\n” }’

155638

Number of public IP address in an AS (example IAM)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s