Re: [nbs] NBS and TCP connection identification

Javier Ubillos <jav@sics.se> Tue, 21 September 2010 11:18 UTC

Return-Path: <jav@sics.se>
X-Original-To: nbs@core3.amsl.com
Delivered-To: nbs@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3A1423A6938 for <nbs@core3.amsl.com>; Tue, 21 Sep 2010 04:18:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.251
X-Spam-Level:
X-Spam-Status: No, score=-1.251 tagged_above=-999 required=5 tests=[AWL=-0.998, BAYES_00=-2.599, HELO_EQ_SE=0.35, J_CHICKENPOX_33=0.6, MIME_QP_LONG_LINE=1.396]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TESiwkeRZeM0 for <nbs@core3.amsl.com>; Tue, 21 Sep 2010 04:18:48 -0700 (PDT)
Received: from letter.sics.se (letter.sics.se [193.10.64.6]) by core3.amsl.com (Postfix) with ESMTP id 010223A69AC for <nbs@ietf.org>; Tue, 21 Sep 2010 04:18:48 -0700 (PDT)
Received: from [193.10.66.36] (bit.sics.se [193.10.66.36]) (Authenticated sender: jav@sics.se) by letter.sics.se (Postfix) with ESMTPSA id EB206400EB; Tue, 21 Sep 2010 13:19:10 +0200 (CEST)
From: Javier Ubillos <jav@sics.se>
To: Erik Nordmark <erik.nordmark@oracle.com>
In-Reply-To: <4C9826D0.2060703@oracle.com>
References: <4C97D9A8.2050001@oracle.com> <ACE9611A-9107-46EC-ADD2-56E553DC1C3A@ericsson.com> <4C9826D0.2060703@oracle.com>
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Yr3U5gfBQR4KrsQg6TxK"
Date: Tue, 21 Sep 2010 13:19:10 +0200
Message-ID: <1285067950.2068.59.camel@bit>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.3
Cc: Christian Vogt <christian.vogt@ericsson.com>, nbs@ietf.org
Subject: Re: [nbs] NBS and TCP connection identification
X-BeenThere: nbs@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Name based sockets discussion list <nbs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/nbs>, <mailto:nbs-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nbs>
List-Post: <mailto:nbs@ietf.org>
List-Help: <mailto:nbs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nbs>, <mailto:nbs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Sep 2010 11:18:49 -0000

On Mon, 2010-09-20 at 20:30 -0700, Erik Nordmark wrote:
> On 09/20/10 06:15 PM, Christian Vogt wrote:
> > Hi Erik:
> >
> > Thanks for reviewing both documents.  A few comments; Javier will
> > fill in the rest.
> >
> > - You are right that TCP connections will be identified by a pair of
> > DNS names.  Implementation-wise, this could be realized by hashing
> > the DNS names into 128-bit strings.  Then, a TCP-for-IPv6
> > implementation could pretty much be reused.
> 
> But that requires that the hash of the DNS name be carried in the TCP 
> SYN and SYN|ACK, since you can't setup that state after the connection 
> is setup. This adds complexity (and the details are missing) since TCP 
> needs to handle both a NBS peer and a normal TCP peer (the latter will 
> create a connection based on the IP addresses.)
> I don't know how this is intended to work for UDP.

Perhaps I misunderstand your concern, but I'll try to answer.
On the individual host, there is a change to the implementation in the
sense that the 4-tuple is now 
name, service (port), name service(port)
instead of the prevous
ip, port, ip port.

There are no changes to the "on the wire" protocol.

There are two ways of doing this.
1. Hashing the name into something that fits into the ip-address field.
2. Having a specialized TCP implementation.

I promote alternative 2.
In fact, we already have that bit working in the prototype.

> > - Security-wise, the idea is to bind DNS names to IP addresses by
> > means of a forward lookup in the DNS.  This gives the same level of
> > security that we have for DNS-based applications today, except that
> > the forward lookup would not just be done by the connection
> > initiator, but also by the connection responder.  Where higher
> > security is required, we recommend DNSSEC.  Thus we can avoid extra
> > cryptographic identifiers.
> 
> If X can predict that A will talk to B (using port1/port2), then X can 
> send a SYN claiming to have A's name (and port1) destined to B/port2.
> Later when A sends its SYN something on B has to be able to resolve 
> things. The easy way is to verify that the initiator actually "owns" the 
> name A before creating the TCP state for A/port1.
> 
> I don't understand what you mean by the forward lookup being done by the 
> responder. Clearly the responder can't do a forward lookup when it 
> receives a SYN packet, because that can be used to DoS the responder out 
> of existence.

Hmmm, you might have a point here.
We're going to have to consider this more.

There are two ideas on the table:
a) Do nothing. 
b) When receiving a name in an option, resolve that name and compare
IP's with the just received IP.

Case a) _will_ happen if the name is not a resolvable FQDN.
Case b) ... perhaps this is an issue we need to look at.
I need to do some readingup on the subject.

> 
> > - Hosts that don't have a name registered in the DNS will derive a
> > DNS name from their IP address.  This will give them session
> > continuity, albeit no reachability.
> 
> But that doesn't allow them to use SHIM6 to move around.
> A CBID as a name allows them to move around.

It does, in the most primitive scenario, one enters an IP into the
name-based socket, and that IP is used just as a label.

// Javier