Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How IP addresses are mapped to Autonomous System Numbers (ASNs)? Is there any reference database for it? Then how are these Autonomous Systems are geographically located?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Note: This information is kind of RIPE-centric because that's the RIR I deal with most.

The relationships between IPs (inet-num) and ASNs (aut-num) are documented in public Internet Routing Registries (IRR) using Routing Policy Specification Language (RPSL). IRRs are simply whois databases which provide additional object types (route, route-set, aut-num, as-set, etc) to store the RPSL information. IRRs are operated by all Regional Internet Registries (RIRs such as RIPE, ARIN, etc) as well as some other parties such as RADB.

RPSL can define not just which aut-num relates to which inet-num objects but also the transit and peering arrangements of a given aut-num. This information can be used to build router configurations such as with the utility RtConfig. Additionally some LIRs document their policies for accepting new peering requests and the BGP communities they make available to their peers here.

It's important to note that besides automatically configuring routers with RPSL there isn't any "magic glue" between the IRR data and what is actually happening in the wild. RPSL is a best effort practice, which should be kept up to date, but doesn't mean there's any technical barrier to announcing a route without first publicising it in RPSL.

As an example, let's see what routes are documented for the BBC website:

dan.carley@jim ~ $ whois -T route $(dig +short bbc.co.uk)
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Note: This output has been filtered.
%       To receive output for a database update, use the "-B" flag.

% Information related to '212.58.224.0/22AS2818'

route:        212.58.224.0/22
descr:        BBC
origin:       AS2818
mnt-by:       BBC-MNT
source:       RIPE # Filtered

% Information related to '212.58.224.0/20AS2818'

route:        212.58.224.0/20
descr:        BBC (EU network)
origin:       AS2818
mnt-by:       BBC-MNT
source:       RIPE # Filtered

% Information related to '212.58.224.0/19AS2818'

route:          212.58.224.0/19
descr:          BBC
origin:         AS2818
mnt-by:         BBC-MNT
source:         RIPE # Filtered

This indicates that their website will be available from three routes of increasing size (/19, /20 and /22 to the same prefix) via AS2818. Querying that ASN will then give us some additional information about their peers and policies (snipped for brevity):

dan.carley@jim ~ $ whois -T aut-num as2818
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

% Note: This output has been filtered.
%       To receive output for a database update, use the "-B" flag.

% Information related to 'AS2818'

aut-num:        AS2818
as-name:        BBC
descr:          BBC Internet Services, UK
import:         from AS174 action pref=100; accept AS174
import:         from AS286 action pref=100; accept AS-KQ AS-QWEST
import:         from AS553 action pref=100; accept AS-BELWUE
import:         from AS702 action pref=50; accept AS-UUNETUK
[..]
export:         to AS174 announce AS-BBC
export:         to AS286 announce AS-BBC
export:         to AS553 announce AS-BBC
export:         to AS702 announce AS-BBC
[..]
share|improve this answer
add comment

There is no static mapping between IPs and AS and an AS don't have a location.
An AS is a number assigned to a company to identify them on Internet. It's used for the BGP routing protocol.
The company tell with BGP that some network IPs (let's say network Y) are reachable inside of his AS (let's say AS X). Then others companies know that to reach network Y they must talk to AS X, with this information others company routers look for the best path to reach AS X.
Nothing prevent some networks to be advertised on many AS (and this is used in some particular case). To see a dynamic mapping of what is announced on Internet in 'real time', you can use this website. This how ATT AS information, by looking in the Prefixes IPv4 tab you will see what network they advertise. But there is no official mapping as anyone can announce anything.

share|improve this answer
    
See Dan answer regarding a mapping, but looking on the website I tell provide the true information advertised on Internet. RPSL is more or less reliable. (from my point of view it can't be trusted without a verification) –  radius Apr 30 '10 at 8:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.