ipmap

create 2D visualizations of IP address space

Download:
  • ipmap-0.2.tar.gz [BSD Licence]
  • Example:
    We start with the following text files:
    $ ls *.txt
    bogon-bn-agg.txt loopback.txt     multicast.txt    private.txt
    
    Each file contains a list of IPv4 prefixes in CIDR format. For example:
    $ cat private.txt 
    172.16.0.0/12
    192.168.0.0/16
    10.0.0.0/8
    
    We now run ipmap (-p /20 means each pixel represents a /20):
    $ ./ipmap -p /20 bogon-bn-agg.txt private.txt loopback.txt multicast.txt 
    Represents one pixel:  /20
    Total address space:   /0
    Image width:           1024 pixels
    Image size:            4194304 bytes (4 bytes/pixel)
    
    allocating and blanking image...
    ipmap allocated successfully
    reading prefixes from bogon-bn-agg.txt...
    0...
    reading prefixes from private.txt...
    0...
    reading prefixes from loopback.txt...
    0...
    reading prefixes from multicast.txt...
    0...
    writing result image to PNG file: ipmap.png
    done.
    

    The result is 'ipmap.png' which is a visualization of those four sets of prefixes in relation to all of 32-bit IPv4 space:

    We can also zoom in on a specific /8 network such as 172.16.0.0/12:
    $ ./ipmap -f 172.16.0.0/12 -t /8 -p /24 private.txt 
    

    Which produces:

    Documentation:
  • ipmap.1 manpage - C/C++ programmer's reference
  • BGP/Darknet Data Visualization With Google Maps - project page with more information on quad trees and an example use case.