Re: [v6ops] IPv6 prefix to use to store IPv4 prefixes in an IPv6 IP Address Managment System?

Mark Smith <ipng@69706e6720323030352d30312d31340a.nosense.org> Tue, 17 May 2011 22:52 UTC

Return-Path: <ipng@69706e6720323030352d30312d31340a.nosense.org>
X-Original-To: v6ops@ietfa.amsl.com
Delivered-To: v6ops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3D5D9E06D8 for <v6ops@ietfa.amsl.com>; Tue, 17 May 2011 15:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.02
X-Spam-Level:
X-Spam-Status: No, score=-2.02 tagged_above=-999 required=5 tests=[AWL=-0.125, BAYES_00=-2.599, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQ7ivygX6KPJ for <v6ops@ietfa.amsl.com>; Tue, 17 May 2011 15:52:55 -0700 (PDT)
Received: from smtp3.adam.net.au (smtp3.adam.net.au [202.136.110.249]) by ietfa.amsl.com (Postfix) with ESMTP id 4DDD4E068E for <v6ops@ietf.org>; Tue, 17 May 2011 15:52:55 -0700 (PDT)
Received: from 219-90-253-138.ip.adam.com.au ([219.90.253.138] helo=opy.nosense.org) by smtp3.adam.net.au with esmtp (Exim 4.63) (envelope-from <ipng@69706e6720323030352d30312d31340a.nosense.org>) id 1QMT8H-0000Ts-Dt; Wed, 18 May 2011 08:22:53 +0930
Received: from opy.nosense.org (localhost.localdomain [IPv6:::1]) by opy.nosense.org (Postfix) with ESMTP id C45C63B338; Wed, 18 May 2011 08:22:52 +0930 (CST)
Date: Wed, 18 May 2011 08:22:52 +0930
From: Mark Smith <ipng@69706e6720323030352d30312d31340a.nosense.org>
To: Ray Hunter <v6ops@globis.net>
Message-ID: <20110518082252.7a7addc5@opy.nosense.org>
In-Reply-To: <4DD28187.6000806@globis.net>
References: <4DD28187.6000806@globis.net>
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-unknown-linux-gnu)
X-Location: Lower Mitcham, South Australia, 5062
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Cc: "v6ops@ietf.org WG" <v6ops@ietf.org>
Subject: Re: [v6ops] IPv6 prefix to use to store IPv4 prefixes in an IPv6 IP Address Managment System?
X-BeenThere: v6ops@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: v6ops discussion list <v6ops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/v6ops>, <mailto:v6ops-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/v6ops>
List-Post: <mailto:v6ops@ietf.org>
List-Help: <mailto:v6ops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/v6ops>, <mailto:v6ops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 May 2011 22:52:56 -0000

Hi Ray,

On Tue, 17 May 2011 16:09:11 +0200
Ray Hunter <v6ops@globis.net> wrote:

> I recently coded a system where I handled the IPv4 addresses as IPv4 
> mapped IPv6 addresses = ::ffff:a.b.c.d addresses in a single table for 
> all prefixes for an application. It was convenient in the end, but it 
> took quite a lot of code to handle the special human readable forms 
> properly.
> 
> I can let you have the PERL library if you want.
> 

Thanks for the offer. For me it is mostly a theoretical question,
although I know somebody who because of time constraints is having to
quickly write an IPv6 only IPAM. It was when I thought about some
of the IPv4 IPAM issues they have that it occurred to me that an IPv6
IPAM could hold IPv4 prefixes with an appropriate representation.

Is your PERL library on cpan?

(You may be interested in a PERL module that decodes IPv6 DHCPv6 DUIDs
that a college of mine wrote -  Net::DHCPv6::DUID::Parser)


> I would certainly avoid use of deprecated addresses ::0000:a.b.c.d. 
> There is some overlap e.g. ::1 & ::0
> 
> I also found some problems with libraries handling things like ::ffff:10.0
> 
> Another equally valid approach is to use completely separate tables for 
> IPv4 and IPv6, depending on your application.
> 
> How, for example, in a firewall rules system, would you distinguish a 
> match rule for an IPv4 mapped IPv6 address being carried over a native 
> IPv6 packet, versus a normal native IPv4 encapsulated packet? You'd 
> anyway need to keep track of the encapsulation on the wire.
> 
> http://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02
> 
> Sometimes it's just better to treat IPv4 and IPv6 as completely separate 
> address families.
> 
> best regards,
> RayH
> 
> > Subject:
> > [v6ops] IPv6 prefix to use to store IPv4 prefixes in an IPv6 IP 
> > Address Managment System?
> > From:
> > Mark Smith <ipng@69706e6720323030352d30312d31340a.nosense.org>
> > Date:
> > Tue, 17 May 2011 20:44:23 +0930
> >
> > To:
> > v6ops@ietf.org
> >
> > Content-Transfer-Encoding:
> > 7bit
> > Precedence:
> > list
> > MIME-Version:
> > 1.0
> > Message-ID:
> > <20110517204423.2e2d2bc7@opy.nosense.org>
> > Content-Type:
> > text/plain; charset=US-ASCII
> > Message:
> > 4
> >
> >
> > Hi,
> >
> > It recently occurred to me that it could be useful to store IPv4 prefix
> > information in an IPv6 IP address management system, so that both IPv4
> > and IPv6 prefix information are kept in the same address
> > management database.
> >
> > The only question I have about doing that is what IPv6 prefix to use
> > for these IPv4 prefix entries. The deprecated IPv4-Compatible IPv6
> > Address format would be convenient for this purpose as all bits
> > preceding the IPv4 prefix are zeros, making these entries very easy to
> > spot if you happen to be looking at the IPv6 form of them. Would that
> > be safe and reasonable to use the ::/96 prefix? Would it be worth me
> > writing up an ID proposing the recycing of this form of IPv6 address
> > for this purpose?
> >
> > Thanks,
> > Mark.
> >
> >