Advertisement
Live BGP Routing Data

ASN Lookup
Free IP to ASN, BGP & IP Range Checker

Run a free ASN lookup on any IP address, domain, or AS number. This autonomous system lookup returns the network owner, the Regional Internet Registry, every announced BGP prefix, RPKI route validity, and upstream peers — with one-click firewall export.

Quick Answer: What Is an ASN Lookup?

An ASN lookup identifies which Autonomous System Number owns and announces a given IP address. Every publicly routable IP belongs to exactly one origin AS at any moment. This free ASN checker maps an IP, domain, or AS number to its network operator, lists every IP range that network announces over BGP, and shows whether the route is RPKI valid.

Try:

Live data from the RIPE NCC public routing dataset. No account, no rate-limit wall, nothing logged.

Robert Harrison, OSINT and Network Utility Expert, explaining ASN lookup and BGP routing at TrustMyIP.com
Written & Verified By

Robert Harrison

OSINT & Network Utility Expert

I spent most of last December rewriting firewall automation for three clients after BGPView went dark on 26 November 2025 and took its free API with it. Every ASN lookup script those teams had written since 2019 started returning connection errors overnight. That week taught me something worth passing on: the value of an autonomous system lookup is not the AS number itself — it is the prefix list you can act on, in the exact format your firewall expects, without a signup wall in the way.

One honest caveat before you rely on anything below. BGP data is a snapshot of what route collectors observed, not absolute truth. A network can announce a prefix from a second AS, drop an announcement for maintenance, or use a more specific route that never reaches every collector. I have seen a prefix disappear from one dataset and stay visible in another for six hours. Treat the results as strong evidence, not a legal record of ownership.

View All Articles by Robert Harrison

What Is an ASN Lookup and Why Does It Matter?

An ASN lookup tells you which network operator controls an IP address. Every publicly routable address on the internet is announced by exactly one origin AS at any given moment, and an autonomous system lookup resolves that relationship in both directions — address to network, and network back to every address it holds.

An ASN — Autonomous System Number — is a unique identifier assigned to a network that operates under a single, consistent routing policy. Your ISP has one. So does Cloudflare (AS13335), Google (AS15169), and every hosting company you have ever rented a server from. The number is how the rest of the internet refers to that network when deciding where to send traffic.

Here is the part most explanations skip. An IP address tells you almost nothing on its own. 104.16.132.229 is just four numbers. Run an ASN lookup on it and you learn it belongs to Cloudflare, sits inside a prefix Cloudflare announces globally, and shares that network with millions of other sites behind the same reverse proxy. That single lookup changes how you interpret every log line containing that address.

Advertisement

Who Actually Uses ASN Lookups Day to Day

  • Security analysts checking whether an attacking IP comes from a residential ISP or a bulletproof hosting network
  • Network engineers planning peering or debugging why traffic takes a strange path
  • Sysadmins who need the full IP range of a provider to build a firewall allowlist
  • Fraud teams separating datacenter traffic from real consumer connections
  • OSINT researchers mapping the infrastructure footprint of an organisation

Key Fact: The IANA Autonomous System Number registry delegates AS numbers to the five Regional Internet Registries — ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC — which then assign them to individual networks. Original 16-bit ASNs ran from 0 to 65535 and were effectively exhausted, which is why RFC 6793 extended the space to 32 bits in 2012.

Knowing what an ASN is only gets you halfway. The next section covers exactly what happens when you press the button above.

How Does This ASN Lookup Tool Work?

This ASN checker queries the public routing dataset published by RIPE NCC, which aggregates BGP feeds from route collectors worldwide. It does not guess from a stale offline database. When you submit a query, the tool runs a short chain of lookups and returns the merged result in under two seconds for most networks.

Advertisement

Step 1: Normalise Whatever You Typed

The input box accepts four things — an IPv4 address, an IPv6 address, a domain name, or an AS number in either AS15169 or 15169 form. Paste a full URL and the tool strips the scheme and path for you. Domains resolve through a live DNS query first, then the resulting address enters the same pipeline.

