From 6a9a6780fafb537894c7f55e227c14dd8bf7025e Mon Sep 17 00:00:00 2001 From: Jon-Olov Vatn Date: Tue, 7 Nov 2023 17:03:19 +0100 Subject: [PATCH] Extending the VLAN inteface documentation (picture and example) Providing an additional config example (VLAN atop brigde) Adding picture for this and the existing example (VLAN atop Eth) Adding info on name conventions (eth.20 vs vlan10) [skip ci] --- doc/img/interface-vlan-variants.svg | 1040 +++++++++++++++++++++++++++ doc/networking.md | 20 +- 2 files changed, 1057 insertions(+), 3 deletions(-) create mode 100644 doc/img/interface-vlan-variants.svg diff --git a/doc/img/interface-vlan-variants.svg b/doc/img/interface-vlan-variants.svg new file mode 100644 index 00000000..953706e9 --- /dev/null +++ b/doc/img/interface-vlan-variants.svg @@ -0,0 +1,1040 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/networking.md b/doc/networking.md index 83ac57c4..31e80337 100644 --- a/doc/networking.md +++ b/doc/networking.md @@ -65,9 +65,11 @@ prohibited. ### VLAN Interfaces -Creating a VLAN can be done in many ways. This section assumes VLAN interfaces created atop another Linux interface. E.g., the VLAN interfaces created on top of the bridge in the picture above. +Creating a VLAN can be done in many ways. This section assumes VLAN interfaces created atop another Linux interface. E.g., the VLAN interfaces created on top of the Ethernet interface or bridge in the picture below. -A VLAN interface is basically a filtering abstraction. When you run `tcpdump` on a VLAN interface you will only see the frames matching the VLAN ID of the interface, compared to *all* the VLAN IDs if you run `tcpdump` on the parent interface. +![VLAN interface on top of Ethernet or Bridge interfaces](img/interface-vlan-variants.svg) + +A VLAN interface is basically a filtering abstraction. When you run `tcpdump` on a VLAN interface you will only see the frames matching the VLAN ID of the interface, compared to *all* the VLAN IDs if you run `tcpdump` on the lower-layer interface. ``` admin@example:/> configure @@ -77,7 +79,19 @@ admin@example:/config/interfaces/interface/eth0.20/> set vlan lower-layer-if eth admin@example:/config/interfaces/interface/eth0.20/> leave ``` -> **Note:** If you name your VLAN interface `foo0.N`, where `N` is a number, Infix will set the interface type automatically for you. +The example below assumes bridge br0 is already created. + +``` +admin@example:/> configure +admin@example:/config/> edit interfaces interface vlan10 +admin@example:/config/interfaces/interface/vlan10/> set vlan id 10 +admin@example:/config/interfaces/interface/vlan10/> set vlan lower-layer-if br0 +admin@example:/config/interfaces/interface/vlan10/> leave +``` + +As conventions, a VLAN interface for VID 20 on top of an Ethernet interface *eth0* is named *eth0.20*, and a VLAN interface for VID 10 on top of a bridge interface *br0* is named *vlan10*. + +> **Note:** If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a number, Infix will set the interface type automatically for you. ## Management Plane