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

Dan Wing <dwing@cisco.com> Tue, 06 May 2014 06:02 UTC

Return-Path: <dwing@cisco.com>
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 C3A531A073F for <pcp@ietfa.amsl.com>; Mon, 5 May 2014 23:02:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.152
X-Spam-Level:
X-Spam-Status: No, score=-15.152 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] 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 9OCEG7fjMt7X for <pcp@ietfa.amsl.com>; Mon, 5 May 2014 23:02:03 -0700 (PDT)
Received: from mtv-iport-3.cisco.com (mtv-iport-3.cisco.com [173.36.130.14]) by ietfa.amsl.com (Postfix) with ESMTP id 40B3B1A073E for <pcp@ietf.org>; Mon, 5 May 2014 23:02:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3260; q=dns/txt; s=iport; t=1399356120; x=1400565720; h=mime-version:subject:from:in-reply-to:date:cc: content-transfer-encoding:message-id:references:to; bh=7tuyLIqNIG9YQ2gAnfZT/QiCJFdnQCF/40KBsiQ5HFc=; b=j6gMMuQjhQLqNvbtg2etv19bO3kafm3MzgXXafFSOz6VFCmAShElgNsH noMQA9+g8BwhuPu6fDCHNVPgrFNnwK3UaB1+mWiq8Is2e+Zmc2GmkWZuM KsTbLdHP7VQdKe4B7M78Pu6UOO/q+l3KtZE8pRI7ZerQH/wSYCIVxg9BL U=;
X-IronPort-AV: E=Sophos;i="4.97,994,1389744000"; d="scan'208";a="109452375"
Received: from mtv-core-2.cisco.com ([171.68.58.7]) by mtv-iport-3.cisco.com with ESMTP; 06 May 2014 06:01:59 +0000
Received: from [10.21.102.179] ([10.21.102.179]) by mtv-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id s4661VT1021109; Tue, 6 May 2014 06:01:32 GMT
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\))
From: Dan Wing <dwing@cisco.com>
In-Reply-To: <2B975F36-4E46-4D93-891B-DB4E480FF190@iki.fi>
Date: Mon, 05 May 2014 23:01:31 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <320291FF-E45B-40E6-9D54-617419713506@cisco.com>
References: <FDB45976-B7A3-4C59-B2D1-C01982D0205F@iki.fi> <45A697A8FFD7CF48BCF2BE7E106F06040B8C957D@xmb-rcd-x04.cisco.com> <2B975F36-4E46-4D93-891B-DB4E480FF190@iki.fi>
To: Markus Stenberg <markus.stenberg@iki.fi>
X-Mailer: Apple Mail (2.1874)
Archived-At: http://mailarchive.ietf.org/arch/msg/pcp/Kg9Cd8WgdyA-oXRqoinFMVwc9h4
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: Tue, 06 May 2014 06:02:04 -0000

On May 5, 2014, at 1:14 PM, Markus Stenberg <markus.stenberg@iki.fi> wrote:

> 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.

Correct, nothing prevents it.  But C is unable to show it owns another address (so can't use THIRD_PARTY), and link-local doesn't do anything on the other side of the router (firewall), so seems fruitless for C's PCP client to use link local.  I would even think P or any PCP server should just return an error if the PCP request came from an IPv6 link local address and the proxy (or PCP server) is not doing NPTv6 or NAT66.  Link local can't go anywhere, so seems an error no matter if proxy or PCP server returns an error -- link-local won't do any good as a firewall rule because it isn't routable from the Internet.

-d


> 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.
> 
> 
> _______________________________________________
> pcp mailing list
> pcp@ietf.org
> https://www.ietf.org/mailman/listinfo/pcp