Step 2: Map the Address to Its Origin AS

For an address, the tool asks the routing dataset which prefix covers it and which AS is currently announcing that prefix. This is the actual IP to ASN resolution step. Occasionally an address returns more than one origin AS — that is a MOAS (multiple origin AS) condition, and it is worth noticing because it can indicate either a legitimate multi-homed setup or a route leak.

Step 3: Pull the Full Registry and Routing Picture

Once the AS number is known, the tool fetches the registered holder name, the RIR that assigned the number, every announced prefix in both address families, the RPKI validity of the specific route, the observed upstream and downstream neighbours, and the published abuse contact.

Advertisement

Step 4: Convert Prefixes Into Something You Can Use

Raw CIDR blocks are only useful if they land in your config. The export panel converts the announced list into iptables, ipset, nginx, Cisco ACL, and MikroTik syntax on the fly, entirely in your browser. Nothing you type or export is stored on our side.

Pro Tip: Run the lookup on your own public address first to see what your ISP looks like from the outside. Check what IP you are presenting with our IP geolocation and ISP lookup, then paste that address here. The AS holder name is what abuse desks and fraud systems actually see.

Results are only useful if you can read them, so the next section breaks down every field the tool returns.

What Do Your ASN Lookup Results Actually Mean?

Each field in the result panel answers a different operational question. The AS number identifies the network, the holder name identifies the organisation, the prefix list defines its reachable footprint, and the peer lists show how it connects to everyone else. Read them together and you get a complete picture of an operator in about thirty seconds.

FieldWhat It Tells YouWhy It Matters
AS NumberUnique network identifierThe primary key for everything else
HolderRegistered organisation nameReveals ISP, cloud, or hosting provider
RIRRegistry that assigned the numberIndicates the region of registration
Covering PrefixMost specific route for the IPThe block your address actually sits in
Announced PrefixesEvery block advertised over BGPThe full firewall-ready IP range set
RPKI StatusCryptographic route authorisationFlags possible hijacks and misconfigurations
Left neighboursASNs seen left of this AS in BGP pathsUsually the transit providers it buys from
Right neighboursASNs seen right of this AS in BGP pathsUsually its customers or direct peers
Abuse ContactPublished reporting addressWhere to send a genuine abuse report

Reading the Prefix Count Correctly

Prefix count is not the same as network size. A network announcing 40 prefixes may control far more address space than one announcing 400, because a single /12 holds more addresses than four hundred /24 blocks. The tool shows both the prefix count and the total announced IPv4 address space so you can judge scale properly. If you want to work the maths yourself, our CIDR notation calculator converts any block into its exact host range.

Announced Versus Allocated

An AS can hold registry allocations it never advertises. This tool shows what is announced in BGP right now, because that is what is actually reachable and what your firewall cares about. Registry allocation data is a separate question, and our domain and IP WHOIS record lookup covers that side.

Once you can read a result, the obvious next question is how to get one without a browser at all.

How Do You Find the ASN of an IP Address From the Command Line?

You do not always need a browser. Three command-line methods return the ASN of an IP address directly, and all three work on Windows, macOS, and Linux with minor differences. The Team Cymru whois service is the fastest and has been the operator standard for over fifteen years.

Method 1: Team Cymru WHOIS (Recommended)

# Single IP, verbose output — works on macOS and Linux

whois -h whois.cymru.com " -v 8.8.8.8"

# Returns: AS | IP | BGP Prefix | CC | Registry | Allocated | AS Name

# 15169 | 8.8.8.8 | 8.8.8.0/24 | US | arin | 1992-12-01 | GOOGLE, US

Method 2: Bulk Lookup for a List of Addresses

# Create a file with "begin" and "end" wrapping your IP list

printf "begin\nverbose\n8.8.8.8\n1.1.1.1\n104.16.0.1\nend\n" > ips.txt

