[racktables-users] IPv6 storage options

  • From: Michael Richardson <mcr@xxxxxxxxxxxx>
  • To: racktables-users <racktables-users@xxxxxxxxxxxxx>
  • Date: Thu, 02 Sep 2010 09:56:21 -0400

(Is this a repeat? It was marked unsent...)

I took a look at the database model for the IPv4 addresses.
I do not see from a database point of view, why the various "ip" fields
couldn't just be expanded from int(10) to decimal(40):
         echo '2^128' | bc | wc -c

MySQL says that there is a difference at 5.0.3 in how things are stored.

The problem that I see with this is that php doesn't have a
corresponding 128bit value that can be manipulated easily.

As such I would tend towards having a 40 character ascii field in the
database, which can store the maximum sized IPv6 address in
*presentation* format.  We do not do arithmetic on it that often,
compared to displaying it, so it seems like a win to me.

As such I would copy the essential structure of the 
  IPv4Address
  IPv4Allocation
  IPv4LB        
  IPv4NAT               <-- well, maybe not!
  IPv4Network   
  IPv4RS        
  IPv4RSPool    
  IPv4VS

I have copied these to IPv6, and adapted code and done some refactoring
last week, and I can see entries, but I haven't done editing yet.


-- 
]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] mcr@xxxxxxxxxxxxxxxxxxxxxx http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
                       then sign the petition. 

Other related posts:

  • » [racktables-users] IPv6 storage options - Michael Richardson