Re: [IPsec] draft-xu-ipsecme-esp-in-udp-lb-07

Antony Antony <antony.antony@secunet.com> Thu, 01 April 2021 13:36 UTC

Return-Path: <antony.antony@secunet.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EC8CC3A11E8 for <ipsec@ietfa.amsl.com>; Thu, 1 Apr 2021 06:36:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 jG2NleBt9aiT for <ipsec@ietfa.amsl.com>; Thu, 1 Apr 2021 06:36:22 -0700 (PDT)
Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 696963A11E6 for <ipsec@ietf.org>; Thu, 1 Apr 2021 06:36:21 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 93611205A4; Thu, 1 Apr 2021 15:36:18 +0200 (CEST)
X-Virus-Scanned: by secunet
Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7JScmw1_lKLx; Thu, 1 Apr 2021 15:36:17 +0200 (CEST)
Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id AE1CF20512; Thu, 1 Apr 2021 15:36:17 +0200 (CEST)
Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 1 Apr 2021 15:36:17 +0200
Received: from moon.secunet.de (172.18.26.121) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 1 Apr 2021 15:36:17 +0200
Date: Thu, 01 Apr 2021 15:36:15 +0200
From: Antony Antony <antony.antony@secunet.com>
To: "Bottorff, Paul" <paul.bottorff@hpe.com>
CC: "antony.antony@secunet.com" <antony.antony@secunet.com>, IPsec <ipsec@ietf.org>
Message-ID: <20210401133615.GB27893@moon.secunet.de>
Reply-To: antony.antony@secunet.com
References: <CS1PR8401MB11928BE251D4B6E05184D941FE619@CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM> <20210331103220.GA21137@moon.secunet.de> <CS1PR8401MB119267E038AFBDFD996F0441FE7C9@CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CS1PR8401MB119267E038AFBDFD996F0441FE7C9@CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM>
Precedence: first-class
Priority: normal
Organization: secunet
User-Agent: Mutt/1.10.1 (2018-07-13)
X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197)
X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/lKiRzTsn6nqmWmvAAuFkZwh5PqA>
Subject: Re: [IPsec] draft-xu-ipsecme-esp-in-udp-lb-07
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Apr 2021 13:36:28 -0000

On Wed, Mar 31, 2021 at 23:38:01 +0000, Bottorff, Paul wrote:
> Hi Antony:
> 
> Below,
> 
> Cheers,
> 
> Paul
> 
> 
> 
> -----Original Message-----
> From: IPsec [mailto:ipsec-bounces@ietf.org] On Behalf Of Antony Antony
> Sent: Wednesday, March 31, 2021 3:32 AM
> To: Bottorff, Paul <paul.bottorff@hpe.com>; IPsec <ipsec@ietf.org>
> Cc: antony.antony@secunet.com
> Subject: Re: [IPsec] draft-xu-ipsecme-esp-in-udp-lb-07
> 
> Hi,
> 
> This is an interesting draft. I would love to see a generic solution for network paths and receiver use cases, such as RSS.
> 
> PB>> Can you explain your use case for RSS a little more? I'd guess you are looking at LB around the RSS queues to get better distribution for the decodes.
> <<

We are using muliple SAs, with identical Traffic Selectors, to
load balance IPsec traffic between IPsec peers.
https://datatracker.ietf.org/doc/draft-pwouters-multi-sa-performance/

This should improve multi-core-cpu utilization and IPsec throughput. The receiver
should distribute the flows, based on SPI, to different CPUs for decryption.
Ideally the NIC should support a ntuple flow distribution using SPI.
It is not yet widely supported, and also not compatible with older NICs.
Now we are thinking of ESP in UDP with different source ports. Just like the draft
proposed for ECMP and LAG.
When implementing it I ran into issues with NAT and SAD remapping messages which update IKE.
I am using strongSWAN for IKE and Linux XFRM for ESP.

> The RFC3948 specifies one pair of UDP ports 4500-4500.
> Both the IKE flow and the ESP in UDP flow should use the same UDP flow.
> The draft seems to suggest new destination port and source ports are only for ESP? How would this change work with IKE?
> May you are not intending to use IKE?

PB> Our use cases use IKE, however as stated in RFC3948 ESPinUDP does not have to be
PB> tied to IKE, it is just advantageous to do so for the NAT case since this allows
PB> a single mapping for both at the NAT rather than two mappings.


PB> I've wondered why we could not use the RFC3948 encoding for ESPinUDP, but allow 
PB> the source port to be chosen differently than IKE. Perhaps Xu has some thoughts on this. 

In my experience it would work well when there is no NAT. When there
there is NAT the IKE and ESP in UDP should use same ports, otherwise
IKE will get established and ESP packets could get dropped in one
direction. When there is NAT it would look more like a client-to-server
than a peer-to-peer.

> How would the new ESP flow work when there is a NAT gateway along the path?
> I ran into issues with both sides choosing different source ports.
> It would cause SADB mapping changes which force changes IKE flows. One coul disable
> SADB mapping changes. However, that would break real NAT changes.
>
PB> We are mostly interested in data centre use cases which don't have intervening NATs,
PB> however I believe SD-WAN cases could have NAT and FW traversals between tunnel end
PB> points. As it stands draft-xu-ipsecme-esp-in-udp-lb does not specify how the source port PB> value is determined. It seems like it could be based on a hash value within the ESP or
PB> based on the SPI and IPs.

I implemented a proof concept - UDP source port set to 16bit hash of out going SPI.
Then it occurred to me the hash could collide with other well
known UDP ports e.g. hash of an SPI or/and IP address could be 53(DNS).
Some admins may not be happy to see source port 53 for ESP in UDP traffic.

If you choose ephemeral source ports both sides should know the source
ports otherwise SADB remap will be generated. If we disable that real NAT
would break...
So far I don't have a clean solution which would work with NAT and without NAT
for our use case.