# Send the whole batch in one connection

netcat whois.cymru.com 43 < ips.txt

Method 3: DNS-Based Lookup (No WHOIS Client Needed)

The DNS method needs one thing done correctly or it silently returns nothing: you must reverse the octets before appending the zone name. To look up 1.2.3.4 you query 4.3.2.1.origin.asn.cymru.com.

# Target: 1.2.3.4 → reverse the octets → 4.3.2.1

dig +short TXT 4.3.2.1.origin.asn.cymru.com

# Returns: "13335 | 1.2.3.0/24 | AU | apnic | 2011-08-11"

# Windows PowerShell equivalent

Resolve-DnsName -Type TXT 4.3.2.1.origin.asn.cymru.com

# For IPv6, reverse every nibble and use origin6.asn.cymru.com

Common Mistake: Querying 1.2.3.4.origin.asn.cymru.com without reversing returns an empty result, not an error — so batch scripts fail silently and you get a file full of blanks. Test with a known address such as 8.8.8.8 first. That one is a palindrome, so it works either way and will not expose the bug. Use 1.1.1.1 and 4.3.2.1 as your real test cases instead.

Command-line lookups return one AS number. The real work usually starts when you need every address that AS controls.

Turning an ASN Into a Firewall Rule

Once you know which ASN a troublesome address belongs to, the next question is usually what to do about the rest of that network. You are typically trying to block a scraping operation, allowlist a cloud provider, or stop brute-force traffic from one hosting company.

The lookup above shows the announced prefix list for a single AS. When you need the complete set in a form you can paste, several AS numbers merged together, or adjacent blocks collapsed into fewer rules, that is what our ASN IP ranges downloader is built for. It exports to iptables, ipset, nftables, nginx, Cisco, MikroTik and a dozen other formats.

Block an Entire ASN: Four Steps

1 Identify the AS number

Take one offending IP from your logs and run it through the lookup above. Note the AS number and confirm the holder name matches the network you intend to block.

2 Export the prefix list

Search the AS number directly, switch the export format to ipset or iptables, and download the file. Check the prefix count before you commit — some networks announce thousands of blocks.

3 Load it into ipset, not raw iptables

Thousands of individual iptables rules will crush your packet-processing performance. An ipset hash matches the same list in constant time. Create the set, load the file, then reference the set from a single rule.

4 Refresh on a schedule

Networks add and drop prefixes constantly. A list you exported six months ago is already wrong. Re-export weekly, and always test on a staging host before applying to production.

The ipset Commands You Actually Need

# Create a hash set sized for a large prefix list

ipset create blockAS12345 hash:net maxelem 200000

# Load the exported file (one "ipset add" line per prefix)

ipset restore < as12345.ipset.txt

# Reference the whole set from a single iptables rule

iptables -I INPUT -m set --match-set blockAS12345 src -j DROP

# Persist across reboot on Debian/Ubuntu

ipset save > /etc/ipset.conf

Warning: Blocking an entire ASN is a blunt instrument. Blocking a major cloud provider takes out legitimate API integrations, payment webhooks, uptime monitors, and search crawlers that share the same address space. I have watched a team block AS16509 to stop a scraper and simultaneously cut off their own Stripe webhooks. Always allowlist your known integrations first.

Blocking is a reaction. Understanding why these announcements exist at all takes one more layer of explanation.

What Is BGP and How Does It Connect Autonomous Systems?

BGP — Border Gateway Protocol, standardised in IETF RFC 4271 — is the protocol that lets Autonomous Systems tell each other which IP blocks they can reach. Each AS announces its prefixes to its neighbours, those neighbours pass the announcements onward, and the accumulated result is the global routing table every internet router consults.

The scale is easy to underestimate. As of the weekly APNIC routing report dated 2 May 2026, the global IPv4 routing table held 1,049,583 prefix entries originated by 78,417 Autonomous Systems — an average of 13.38 prefixes per AS. Only 11,024 of those AS numbers carry transit for anyone else; the rest are edge networks. Every one of those entries traces back to an origin AS you can look up.

