wikiroute

networking recipes

User Tools

Site Tools


who_is_using_this_ip_address

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
who_is_using_this_ip_address [2014/02/09 12:47] – [2- Using BGP Information] samerwho_is_using_this_ip_address [2014/02/09 13:04] – [3- A Do-It-Yourself BGP Query Service] samer
Line 113: Line 113:
 </code> </code>
 ===== -- A Do-It-Yourself BGP Query Service ===== ===== -- A Do-It-Yourself BGP Query Service =====
 + 
 +When accessing the online servers (Riswhois, Cymru or legacy whois servers) is not possible or not recommended, an autonomous implementation of an equivalent server is possible. This can be the case when service availability constraints are very tight or when the Internet connection is not permanent. 
 +Here are some hints and recipes to implement a server that maps IP prefixes with AS numbers based on BGP information. 
  
-Start by downloading multiple routing tables for routeviews or RIPE RIS servers. Transform these tables into parsable format bu using bgpdump. Use any scripting language to perform a best prefix match and output the origin AS of your desired IP prefix.+==== Basic Steps ==== 
 + 
 +Start by downloading raw BGP data collected by RIPE NCC servers from http://www.ripe.net/data-tools/stats/ris/ris-raw-data. For example, the latest data file from RRC0 (Amsterdam) is always available on http://data.ris.ripe.net/rrc00/latest-bview.gz. 
 + 
 +<code> 
 +$ wget http://data.ris.ripe.net/rrc00/latest-bview.gz  
 +</code> 
 + 
 +As raw data is written in MRT format, you need to install [[https://bitbucket.org/ripencc/bgpdump/wiki/Home | bgpdump]] in order to parse it easily.  
 + 
 +<code> 
 +$ zcat latest-bview.gz | bgpdump -m - > latest-bview-parsed.txt 
 +</code>  
 + 
 +Use any scripting language to perform a best prefix match and output the origin AS of your desired IP prefix.
who_is_using_this_ip_address.txt · Last modified: 2014/02/15 23:31 by samer