Re: [pcp] How can I make a ~stateless forwarding PCP proxy again?

Markus Stenberg <markus.stenberg@iki.fi> Mon, 05 May 2014 20:15 UTC

Return-Path: <markus.stenberg@iki.fi>
X-Original-To: pcp@ietfa.amsl.com
Delivered-To: pcp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EBCFB1A0195 for <pcp@ietfa.amsl.com>; Mon, 5 May 2014 13:15:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AN3CavI_dZiL for <pcp@ietfa.amsl.com>; Mon, 5 May 2014 13:15:15 -0700 (PDT)
Received: from jenni1.inet.fi (mta-out1.inet.fi [62.71.2.198]) by ietfa.amsl.com (Postfix) with ESMTP id 40A6D1A0156 for <pcp@ietf.org>; Mon, 5 May 2014 13:15:14 -0700 (PDT)
Received: from [192.168.43.129] (80.220.67.193) by jenni1.inet.fi (8.5.140.03) (authenticated as stenma-47) id 534D293001840916; Mon, 5 May 2014 23:15:02 +0300
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\))
From: Markus Stenberg <markus.stenberg@iki.fi>
In-Reply-To: <45A697A8FFD7CF48BCF2BE7E106F06040B8C957D@xmb-rcd-x04.cisco.com>
Date: Mon, 05 May 2014 22:14:57 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <2B975F36-4E46-4D93-891B-DB4E480FF190@iki.fi>
References: <FDB45976-B7A3-4C59-B2D1-C01982D0205F@iki.fi> <45A697A8FFD7CF48BCF2BE7E106F06040B8C957D@xmb-rcd-x04.cisco.com>
To: "Reinaldo Penno (repenno)" <repenno@cisco.com>
X-Mailer: Apple Mail (2.1874)
Archived-At: http://mailarchive.ietf.org/arch/msg/pcp/pjsDpRDNDCDSgwjOu33518ddb9E
Cc: "pcp@ietf.org" <pcp@ietf.org>
Subject: Re: [pcp] How can I make a ~stateless forwarding PCP proxy again?
X-BeenThere: pcp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: PCP wg discussion list <pcp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pcp>, <mailto:pcp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/pcp/>
List-Post: <mailto:pcp@ietf.org>
List-Help: <mailto:pcp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pcp>, <mailto:pcp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 05 May 2014 20:15:18 -0000

On 5.5.2014, at 21.41, Reinaldo Penno (repenno) <repenno@cisco.com> wrote:
> we had this discussion in the past but and I, for one, backed the idea of PCP being able to support stateless proxies.  So, you are not alone there but maybe you want to write a draft about it so the WG can discuss it.


Nods. Personally I like to minimize the amount of state in a system, so I’m a fan of stateless designs. My current design for a proxy has just 3 logical pieces of ‘state’ per supported remote server:

- (client) source prefix + prefix length to match
- address of the server
- server epoch + when was it received

And currently I’m trying to make sure it’s actually doable to do all I want with just that and few hundred lines of C. After looking at how big PCP client libraries are, last thing I want is really PCP client glued to PCP server.

Getting back to my previous question, now that I think of it, actually, the IP address of the client is in the THIRD_PARTY option. Only thing that isn’t explicitly stored somewhere is the address client contacts the proxy on (it probably has 1-N addresses per M interfaces). If proxy uses same source address for talking with server as client used to contact it (with different port, obviously), it should work fine, without per-client or per-request state. 

e.g.

C -> P [IntIP=C]
P -> S [IntIP=P, TP=C]
S -> P [TP=C]
P -> C [no TP]

Beyond that, some ANNOUNCE handling is needed, but as long as you stick to multicast, that can be also stateless. (Connected clients know if they have state with the particular proxy that spams ANNOUNCEs.)

Perhaps I’ll write up about it somewhere (pcp or homenet), although it’s more of an implementation detail draft, than actual protocol change requiring one.

Cheers,

-Markus

P.S. This scheme works fine with IPv4. With IPv6, it may have issues, when C contacts P using link-local address and I don’t think there is anything preventing that. P is probably unable to contact S using that. Oh well. I guess doing other IPv6 scopes would work, and falling back to IPv4 if client doesn’t do DHCP*/RA/something else option to learn the IPv6 GUA/ULA of the proxy on first hop.