Re: [netmod] Modeling of veth pairs

Florian Kauer <florian.kauer@linutronix.de> Tue, 27 February 2024 16:43 UTC

Return-Path: <florian.kauer@linutronix.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 665E1C14F71F for <netmod@ietfa.amsl.com>; Tue, 27 Feb 2024 08:43:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=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, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=linutronix.de header.b="DknOZetU"; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b="GhUyzip/"
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 j3DKvy34mk8B for <netmod@ietfa.amsl.com>; Tue, 27 Feb 2024 08:43:49 -0800 (PST)
Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 960E5C14CF12 for <netmod@ietf.org>; Tue, 27 Feb 2024 08:43:49 -0800 (PST)
Message-ID: <ab081ed8-f9a6-4740-a761-ea16d7662e47@linutronix.de>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709052227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=H/YRRKgLNlsOxJTvwZgRH1MJRULW3wbN8yAxclhAqq8=; b=DknOZetU4lHcquognZFSps4l7LFh3ePx0XzZ3mF6oV2pzFRBCIz5iX0dqMFJozqKowcwN1 6NDE9Ji+Qnszkw+ve8P/tIEQwZQD83Vh/Jh02TVv7L7zVsE6UClsdfBBpRgelfFbmDaJPG yl4A4CUFimvCZh2ahLds9/VlLIFN3qzRFZgdjjrUM9Q19SvcrZeUJ1HwmuOvscYdt6opzC AqKVXW5aUmvXyAkPNBuIQJcFZFAq4LMFUxpSJXi9LzuYbmFrPMp65zHnfrrtXaDAgayxnS ZrLcBBP+KjanE3OZAt4N9MfIZ/jV8hTwKOmaS7qW9W4fYuUw9opjbXXlZ8yPAQ==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709052227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=H/YRRKgLNlsOxJTvwZgRH1MJRULW3wbN8yAxclhAqq8=; b=GhUyzip/Kqr9MT4RoO029GzhFznRJuMK/rJd1bc9IldTGmO2HIG9wYkeNQ7KvqFLZGigXR TajcsE9Vaz87d8Ag==
Date: Tue, 27 Feb 2024 17:43:46 +0100
MIME-Version: 1.0
Content-Language: en-US
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, Scott Mansfield <scott.mansfield@ericsson.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <3098fb4d-0e77-4f97-b5b8-89ee1e158452@linutronix.de> <LV8PR11MB8536271B24BCF3D32FA703AEB5592@LV8PR11MB8536.namprd11.prod.outlook.com> <PH0PR15MB4447590CEE53F48E4FDAA1B78B592@PH0PR15MB4447.namprd15.prod.outlook.com> <LV8PR11MB85361DF2B60D032ECAEA3E3BB5592@LV8PR11MB8536.namprd11.prod.outlook.com>
From: Florian Kauer <florian.kauer@linutronix.de>
Autocrypt: addr=florian.kauer@linutronix.de; keydata= xsFNBGO+z80BEADOSjQNIrfbQ28vjDMvs/YD/z0WA/iJNaD9JQDXNcUBDV1q+1kwfgg5Cc7f rZvbEeQrO7tJ+pqKLpdKq6QMcUW+aEilXBDZ708/4hEbb4qiRl29CYtFf8kx4qC+Hs8Eo1s3 kkbtg/T4fmQ+DKLBOLdVWB88w6j/aqi66r5j3w9rMCaSp0eg7zG3s/dW3pRwvEsb+Dj7ai2P J1pGgAMKtEJC6jB+rE17wWK1ISUum22u17MKSnsGOAjhWDGiAoG5zx36Qy5+Ig+UwIyYjIvZ lKd8N0K35/wyQaLS9Jva0puYtbyMEQxZAVEHptH1BDd8fMKD/n03GTarXRcsMgvlkZk1ikbq TL9fe2u9iBI861ATZ4VwXs48encOl3gIkqQ/lZbCo8QRj7pOdvOkx/Vn20yz809TTmRxCxL1 kdSbHROfEmUCAQdYSLUUfPYctCIajan/zif/W3HZKJJ3ZTbxdsYonLF9+DSlkFU+BSL147in tDJ83vqqPSuLqgKIdh2E/ac2Hrua0n80ySiTf7qDwfOrB8Z2JNgl1DlYLbLAguZJ4d608yQZ Tidmu22QopA47oQhpathwDpEczpuBBosbytpIG7cNvn98JnEgWAwRk0Ygv9qhUa/Py4AcYG8 3VEkoTZ9VNSP1ObMxcraF+KH5YYkR6Rd2ykmTulh4FqrvyOyMwARAQABzStGbG9yaWFuIEth dWVyIDxmbG9yaWFuLmthdWVyQGxpbnV0cm9uaXguZGU+wsGUBBMBCgA+FiEE8X2LVBM8IilJ PmSgtZdt1l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bcyGqEv KJGED0XKgdRE7uMZ4gnmBjh4IpY6a2sATFuBiulI/lOKp43mwVUGsPxdVfkN/RRbFW7iEx63 ugsSqUGtSA==
Cc: Daniel Borkmann <daniel@iogearbox.net>
In-Reply-To: <LV8PR11MB85361DF2B60D032ECAEA3E3BB5592@LV8PR11MB8536.namprd11.prod.outlook.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/a3cBQWP2RvbV-ZZRpMtwvbORiXA>
Subject: Re: [netmod] Modeling of veth pairs
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Feb 2024 16:43:54 -0000

