How can I list all IPs relating to a single AS ?

Within this article we will show you how to list all IP`s relating to a single AS.


First of all get the IP address for the domain.

[root@server]$ whois | grep OriginAS
OriginAS:       AS32934

Finally run another whois against the AS to obtain a list of IPs.

origin=$(whois `dig +short | head -n1` | grep OriginAS | awk ' { print $2 } ') ; whois -h -- "-i origin $origin" | grep ^route

Tags: IPv4

About the Author


R Donato

Rick Donato is the Founder and Chief Editor of He currently works as an SDN/NFV Solutions Architect and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001