From 0f47888ca33e7e33a0be27ebdfd65ca7e8609305 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 9 Oct 2024 15:53:51 +0200 Subject: [PATCH] doc: add picture to show stacking direction Signed-off-by: Joachim Wiberg --- doc/img/lego-relations.svg | 4 ++++ doc/networking.md | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 doc/img/lego-relations.svg diff --git a/doc/img/lego-relations.svg b/doc/img/lego-relations.svg new file mode 100644 index 000000000..3daf80579 --- /dev/null +++ b/doc/img/lego-relations.svg @@ -0,0 +1,4 @@ + + + +
ip
vlan
eth
vlan
ip
ip
bridge
eth
Upper
to
lower
Lower
to
Upper
Only one master
eth
ip
\ No newline at end of file diff --git a/doc/networking.md b/doc/networking.md index b7c1bc196..ec5d0a65d 100644 --- a/doc/networking.md +++ b/doc/networking.md @@ -14,8 +14,34 @@ Infix to exploit the unique features not available in IEEE models. ## Interface LEGO® +The network building blocks available in Linux are akin to the popular +LEGO® bricks. + ![Linux Networking Blocks](img/lego.svg) +There are two types of relationships that can link two blocks together: + + 1. **Lower-to-upper**: Visually represented by an extruding square + connected upwards to a square socket. An interface _can only have + a single_ lower-to-upper relationship, i.e., it can be attached to + a single upper interface like a bridge or a LAG. In `iproute2` + parlance, this corresponds to the interface's `master` setting + 2. **Upper-to-lower**: Visually represented by an extruding semicircle + connected downwards to a semicircle socket. The lower interface in + these relationships _accepts multiple_ upper-to-lower relationships + from different upper blocks. E.g., multiple VLANs and IP address + blocks can be connected to the same lower interface + +![Stacking order dependencies](img/lego-relations.svg) + +An interface may simultaneously have a _lower-to-upper_ relation to some +other interface, and be the target of one or more _upper-to-lower_ +relationships. It is valid, for example, for a physical port to be +attached to a bridge, but also have a VLAN interface stacked on top of +it. In this example, traffic assigned to the VLAN in question would be +diverted to the VLAN interface before entering the bridge, while all +other traffic would be bridged as usual. + | **Type** | **Yang Model** | **Description** | | -------- | ----------------- | ------------------------------------------------------------- | | bridge | infix-if-bridge | SW implementation of an IEEE 802.1Q bridge | @@ -27,6 +53,7 @@ Infix to exploit the unique features not available in IEEE models. | | ieee802-ethernet-interface | | | veth | infix-if-veth | Virtual Ethernet pair, typically one end is in a container | + ## Data Plane The blocks you choose, and how you connect them, defines your data plane.