Glossary

ASN and ASN targeting

An ASN is an autonomous system number: it identifies which network operator and routing policy stand behind a block of IP prefixes. Proxy providers often use it to filter exit IPs by network, but it is not a country and not a residential or datacenter label.

Definition

An ASN is an Autonomous System Number. In RFC 1930's wording, an autonomous system (AS) is a connected group of one or more IP prefixes run by one or more network operators with a single, clearly defined routing policy; the ASN is the globally unique number of that system and is how BGP identifies where routing information comes from.

Numbers were originally 16 bits; RFC 6793 extended what BGP supports to 32 bits. RFC 6996 reserves two private-use ranges, 64512–65534 and 4200000000–4294967294, which must not appear in AS paths on the global Internet.

In proxy terms: every exit IP sits inside a prefix, and that prefix is announced by some ASN, so the ASN answers "which operator's network does this exit belong to?". IP-check pages and some providers' test endpoints show the ASN together with the organisation name, and some providers let you name an ASN in the request so that only exits from that network are picked.

How ASN targeting works

  1. First find the ASN of the target network. Provider docs only give examples, not a full list: Decodo demonstrates with 20057 and Oxylabs with 21928; confirm real numbers in public ASN lookup resources.
  2. Put the ASN into the request parameters. Most providers place it in the proxy username: Oxylabs writes ASN-21928, Decodo writes asn-20057, Bright Data writes -asn-<number> or lets you send the brd-exit-asn request header instead.
  3. The gateway picks an IP only from exits that belong to that ASN. If the pool has no available exit, the provider returns an error; for example the Oxylabs docs state a 502 Bad Gateway response.
  4. Check the exit's ASN and organisation with a test endpoint. The Oxylabs test endpoint aggregates data from MaxMind, IP2Location, DB-IP and IPinfo; this site's IP check page also shows the ASN of your current exit.

What it is good for

  • Filtering exits by network: when you only want the network of one broadband or mobile operator, an ASN is more precise than picking just a country or city. Decodo's docs describe it as locking onto the IPs of a specific carrier.
  • Verifying exit origin: read the current exit's ASN and organisation name from an IP check page to confirm which network the traffic actually leaves from, instead of trusting only the plan page description.
  • Reproducing network-specific problems: when a page behaves differently on different operators' networks, pinning the ASN narrows the variables.
  • Analysing rejected requests: record the exit ASN to see whether failures cluster on particular networks, then decide whether to slow down or change the exit type.

ASN targeting syntax in three providers' docs

Provider (official docs)SyntaxRelation to other parametersLimits stated in the docs
Bright Data-asn-<number> / brd-exit-asnThe header overrides the username, and the username overrides the console default locationResidential networks only; IPv6 residential does not support ASN; residential access requires KYC
Decodoasn-<number>Cannot be combined with country, state, city, ZIP, continent or geohashThe docs give a single example number and no full list
OxylabsASN-<number>If a country parameter is also given, only the country appliesNo available exit returns 502; some ASNs return 403 restricted ASN until KYC is completed

This only excerpts how each doc writes the parameter; see the verification date at the foot of the page. Docs change, so check the official page before use. This site has not tested these parameters.

ASN versus IP type versus geographic location

ConceptQuestion it answersNotes
IP prefix (CIDR block)Which contiguous range of addresses does this IP belong to?One ASN usually announces several prefixes
ASNWhich operator's network announces these prefixes?Per RFC 1930 it is the unit of routing policy, not a company name or a country
Residential, datacenter, mobileHow does the provider or a database classify this exit?The classification comes from the provider or third-party databases; it is not a field carried by the ASN itself
Country, cityRoughly where is the exit located?An estimate from geolocation databases; one ASN may cover several regions

Limitations

  • An ASN identifies a routing entity, not a location. One ASN can span several countries or cities, which is why in the Decodo and Oxylabs docs the ASN parameter is exclusive with, or overridden by, country and city parameters.
  • Targeting shrinks the usable pool. If the chosen ASN has no online exit in the provider's pool the request fails; the Oxylabs docs say it returns 502 in that case.
  • Some ASNs may need extra vetting. The Oxylabs docs mention a 403 for certain ASNs when the account has not completed KYC; Bright Data's residential network itself requires KYC approval.
  • Different databases can give different ASN, organisation and type results for the same IP; the Oxylabs test endpoint aggregates four databases for this reason. State which source you used when drawing conclusions.
  • ASN targeting cannot guarantee that a target site accepts the request. Whether a site lets traffic through depends on its own policy and your request behaviour; this page makes no promise about results.
  • Private ASNs should not enter global routing. RFC 6996 requires them to be removed from AS paths before advertisement, so public lookup results should show registered ASNs.
  • Focused review 2026-11-23: under RFC 9582, a ROA authorizes an origin ASN for IP prefixes; maxLength limits the length of more-specific announcements. It does not certify residential status, location or IP reputation, or validate the whole BGP path.

Common misconceptions

  • Myth: the ASN tells you whether an IP is residential or datacenter. In fact an ASN only says who announces the address block; residential versus datacenter is a separate classification that comes from the provider or third-party databases, and databases may disagree.
  • Myth: an ASN is a country. In fact an ASN is an operator's routing unit and a network can operate across regions; geography comes from geolocation databases.
  • Myth: choosing an ASN gives you a cleaner IP. In fact an ASN only restricts which network the exit belongs to; it says nothing about reputation or about not being restricted.
  • Myth: an ASN is only a 16-bit number. In fact since RFC 6793 an ASN can be 32 bits, with an upper limit of 4294967295.
  • Myth: ASN targeting is an ISP proxy. In fact an ISP proxy is a product type, while ASN targeting is a parameter that filters a rotating pool by network; they can be related but are not the same thing.
  • Targeted review 2026-11-19: ASN 23456 (AS_TRANS) is the transitional placeholder in RFC 6793 when a legacy two-octet AS_PATH cannot represent a four-octet ASN. It does not establish that different routes belong to one real network; consider AS4_PATH and related information.

Example

After pinning an ASN on Oxylabs residential proxies, request its test address (username and password are placeholders; the syntax is taken from its official docs):

curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-ASN-21928:PASSWORD" https://ip.oxylabs.io/location

The returned JSON includes asn and organization fields, so you can check whether the exit belongs to the expected network; if the pool has no exit for that ASN you get a 502. You can also skip any proxy and open this site's IP check page to see the ASN and organisation of your own current exit. Fictional documentation example: a ROA authorizes AS64496 for 203.0.113.0/24 with maxLength 26. A /25 inside that range may match; a /27 cannot. With maxLength absent, only the exact /24 is authorized. A missing ROA alone does not establish a malicious proxy.

Related terms and pages

Examples of providers whose docs state ASN targeting support (per their official material):

Sources and checks

Date checked: 2026-11-14

This page is compiled from public standards and documentation; no hands-on test was carried out.