Xen-Devel Archive mirror
 help / color / mirror / Atom feed
From: Jason Andryuk <jandryuk@gmail.com>
To: Leigh Brown <leigh@solinno.co.uk>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
	 anthony.perard@citrix.com
Subject: Re: [RFC PATCH v2 5/5] tools/examples: Example Linux bridge VLAN config
Date: Tue, 14 May 2024 20:58:25 -0400	[thread overview]
Message-ID: <CAKf6xpt+UTwY0hFuODhpeb6rWOB0kgbqrrFVprP7MZYOTJ59YA@mail.gmail.com> (raw)
In-Reply-To: <20240508213824.55824-6-leigh@solinno.co.uk>

On Wed, May 8, 2024 at 6:08 PM Leigh Brown <leigh@solinno.co.uk> wrote:>
> Add a new directory linux-bridge-vlan with examples files showing
> how to configure systemd-networkd to support a bridge VLAN
> configuration.
>
> Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
> ---
>  tools/examples/linux-bridge-vlan/README       | 68 +++++++++++++++++++
>  tools/examples/linux-bridge-vlan/br0.netdev   |  7 ++
>  tools/examples/linux-bridge-vlan/br0.network  |  8 +++
>  .../examples/linux-bridge-vlan/enp0s0.network | 16 +++++
>  4 files changed, 99 insertions(+)
>  create mode 100644 tools/examples/linux-bridge-vlan/README
>  create mode 100644 tools/examples/linux-bridge-vlan/br0.netdev
>  create mode 100644 tools/examples/linux-bridge-vlan/br0.network
>  create mode 100644 tools/examples/linux-bridge-vlan/enp0s0.network

I think putting these in docs/misc/linux-bridge-vlan/ might be a
better location.

> diff --git a/tools/examples/linux-bridge-vlan/README b/tools/examples/linux-bridge-vlan/README
> new file mode 100644
> index 0000000000..83b9fa3fd6
> --- /dev/null
> +++ b/tools/examples/linux-bridge-vlan/README
> @@ -0,0 +1,68 @@
> +Linux Xen Dom0 single bridge multiple VLAN configuration with systemd
> +=====================================================================
> +
> +Introduction
> +------------
> +
> +This directory contains example files to be placed in /etc/systemd/network
> +to enable a single bridge with multiple VLAN support.
> +
> +The example is to support the scenario where the Xen host network interface
> +is connected to an Ethernet switch configured as a trunk port. Each domain
> +VIF can then be configured with one or more VLAN IDs, one of which will be
> +the PVID.
> +
> +The example files create a bridge device called br0, with a physical interface
> +called enp0s0. You will need to update this with your system's device name.
> +
> +Key points of the configuration are:
> +
> +1. In br0.netdev, VLANFiltering=on is set. This is required to ensure the
> +   VLAN tags are handled correctly.  If it is not set then the packets
> +   from the VIF interfaces will not have the correct VLAN tags set.
> +
> +2. In br0.network, a system IPv4 address is configured that can be updated
> +   according to your local network settings.
> +
> +3. In enp0s0.network, Bridge=br0 sets the bridge device to connect to. There
> +   is also a [BridgeVLAN] section for each VLAN you want to give access
> +   to the switch. Note, if you want to create an internal VLAN private to

For
"for each VLAN you want to give access to the switch"
do you mean:
"for each VLAN you want connected with the external network"
or
"for each VLAN you want accessible on the external network"
?

The "access to the switch" part I find unclear.

> +   the host, do not include its VLAN ID in this file.


> +Domain configuration
> +--------------------
> +
> +Add the vlan= keyword to the vif definition in the domain. The simplest
> +and most common example is a domain that wishes to connect to a single VLAN:
> +
> +vif = [ 'mac=xx:xx:xx:xx:xx:xx, bridge=br0, vlan=10' ]
> +
> +If you wish to configure a domain to route between two VLANs, you have two
> +options. Option 1 is to create multiple interfaces on different VLANs:
> +
> +vif = [ 'mac=xx:xx:xx:xx:xx:xx, bridge=br0, vlan=10',
> +       'max=xx:xx:xx:xx:xx:xx, bridge=br0, vlan=20' ]

Hard tab here makes the diff look off, but the file would be aligned.

I think this is good content.  I'm not familiar with the systemd
networking stuff to give an R-b.  But it's only examples, so I think
it should be okay.  I'm not a maintainer, but it would be an Acked-by,
if I were.

Regards,
Jason


  reply	other threads:[~2024-05-15  0:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 21:38 [RFC PATCH v2 0/5] Add bridge VLAN support Leigh Brown
2024-05-08 21:38 ` [RFC PATCH v2 1/5] tools/libs/light: Add vlan field to libxl_device_nic Leigh Brown
2024-05-12 15:45   ` Jason Andryuk
2024-05-08 21:38 ` [RFC PATCH v2 2/5] tools/xl: add vlan keyword to vif option Leigh Brown
2024-05-12 15:45   ` Jason Andryuk
2024-05-08 21:38 ` [RFC PATCH v2 3/5] tools/hotplug/Linux: Add bridge VLAN support Leigh Brown
2024-05-15  0:57   ` Jason Andryuk
2024-05-15 15:29     ` Leigh Brown
2024-05-08 21:38 ` [RFC PATCH v2 4/5] docs/man: document VIF vlan keyword Leigh Brown
2024-05-15  0:57   ` Jason Andryuk
2024-05-15 15:30     ` Leigh Brown
2024-05-15 17:24       ` Andrew Cooper
2024-05-08 21:38 ` [RFC PATCH v2 5/5] tools/examples: Example Linux bridge VLAN config Leigh Brown
2024-05-15  0:58   ` Jason Andryuk [this message]
2024-05-15 16:10     ` Leigh Brown
2024-05-09 15:53 ` [RFC PATCH v2 0/5] Add bridge VLAN support Andrew Cooper
2024-05-09 16:10   ` Leigh Brown
2024-05-10 13:53     ` Jason Andryuk
2024-05-14  9:05   ` Oleksii K.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKf6xpt+UTwY0hFuODhpeb6rWOB0kgbqrrFVprP7MZYOTJ59YA@mail.gmail.com \
    --to=jandryuk@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=leigh@solinno.co.uk \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).