# Summarizing all the IP ranges of an ASN

**URL:** <https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550>\
**Category:** General\
**Tags:** asn, cli\
**Created:** [March 12, 2024, 5:24pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550 "2024-03-12T17:24:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [March 12, 2024, 5:24pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550/1 "2024-03-12T17:24:05Z")

</div>

You can summarize all the IP ranges of a particular ASN using a combination of the paid [IPinfo ASN API](https://ipinfo.io/products/asn-api) service, the [IPinfo CLI](https://github.com/ipinfo/cli) and [JQ](https://jqlang.github.io/jq/).

> This can also be done with our free IP to ASN database. If you are interested, please let me know! I will provide instructions as well.

This summary operation is interesting because it will show you the actual IP range locations of a particular ASN instead of the advertised ones in their WHOIS data. It also provides a bird’s eye view of the IP metadata of a particular ASN.

```auto
curl ipinfo.io/AS152586?token=$token | jq -r .prefixes[].netblock | ipinfo summarize

```

![WindowsTerminal_KIPDVpK4No-ezgif.com-video-to-gif-converter](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/b/b98568f6590d920e744dcbbe3d2985f41fb6ba96.gif)

---

<div class="post-metadata">

**Author:** ![cybersteve99](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cybersteve99](https://community.ipinfo.io/u/cybersteve99)\
**Post date:** [September 29, 2024, 3:28pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550/2 "2024-09-29T15:28:13Z")

</div>

Hi Abdullah,

I would be interested in instructions of how to summarise the IP ranges for an ASN using the free IP to ASN Database.

Many Thanks

---

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [September 30, 2024, 6:17pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550/3 "2024-09-30T18:17:57Z")

</div>

Hi,

I really appreciate the request 🙂 Thank you.

Here you go: [How to IP summarize an ASN using our free ASN database and IPinfo CLI](https://community.ipinfo.io/t/how-to-ip-summarize-an-asn-using-our-free-asn-database-and-ipinfo-cli/6514)

> [@How to IP summarize an ASN using our free ASN database and IPinfo CLI](https://community.ipinfo.io/t/how-to-ip-summarize-an-asn-using-our-free-asn-database-and-ipinfo-cli/6514):
>
> [In my previous post](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550/), I described how I use our [ASN API service](https://ipinfo.io/products/asn-api) to get the IP ranges of an ASN and then subsequently summarize those ranges to get an overview of the ASN. It is a super easy and powerful operation that is useful for us in discovering interesting servers for our [ProbeNet](https://ipinfo.io/blog/probe-network-how-we-make-sure-our-data-is-accurate/), and it can be used for threat intelligence, OSINT, and network administration tasks. However, one thing to point out is that the [ASN API](https://ipinfo.io/products/asn-api) comes with a lot of features and is a [paid service](https://ipinfo.io/pricing). Fo…

I just finished writing it, so apologies for the typos and mistakes. Let me know what you think. Thanks!