There is no central authority deciding any of it. The internet works because roughly seventy-eight thousand independent networks agree, moment to moment, to believe each other's announcements. That trust model is elegant, and it is also the single biggest weakness in internet routing.

AS Path: How Traffic Actually Travels

An AS path is the ordered list of networks a route announcement passed through. When you see AS3356 AS6939 AS15169, that route reached you via Lumen, then Hurricane Electric, then Google. Routers generally prefer the shortest AS path, which is why a geographically longer route can still win — hop count between networks matters more than physical distance.

Transit, Peering, and What the Neighbour Lists Mean

  • Transit — one network pays another to carry its traffic to the rest of the internet. These normally show up as left neighbours in the results.
  • Peering — two networks exchange traffic directly, usually without payment, often at an IXP such as DE-CIX or AMS-IX.
  • Downstream — networks that buy transit from the AS you looked up. These normally show up as right neighbours. A long right-hand list means you are looking at a carrier, not an end network.

Reading Tip — and an important caveat: An AS with many right neighbours and few left neighbours sits near the top of the routing hierarchy: a tier-1 or large tier-2 carrier. An AS with several left neighbours and no right neighbours is an end network — a hosting company, enterprise, or content provider. Be careful though: left and right describe position in the observed AS path, not a confirmed commercial contract. Treat them as a strong hint about the relationship, not proof of one.

Because BGP runs on mutual trust, a single false announcement can redirect traffic for an entire country — which is exactly the problem RPKI was built to solve.

RPKI and BGP Hijacking: How to Check Route Validity

RPKI — Resource Public Key Infrastructure, defined in RFC 6480 — lets an address holder cryptographically sign a statement declaring which AS is allowed to announce their prefix. That signed statement is a ROA (Route Origin Authorisation). When the tool above reports RPKI status, it is comparing the live announcement against the published ROA.

StatusMeaningWhat To Do
Valid (pass)A signed ROA matches this exact announcementNothing — this is the healthy state
Invalid (fail)A ROA exists but the origin AS or prefix length does not matchInvestigate — misconfiguration or active hijack
NotFound (unknown)No ROA has been published for this prefixCommon and not an error — but publish one if it is yours

What a BGP Hijack Looks Like in Practice

A BGP hijack — when a network announces address space it does not control — can be accidental or deliberate. A fat-fingered prefix in a router config looks identical to an attack in the first ten minutes. The signature is the same either way: a prefix suddenly originating from an unexpected AS, usually with a more specific mask than the legitimate announcement, because routers always prefer the most specific route.

How Much of the Internet Is Actually Signed?

Adoption is now past the halfway mark but far from complete. The APNIC routing report for 2 May 2026 counted 624,805 IPv4 prefixes with a valid ROA, 423,253 with no ROA at all, and only 1,525 registering as invalid. Roughly six in ten routes are signed. The invalid count staying that low is the encouraging part — it means most operators who sign do it correctly.

If you operate address space, publishing a ROA is the single highest-value hour of security work available to you. Networks participating in MANRS increasingly drop RPKI-invalid routes outright, which means an unsigned prefix is not just unprotected — it is also easier to hijack silently.

Practical Check: If your own prefix shows Invalid, the usual cause is a ROA created with the wrong maxLength after you started announcing more specific blocks. Fix the ROA at your RIR portal rather than withdrawing the announcement. If you suspect your address space is being abused rather than hijacked, run it through our IP blacklist and DNSBL reputation checker as well.

Routing security is one use case. Threat intelligence is where most people first meet ASN data.

How Do Security Teams Use ASN Lookup for Fraud and OSINT?

ASN lookup turns a meaningless log entry into context. A failed login from 203.0.113.44 is noise. The same login from an AS registered to a bulletproof hosting provider with 12 prefixes and no downstream customers is a signal. Analysts use the AS holder name, prefix count, and peer structure as a fast risk classifier before spending time on deeper investigation.