Hi,
comments inline.

On 27.02.24 16:11, Rob Wilton (rwilton) wrote:
> Yes possibly.  Florian would you be interested in helping if we were to do that?

Yes, of course! Let me know how I can help with that.


> *From: *Scott Mansfield <scott.mansfield@ericsson.com>
> *Date: *Tuesday, 27 February 2024 at 14:16
> *To: *Rob Wilton (rwilton) <rwilton@cisco.com>, Florian Kauer <florian.kauer@linutronix.de>, netmod@ietf.org <netmod@ietf.org>
> *Subject: *RE: Modeling of veth pairs
> 
> Could we add this case to the intf-ext work?
> 
> We could use this as an example.  If a new module is what is desired, I will support that too.

That would of course be very nice!


> 
>  
> 
> Regards,
> 
> -scott.
> 
>  
> 
> *From:*Rob Wilton (rwilton) <rwilton@cisco.com>
> *Sent:* Tuesday, February 27, 2024 8:55 AM
> *To:* Florian Kauer <florian.kauer@linutronix.de>; netmod@ietf.org
> *Cc:* Scott Mansfield <scott.mansfield@ericsson.com>
> *Subject:* Re: Modeling of veth pairs
> 
>  
> 
> Hi Florian,
> 
>  
> 
> Some very quick thoughts on this:
> 
> I’m assuming that these Virtual Ethernet interfaces are really only Ethernet emulations at layer 2 rather than layer 1.  I.e., I presume that there is no configuration for speed, duplex, flow-control, etc?  But they would each have their own a MAC address?   I think that this would mean that these interfaces are probably more ethernet-like as defined in draft-ietf-netmod-intf-ext-yang-13 - Common Interface Extension YANG Data Models <https://datatracker.ietf.org/doc/draft-ietf-netmod-intf-ext-yang/>.

In fact they even have speed, duplex setting etc., but AFAIK they have no impact on the behavior and these interfaces are actually emulations on L2. Each veth has its own MAC address so I think it is "ethernet-like".

By the way, there is also the very recently added netkit ( https://lore.kernel.org/netdev/20231024214904.29825-1-daniel@iogearbox.net/ ) which from the network modeling point of view is quite the same as veth, but also supports an L3 mode. So supporting that L3 mode would also be nice, but I guess goes to far and we might want to focus on the L2 first.


> I suspect that you will want to define a new IANA iftype for these interfaces.  The alternative would be ethernetCsmacd that is used for all physical Ethernet interfaces but not LAG.  But using that IANA iftype would then mean that you would likely pickup the configuration for physical Ethernet interfaces that I don’t think that you really want.

I also thought about just using ethernetCsmacd, but the application processing the YANG config somehow needs to know if it has to search for a corresponding physical interface or setup a new virtual one.


> You could use an Interface naming convention to represent the binding, e.g., veth1-left, veth1-right, but it may be better to be more flexible, in which case, I would probably recommend having new configuration under each v-eth interface with a leaf-ref to indicate what its peer interface is.

That could work, yes.


> So, yes, I think that you would need to a new model to define these, but it should be pretty small and simple.  And if you did want to do something like this in the IETF, then I suspect that NETMOD is probably the best WG.

Thanks! I will look deeper into draft-ietf-netmod-intf-ext-yang and maybe it is possible to add a simple extension for these "peer" interfaces.

Greetings,
Florian