From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2ORFAnSP3WH14wAAgWs5BA (envelope-from ) for ; Tue, 11 Jan 2022 15:08:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OM+FNnOP3WGAKwEAG6o9tA (envelope-from ) for ; Tue, 11 Jan 2022 15:08:51 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A870830CD4 for ; Tue, 11 Jan 2022 15:08:50 +0100 (CET) Received: from localhost ([::1]:37604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7HpR-0006VA-9O for larch@yhetil.org; Tue, 11 Jan 2022 09:08:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Gmp-0005Bl-DV for help-guix@gnu.org; Tue, 11 Jan 2022 08:02:04 -0500 Received: from [2a00:5884:8208::1] (port=51894 helo=lepiller.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Gml-0005lb-Ia for help-guix@gnu.org; Tue, 11 Jan 2022 08:02:02 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id a9cc65ec; Tue, 11 Jan 2022 13:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=G4RltA3fWFd1 jc7A0lx+PLXywh6DSwoaAzxs8fvn+4g=; b=j7oBs5HpDjlkI5z8Aj3mSaOofvLu fZHRAfLbWRiZarCsjGr0lE+2hsIxtXfFfMG9qQLR1bfQSqBb8Ee16ordywX4Syve 0NVAWlTkAZ9bAABFJbhCd09W70CJ1L+qKYOndR3+kp+wo84DiBoD6mxgM/x7W42e QPmAOUvjOF75e57YHIKvDmgTQLwXa8btUDNNs5z8Wv4isEGQzhkuFNhYJ8b92Sng e+qJG7v0q1H7jegY2FwaYSHV74eiFIlVZ8ivX98Y76PUU1xCeofsR4TblSOBI50k EzhBucRtGwU/R/XLw6lOheBLwi7WICdRN74CU+CJIlIJeE6SmiAlFsWM0g== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 7383eb71 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 11 Jan 2022 13:01:20 +0000 (UTC) Date: Tue, 11 Jan 2022 14:01:08 +0100 From: Julien Lepiller To: help-guix@gnu.org, Niklas Schmidt Subject: Re: Add VLAN with Guile Netlink link-add User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:5884:8208::1 (failed) Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641910131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=O/Lz/5vzRzObGTEfzMhC/0fe1giSBSMys0u4lC/OXWo=; b=d9mrtXzypv/qu1ORvGLlpml4Fhke25pg3nJe1uDhUPIYDlEmvR9VRMkMVRUPsznf002Tv1 mE3hctZa1QSQEJfCdEvrfDyFTHQ6ZH9plJit9yEJWP1jbJGISYcXniUovlENKEaAT1lAgh Kp08GOJTSdGYirUGPcjoTGhDysSpMh/zp6+h6dB3tL6y6XRh5SAVLS0r3CAmNnhbg/BPqj UopyS3lIxmm0hBY8UjnqXh8VucYK8uj5wSOdC2rP01yGLqkIkylQofJub2FWqnAmNYD2FP qt2vduMrsaXBwoNuyJySfBL30SqeP3tqTYCzmAn8g///XLf+4Qi0EdgnqSxyvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641910131; a=rsa-sha256; cv=none; b=qR5q27YhBZ3qMF0Q/xsyyhmCUqmYjA6bYjvRta0SG9HhFNYZxj336pfSqmB77X7jnXygRc tqTEDIHhkWi9taUkLcJqp9tfhOdSNFw1xIDRFLJA8EdmAC2tZr4CeXuc72CuD9D5/eq+dV q3izfnuc40WNzFT1zkdE37TKM9o22Bg5xBq4JnZmUoujsVyeXkGvdJ1vDGAzF12KA3VSGy Chdm1iNGbd9AbYt2KdWmeqSy9nk+bxt49M5KZcJNJQw4W2oUDpfZIATM0j5ROUvqFmiIMe juUZXM9KG7ul3RVwBAj1vatxkrLK9v4P+oKYw7Uwn1jDP4IuAjNw05VFuLJkzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=j7oBs5Hp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=j7oBs5Hp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A870830CD4 X-Spam-Score: -2.76 X-Migadu-Scanner: scn1.migadu.com X-TUID: vVUVWIZk1XOU Thanks for the report! It looks like I didn't read the netlink documentatio= n properly and forgot a part of the message=2E I think I just fixed that in= guile-netlink 1=2E1=2E2=2E You can access it with --with-latest=3Dguile-ne= tlink ;) Le 10 janvier 2022 12:29:38 GMT+01:00, Niklas Schmidt a =C3=A9crit=C2=A0: >Dear Guix, > >I really appreciate the ability to declare a static-networking=20 >configuration=2E > >I face some difficulties adding a 802=2E1Q VLAN interface using the Guile= =20 >Netlink package=2E I added guile-netlink to my operating system=20 >definition's packages field=2E > >Running guile as root using su, I get the following error: > > scheme@(guile-user)> (use-modules (ip link)) > scheme@(guile-user)> (link-add "ens3=2E12" "vlan" #:type-args '((id = =2E 12))) > ice-9/boot-9=2Escm:1685:16: In procedure raise-exception: > ERROR: > 1=2E &netlink-response-error: 22 > =20 > Entering a new prompt=2E Type `,bt' for a backtrace or `,q' to contin= ue=2E > scheme@(guile-user) [1]>=20 > > >The documentation [1] states: > > Scheme Procedure: link-add name type [#:type-args '()] > > Add a new link with given name and type=2E Additional arguments can = be passed to control the state of the link at creation=2E type-args is an a= ssociation list containing additional values for the given type=2E > > When type is "vlan", type-args can contain a number associated with = 'id: the VLAN id to be created=2E > >It is unclear to me how to specify the hardware interface for which the= =20 >VLAN link is to be added=2E Maybe I am missing something? > >Calling the above command with "ens3" instead of "ens3=2E12" results in= =20 >the same error=2E > >I am able to add the link manually with iproute2 by executing > > ip link add link ens3 name ens3=2E12 type vlan id 12 > >and was able to verifiy that it works by assigning a static IPv4=20 >address=2E > >If I run another command given in the documentation [1], > > (link-add "v0p0" "veth" #:type-args '((peer =2E "v0p1"))) > >that returns #t and creates the interface pair=2E So I think, Guile=20 >Netlink generally works with my configuration=2E > >Has someone got a working code sample showing how to add VLANs using=20 >Guile Netlink? >I don't understand the internals of the Netlink kernel interface yet=2E = A=20 >comment in the source code [2] says that every link type except veth and= =20 >vlan is not implemented in Guile Netlink=2E I am not sure whether the=20 >functionality I whish to use is supported at all=2E > >My goal is to specify VLAN links in the links field of a=20 >static-networking record=2E > >Im running Guix inside QEMU-KVM=2E If that would help, I am willing to=20 >test this on real hardware=2E > >Thanks for advice=2E > > >Greetings >Niklas > >[1]: https://git=2Elepiller=2Eeu/guile-netlink/manual/html_node/Link=2Eht= ml >[2]: https://git=2Elepiller=2Eeu/guile-netlink/tree/-/ip/link=2Escm >