Datacenter Versus Residential: The Single Most Useful Signal

Consumer ISPs announce large address blocks and serve millions of subscribers. Hosting and VPN providers announce comparatively small, fragmented ranges acquired over time. When an account claims to be a home user in one country but connects from an AS belonging to a cloud provider, that mismatch is worth a flag. Our guide on telling residential and datacenter IPs apart walks through the full decision tree.

Building an Infrastructure Map

Given one server address for an organisation, an autonomous system lookup plus a reverse lookup often exposes their entire hosting footprint. Start with the AS, pull the covering prefix, then enumerate what else lives there. Our reverse IP tool for finding domains on a shared server handles the second half of that workflow, and the AWS, Azure and GCP address detector confirms whether the range belongs to a major cloud.

Where ASN Data Misleads You

  • Reseller space — a small provider may announce addresses under a larger upstream's AS, hiding the real operator
  • CDN fronting — every site behind Cloudflare or Akamai resolves to the CDN's AS, not the origin server
  • Carrier-grade NAT — thousands of unrelated mobile subscribers share one address under one AS
  • Leased address space — the registered holder may have leased the block to an entirely different company

Honest Limitation: An ASN lookup never identifies a person. It identifies a network operator. If you are investigating harassment or abuse, the AS holder's published abuse contact is your legitimate route forward — our walkthrough on tracing IP ownership for an abuse report covers what you can and cannot request.

Some AS numbers come up constantly in logs, so it helps to recognise them on sight.

Common AS Numbers Reference: Cloud, CDN and Carrier Networks

A handful of AS numbers account for a large share of the traffic most operators see. Learning to recognise them saves a lookup every time one appears in a log. Every number below can be pasted straight into the tool above to pull its current prefix list.

AS NumberOrganisationNetwork Type
AS15169GoogleContent / search infrastructure
AS13335CloudflareCDN and reverse proxy
AS16509Amazon AWSPublic cloud
AS8075MicrosoftAzure and Microsoft services
AS32934MetaSocial platform infrastructure
AS20940AkamaiCDN and edge delivery
AS3356Lumen (Level 3)Tier-1 transit carrier
AS174Cogent CommunicationsTier-1 transit carrier
AS6939Hurricane ElectricTransit and IPv6 backbone
AS24940Hetzner OnlineHosting / dedicated servers
AS14061DigitalOceanCloud VPS hosting
AS16276OVHHosting / dedicated servers

Reserved and Private AS Number Ranges

  • 64512 – 65534 — private 16-bit ASNs, per RFC 6996, never routed on the public internet
  • 4200000000 – 4294967294 — private 32-bit ASNs, used inside large enterprise and datacenter fabrics
  • AS0 — reserved by RFC 7607; a route with AS0 in the path must be discarded
  • 23456 — AS_TRANS, a compatibility placeholder for legacy 16-bit-only routers

If a lookup returns an AS in a private range, you are almost certainly querying internal infrastructure rather than public routing data. Our explainer on public versus private addressing covers the same distinction at the IP layer.

One more thing changed the free ASN tooling landscape recently, and it is worth knowing about.

Free ASN Lookup Options After BGPView Shut Down

BGPView shut down permanently on 26 November 2025, and with it went the most widely used free ASN lookup API available to small operators. Open-source projects felt it immediately — MISP warning-list generators, pfBlockerNG ASN downloads, and Wikimedia tooling all broke within days and had to be rewritten against different sources.

As of August 2026 there is still no single drop-in replacement offering the same free, documented, no-key JSON API. What exists instead is a set of partial options, each with a different trade-off.

SourceStrengthLimitation
RIPE NCC RIPEstatFree, authoritative, no key requiredMultiple endpoints to stitch together
Team Cymru WHOISFastest IP-to-ASN mapping, bulk friendlyNo prefix list or peer data
bgp.toolsExcellent depth for engineersBulk database download rather than a query API
Commercial IP data APIsPolished, single endpointPrefix and range data usually behind a paid tier
TrustMyIP ASN LookupOne query, merged result, firewall exportBrowser tool — fair-use limits apply

