Address Management in IPv6

Michael Sinatra michael at rancid.berkeley.edu
Tue Jan 4 18:31:38 CET 2011


On 01/04/11 05:46, Martin Millnert wrote:
> Hi,
>
> On Tue, 2011-01-04 at 15:39 +0200, Graham Beneke wrote:
>> What tools are available for tracking and recording IPv6 assignments
>> within an organisation? Does anyone have good or bad experiences with
>> particular apps?
>
> Postgresql has a very useful 'inet' data type with related functions and
> operators. (It also has 'mac-addr'.)

Just to throw in an additional plug, Postgresql's inet data type 
supports both v4 and v6 (and it knows which is which), and also supports 
various types of address abbreviation formats.  For example, if the 
'address' field is type inet, then:

SELECT * FROM <table> WHERE address = 
'2607:f140:ffff:ffff:0000:0000:0000:1234';

and

SELECT * FROM <table> WHERE address = '2607:f140:ffff:ffff::1234';

will both match the same record.  The mac_addr type is similarly useful 
in that it matches MAC addresses in a variety of formats (e.g. 
hh:hh:hh:hh:hh:hh and hhhh.hhhh.hhhh).  Finally, there's a cidr type, 
which allows netblocks to be stored and can facilitate matching an 
address to a netblock.  Postgresql makes a great backend store for 
network management applications.  (I just did an NDP cache 
scraper-and-storage-retrieval script that stores NDP data in Postgresql.)

michael




More information about the ipv6-ops mailing list