Re: [IPsec] I-D Action: draft-he-ipsecme-vpn-shared-ipsecsa-00.txt

"Panwei (William)" <william.panwei@huawei.com> Mon, 11 March 2024 13:42 UTC

Return-Path: <william.panwei@huawei.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 98DE1C14E515 for <ipsec@ietfa.amsl.com>; Mon, 11 Mar 2024 06:42:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=unavailable autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GQYmA3ewT211 for <ipsec@ietfa.amsl.com>; Mon, 11 Mar 2024 06:42:50 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 92634C14F60C for <ipsec@ietf.org>; Mon, 11 Mar 2024 06:42:50 -0700 (PDT)
Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TtdHr3Y0Mz6JB0d for <ipsec@ietf.org>; Mon, 11 Mar 2024 21:42:32 +0800 (CST)
Received: from lhrpeml100001.china.huawei.com (unknown [7.191.160.183]) by mail.maildlp.com (Postfix) with ESMTPS id 7DA85140C9C for <ipsec@ietf.org>; Mon, 11 Mar 2024 21:42:47 +0800 (CST)
Received: from kwepemi500009.china.huawei.com (7.221.188.199) by lhrpeml100001.china.huawei.com (7.191.160.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 11 Mar 2024 13:42:46 +0000
Received: from kwepemi500010.china.huawei.com (7.221.188.191) by kwepemi500009.china.huawei.com (7.221.188.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 11 Mar 2024 21:42:45 +0800
Received: from kwepemi500010.china.huawei.com ([7.221.188.191]) by kwepemi500010.china.huawei.com ([7.221.188.191]) with mapi id 15.01.2507.035; Mon, 11 Mar 2024 21:42:45 +0800
From: "Panwei (William)" <william.panwei@huawei.com>
To: Paul Wouters <paul.wouters=40aiven.io@dmarc.ietf.org>
CC: "ipsec@ietf.org WG" <ipsec@ietf.org>
Thread-Topic: [IPsec] I-D Action: draft-he-ipsecme-vpn-shared-ipsecsa-00.txt
Thread-Index: AQHabgXw2ORgzh79i06MkXh0+CozjrEo1fnw///F4ICABPAScA==
Date: Mon, 11 Mar 2024 13:42:45 +0000
Message-ID: <e7bc176dafcd4a719b84842b685a9fc5@huawei.com>
References: <29bca8d122844180afc21cd6b353159a@huawei.com> <4C637D68-CD0C-47C1-8D34-36D01A2DBF1F@aiven.io>
In-Reply-To: <4C637D68-CD0C-47C1-8D34-36D01A2DBF1F@aiven.io>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.164.106.249]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/GDe8-5dIs_dumfTtfLHuEfB458E>
Subject: Re: [IPsec] I-D Action: draft-he-ipsecme-vpn-shared-ipsecsa-00.txt
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
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: Mon, 11 Mar 2024 13:42:52 -0000

Hi Paul,

Thanks for your quick comments. But I'm sorry for the late response due to I was out of the office for a few days.

    > I can see how you want an extra SPD selector for the VPN ID - but
    > maybe call it Namespace ID or something else as VPN ID is confusing.

Thanks for pointing out this, we'll change it to a better name in the next version.

    > Your gateway that needs to support say 256 VPN IDs could split up its
    > SPI range so it can detect which VPN to send it to based on SPI range ?
    > That would need no ESP changes. In linux terms that would mean you
    > “mark” the skbuf with the VPN ID to steer it into the right place
    > before/after decrypting / encrypting.
    > In Linux you could also use the “labeled IPsec” to label the packet with
    > the VPN ID.
    > It would require you keep track of the SPI bundle of the SA, but again in
    > Linux terms you could use marking of packets based on keeping a list of
    > peer SPIs per VPN ID.

Indeed, splitting the 32-bit SPI into two sub-fields, the VPN ID sub-field and SPI sub-field, may also be one option. This solution doesn't need to change the ESP packet format, but it also has some disadvantages.
The first one is the scalable issue. 256 VPN IDs may be enough for use for current RAN Sharing scenario, but when considering the service slicing feature, thousands and even more VPNs will be needed in the future. So, it's better to assign 16 bits to the VPN ID sub-field. Therefore, the SPI sub-field will be trenched to 16 bits, which means the available SPIs are 64k. This can have a negative impact on the expansion of usable scenarios in the future.
The second problem is the high possibility of packet disorder. Although all VPNs share one actual SA and the sender assigns sequence numbers in sequence to all the traffic no matter which VPN they belong to, different VPNs will use different SPIs in the ESP packets. This will interfere with the load balance process of the on-path routers because they usually look at the SPI field when doing the hash. This may lead to packet disorder at the IPsec receiver.
Therefore, we currently still prefer a separate field representing the VPN ID. But we are open to more discussions and future changes.

    > Usually, hardware offload and queueing looks at some (hash of) IP
    > properties (eg port numbers or SPI). This might interfere but since you
    > have many tunnels that might not matter?

I think this will matter because on-path routers will look into the SPI field and one possible result is packet disorder at the IPsec receiver.

    > The VPN ID could be done via notify instead of new traffic selector. Or
    > you could add a new traffic selector type of just the VPN ID instead of
    > copying and extending the existing v4/v6 types - similar to RFC 9478.

We did consider this option before.
A new notify or traffic selector type of just the VPN ID is also acceptable but has some disadvantages.
When using the new notify or traffic selector type along with the existing traffic selectors of v4/v6 types, it will be impossible to differentiate which traffic selector of v4/v6 types is associated with which VPN. Therefore, all traffic selectors of v4/v6 types will be associated with each VPN, which may cause unwanted traffic to be included in the traffic selection result.
When using the new notify or traffic selector type alone, it will allow all the traffic (from any to any) of one VPN to be selected, which will also cause unwanted traffic to be included.
By considering this, our current design of copying and extending the existing v4/v6 types want to keep a more precious traffic selection.

Regards & Thanks!
Wei PAN (潘伟)