Why this tool exists: The gap BGPView left was never the AS number itself — the RIPE NCC RIPEstat data API has always published that freely. The gap was convenience: one query returning holder, prefixes, RPKI, and peers together, in a format you can paste straight into a firewall. That is precisely what the tool at the top of this page does.

Before you go, one distinction trips up almost everyone new to this topic.

ASN vs IP Address vs CIDR Prefix: What Is the Difference?

These three terms describe different layers of the same system, and mixing them up leads to real configuration mistakes. An ASN identifies a network operator. A CIDR prefix identifies a block of addresses that operator announces. An IP address identifies a single interface inside that block.

ConceptExampleIdentifiesScale
ASNAS13335An entire network operatorMillions of addresses
CIDR Prefix104.16.0.0/13One announced address block524,288 addresses
IP Address104.16.132.229A single host or interfaceOne address

The practical rule: block at the prefix level when you want precision, block at the ASN level when you want coverage and accept collateral damage. Never assume one AS equals one company — large organisations hold several AS numbers, and acquisitions leave the original numbers in place for years.

If subnet mathematics is where this gets confusing, our subnet mask and host range calculator and the plain-English subnet mask explainer both break it down step by step. For address-space history and why IPv6 matters here, see our breakdown of IPv4 exhaustion.

ASN Lookup: Frequently Asked Questions

What is an ASN lookup used for?

An ASN lookup identifies the network operator behind an IP address and lists every IP range that operator announces over BGP. Security teams use it to classify traffic, engineers use it to debug routing, and sysadmins use it to build accurate firewall allowlists and blocklists.

How do I find the ASN of an IP address?

Paste the address into the tool above, or run whois -h whois.cymru.com " -v 8.8.8.8" from a terminal. Both methods map the address to its origin AS using live routing data rather than a static offline database.

Can one IP address belong to two different ASNs?

Yes, briefly. A MOAS condition happens when two Autonomous Systems announce the same prefix. It can be a legitimate multi-homed or anycast setup, but it can also indicate a route leak or an active BGP hijack, so it is always worth checking the RPKI status.

How often does ASN and prefix data change?

Registry ownership changes rarely, but announced prefixes change constantly as networks add blocks, withdraw routes, or reconfigure. Any exported IP range list should be refreshed at least weekly if it feeds a production firewall rule.

Is it safe to block an entire ASN?

It works, but it is blunt. Blocking a large cloud ASN also blocks payment webhooks, API partners, uptime monitors, and search crawlers on the same network. Allowlist your known integrations first, then apply the block, and always test on staging before production.

Does this ASN lookup store my queries?

No. Queries pass to the public RIPE NCC routing dataset and results are cached briefly by AS number only — never by visitor. Nothing is written to a user profile, and all export formatting happens in your browser. See our privacy policy for full detail.

Why does my lookup return no ASN at all?

The address is not publicly routed. Private ranges such as 10.0.0.0/8 and 192.168.0.0/16, loopback addresses, CGNAT space, and reserved bogon blocks have no origin AS because no network announces them to the global routing table.

What replaced BGPView for free ASN data?

Nothing replaced it exactly. Most operators moved to RIPE NCC RIPEstat for prefix data and Team Cymru for fast bulk IP to ASN mapping. This tool merges both kinds of data into one query so you do not have to stitch endpoints together yourself. Browse our full network diagnostics toolkit for related utilities.

Related Network Intelligence Tools

Continue the investigation with the rest of the TrustMyIP toolkit.

Run a Free ASN Lookup Now
IP to ASN, BGP Prefixes and Firewall Export

Find the network behind any address, pull every announced IP range, verify RPKI validity, and export straight to your firewall. No account, no key, no rate-limit wall.

Advertisement