Skip to content

Commit e5aa19a

Browse files
committed
doc: add vlan.md, update ChangeLog for the branch
Fix #1506: restore the VLAN interface documentation that was lost when networking.md was split into per-topic pages. Content adapted from the v25.11.0 networking.md VLAN section, plus a new "Stacked (Q-in-Q)" section showing `eth0.10.20`-style nesting and the layered `show interface` rendering of the parent chain. Update the interface-type table in networking.md to point at the new vlan.md instead of the dangling ethernet.md#vlan-interfaces anchor. ChangeLog: document the user-facing changes on this branch (YANG model upgrade, layered show interface output, auto-negotation typo fix) and the new VLAN documentation. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 18ef9c0 commit e5aa19a

6 files changed

Lines changed: 189 additions & 76 deletions

File tree

doc/ChangeLog.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,47 @@ All notable changes to the project are documented in this file.
1010

1111
- Upgrade Linux kernel to 6.18.33 (LTS)
1212
- Upgrade FRR to 10.5.4
13-
- Add support for [Acer Connect Vero W6m][AcerConnectVero], a COTS home router,
14-
based upon the same hardware as [Banana Pi BPI-R3][BPI-R3], but
13+
- Add support for [Acer Connect Vero W6m][AcerConnectVero], a low-cost COTS
14+
home router, based on the same hardware as [Banana Pi BPI-R3][BPI-R3], but
1515
with a Wi-Fi 6E (6 GHz band) chip.
1616
- Add configurable channel-width in Wi-Fi configuration.
17+
- Upgrade `ieee802-ethernet-interface` YANG model to revision 2025-09-10 (IEEE
18+
Std 802.3.2-2025), adding the standard `phy-type` and `pmd-type` operational
19+
leaves. Speed is now exposed via `ietf-interfaces:speed` (bps, RFC 8343);
20+
the now obsolete `eth:speed` is no longer returned
21+
- Rework `show interface` summary output as layered protocol rows. When a
22+
port has link, a physical-medium row (e.g. `1000baseT`, `10GbaseLR`) appears
23+
above the `ethernet` row. VLAN, GRE, VXLAN and WiFi interfaces likewise get
24+
one row per protocol layer, with type-specific data on each (`vid:`,
25+
`remote:`, `vni:`, `station ssid:`, etc.), issue #530
26+
- New `auto-negotiation/advertised-pmd-types` leaf-list replaces the
27+
retired `enable=false + speed + duplex` idiom for pinned link modes
28+
(IEEE Std 802.3.2-2025 obsoleted `eth:speed`), issue #805. Existing
29+
startup configurations are migrated automatically on upgrade; see
30+
[ethernet.md](ethernet.md#restricting-advertised-link-modes) for the
31+
new model, the duplex × PMD mapping, and the `enable=false` escape
32+
hatch for non-autoneg peers
33+
- New operational `supported-pmd-types` leaf-list on each Ethernet interface,
34+
exposing the set of PMD types currently supported. Useful for SFP/SFP+
35+
diagnosis: an LR-only optic narrows the list to a single entry, confirming
36+
the transceiver without `ethtool -m`
1737

1838
### Fixes
1939

2040
- Fix #1493: container with a physical interface not properly removed
2141
when switching to a configuration without containers
42+
- Fix #1506: add documentation on how to configure VLAN interfaces,
43+
including stacked (Q-in-Q) VLAN interfaces, in a dedicated `vlan.md`
44+
- Fix long-standing typo `auto-negotation` in `yanger`, which caused
45+
the operational `auto-negotiation/enable` leaf to always read as
46+
`unknown` regardless of the actual port setting
2247
- Handle unclean daemon exits better, e.g., `dbus-daemon` crashing and
2348
leaving a stale pidfile behind, causing it to refuse to be restarted
2449
- Fix occasional blank or garbled `[ OK ]` lines at startup
2550
- Disallow multicast MAC addresses in custom MAC address configuration
2651
- Fix broken Wi-Fi 6 GHz band configuration.
2752

53+
[BPI-R3]: https://docs.banana-pi.org/en/BPI-R3/BananaPi_BPI-R3
2854
[AcerConnectVero]: ../board/aarch64/acer-connect-vero-w6m/
2955

3056
[v26.04.0][] - 2026-04-30
@@ -72,7 +98,6 @@ All notable changes to the project are documented in this file.
7298
- Fix [BPI-R3][] PCIe devices failing to initialize on boot due to a missing
7399
clock definition in the device tree
74100

75-
[BPI-R3]: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
76101
[BPI-R4]: https://docs.banana-pi.org/en/BPI-R4/BananaPi_BPI-R4
77102
[ESPRESSObin]: https://espressobin.net/
78103
[SAMA7G54]: https://www.microchip.com/en-us/development-tool/ev21h18a
@@ -176,7 +201,7 @@ All notable changes to the project are documented in this file.
176201

177202
- Fix CLI `copy` command problem to copy to scp/sftp destinations
178203

179-
[BPI-R3-MINI]: https://wiki.banana-pi.org/Banana_Pi_BPI-R3_Mini
204+
[BPI-R3-MINI]: https://docs.banana-pi.org/en/BPI-R3_Mini/BananaPi_BPI-R3_Mini
180205
[SAMA7G54-EK]: https://www.microchip.com/en-us/development-tool/ev21h18a
181206

182207
[v26.01.0][] - 2026-02-03

doc/bridging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ admin@example:/config/interface/br0/> <b>set bridge vlans vlan 20 tagged br0</b>
7373
</code></pre>
7474

7575
To route or to manage via a VLAN, a VLAN interface needs to be created
76-
on top of the bridge, see section [VLAN Interfaces](ethernet.md#vlan-interfaces)
77-
for more on this topic.
76+
on top of the bridge, see section [VLAN Interfaces](vlan.md) for more
77+
on this topic.
7878

7979
> [!NOTE]
8080
> In some use-cases only a single management VLAN on the bridge is used.

doc/ethernet.md

Lines changed: 67 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,8 @@
11
# Ethernet Interfaces
22

3-
This document covers VLAN interfaces, physical Ethernet interfaces,
4-
and virtual Ethernet (VETH) pairs.
5-
6-
7-
## VLAN Interfaces
8-
9-
Creating a VLAN can be done in many ways. This section assumes VLAN
10-
interfaces created atop another Linux interface. E.g., the VLAN
11-
interfaces created on top of the Ethernet interface or bridge in the
12-
picture below.
13-
14-
![VLAN interface on top of Ethernet or Bridge interfaces](img/interface-vlan-variants.svg)
15-
16-
A VLAN interface is basically a filtering abstraction. When you run
17-
`tcpdump` on a VLAN interface you will only see the frames matching the
18-
VLAN ID of the interface, compared to *all* the VLAN IDs if you run
19-
`tcpdump` on the lower-layer interface.
20-
21-
<pre class="cli"><code>admin@example:/> <b>configure</b>
22-
admin@example:/config/> <b>edit interface eth0.20</b>
23-
admin@example:/config/interface/eth0.20/> <b>show</b>
24-
type vlan;
25-
vlan {
26-
tag-type c-vlan;
27-
id 20;
28-
lower-layer-if eth0;
29-
}
30-
admin@example:/config/interface/eth0.20/> <b>leave</b>
31-
</code></pre>
32-
33-
The example below assumes bridge br0 is already created, see [VLAN
34-
Filtering Bridge](bridging.md#vlan-filtering-bridge).
35-
36-
<pre class="cli"><code>admin@example:/> <b>configure</b>
37-
admin@example:/config/> <b>edit interface vlan10</b>
38-
admin@example:/config/interface/vlan10/> <b>set vlan id 10</b>
39-
admin@example:/config/interface/vlan10/> <b>set vlan lower-layer-if br0</b>
40-
admin@example:/config/interface/vlan10/> <b>leave</b>
41-
</code></pre>
42-
43-
As conventions, a VLAN interface for VID 20 on top of an Ethernet
44-
interface *eth0* is named *eth0.20*, and a VLAN interface for VID 10 on
45-
top of a bridge interface *br0* is named *vlan10*.
46-
47-
> [!NOTE]
48-
> If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a
49-
> number, the CLI infers the interface type automatically.
3+
This document covers physical Ethernet interfaces and virtual Ethernet
4+
(VETH) pairs. For VLAN interfaces stacked on top of an Ethernet port
5+
or bridge, see [VLAN Interfaces](vlan.md).
506

517

528
## Physical Ethernet Interfaces
@@ -120,19 +76,23 @@ admin@example:/>
12076

12177
### Restricting advertised link modes
12278

123-
Auto-negotiation of speed/duplex is the desired default for almost all
124-
use-cases, but sometimes a port must come up at a specific speed —
125-
typically when interoperating with legacy hardware that does not
126-
auto-negotiate, or that does so poorly. IEEE Std 802.3.2-2025 retired
127-
the older *disable auto-negotiation, then set fixed speed/duplex*
128-
idiom; the standards-correct way to express the same intent is to
129-
**restrict the set of PMD types auto-negotiation may advertise**.
130-
When only one PMD is advertised, the link pins to that mode against
131-
any cooperating peer.
79+
Auto-negotiation is the right default for almost all links, but sometimes a
80+
port has to come up at a fixed speed, usually when talking to old hardware
81+
that won't auto-negotiate or does it badly. IEEE Std 802.3.2-2025 dropped
82+
the old "turn off auto-negotiation, then set a fixed speed and duplex"
83+
approach. Instead you restrict the set of PMD types the port may advertise:
84+
list a single PMD and the link pins to that mode against any peer that
85+
supports it.
13286

133-
Each entry in `auto-negotiation/advertised-pmd-types` is an IEEE
134-
PMD-type identity (`ieee802-ethernet-phy-type:pmd-type-*`). Half- vs
135-
full-duplex pinning is expressed by the orthogonal `duplex` leaf.
87+
> [!NOTE]
88+
> Earlier Infix releases needed `enable false` plus explicit `speed` and
89+
> `duplex` leaves. IEEE Std 802.3.2-2025 retired the `eth:speed` leaf, so
90+
> the speed now comes from the `advertised-pmd-types` entry instead.
91+
> Existing `startup-config.cfg` files are migrated automatically on upgrade.
92+
93+
Each entry in `auto-negotiation/advertised-pmd-types` is an IEEE PMD-type
94+
identity (`ieee802-ethernet-phy-type:pmd-type-*`). The separate `duplex`
95+
leaf controls half vs full duplex.
13696

13797
The example below pins port `eth3` to 100 Mbit/s half-duplex.
13898

@@ -149,20 +109,58 @@ admin@example:/config/interface/eth3/ethernet/> <b>leave</b>
149109
admin@example:/>
150110
</code></pre>
151111

152-
Listing multiple PMD identities advertises that set; the peer's
153-
auto-negotiation picks the highest mutually-supported mode.
112+
List several PMDs to advertise all of them; auto-negotiation then settles
113+
on the highest mode both ends support.
154114

155115
> [!IMPORTANT]
156-
> When pinning to a specific link mode, ensure both sides of the link
157-
> agree on at least one common (PMD, duplex) combination. If they
158-
> don't, the link will not come up.
116+
> When pinning a link mode, make sure both ends share at least one common
117+
> (PMD, duplex) combination, otherwise the link will not come up.
118+
119+
#### Duplex and advertised modes
120+
121+
A PMD type like `10BASE-T` or `100BASE-TX` says nothing about duplex on its
122+
own, but the kernel tracks half and full duplex as separate link modes.
123+
Infix advertises both variants of every PMD you list, then narrows to one
124+
duplex when the `duplex` leaf is set:
125+
126+
| `advertised-pmd-types` | `duplex` | Resulting advertised modes |
127+
|----------------------------|----------|------------------------------------------|
128+
| `[10BASE-T]` | _unset_ | `10baseT/Half` + `10baseT/Full` |
129+
| `[10BASE-T]` | `full` | `10baseT/Full` |
130+
| `[10BASE-T]` | `half` | `10baseT/Half` |
131+
| `[10BASE-T, 100BASE-TX]` | _unset_ | all four half/full combinations |
132+
| `[10BASE-T, 100BASE-TX]` | `full` | `10baseT/Full` + `100baseT/Full` |
133+
| _unset_ | _unset_ | every mode the PHY supports (default) |
134+
135+
So `duplex` filters the PMDs you listed. PMDs with no half-duplex variant
136+
(everything above 1 Gbps) only ever advertise full.
137+
138+
#### Disabling auto-negotiation
139+
140+
The method above keeps auto-negotiation on and only limits what it
141+
advertises, so the peer still negotiates as usual. That doesn't help with
142+
gear that won't negotiate at all, like some old switches or a back-to-back
143+
copper link. For those, set `auto-negotiation/enable false` together with a
144+
single `advertised-pmd-types` entry to force a fixed speed and duplex with
145+
negotiation off:
146+
147+
<pre class="cli"><code>admin@example:/config/interface/eth3/ethernet/> <b>set auto-negotiation enable false</b>
148+
admin@example:/config/interface/eth3/ethernet/> <b>set auto-negotiation advertised-pmd-types pmd-type-100BASE-TX</b>
149+
admin@example:/config/interface/eth3/ethernet/> <b>set duplex full</b>
150+
</code></pre>
151+
152+
With `enable false` you must list exactly one PMD: it sets the speed, and
153+
the `duplex` leaf sets half or full. Leave `duplex` out and Infix uses
154+
whatever the PMD supports, normally full.
159155

160156
> [!NOTE]
161-
> Earlier Infix releases used `auto-negotiation/enable=false` with
162-
> `speed` and `duplex` leaves to express the same thing. That syntax
163-
> is retired together with the IEEE obsoletion of `eth:speed`; existing
164-
> `startup-config.cfg` snippets are automatically migrated to the new
165-
> shape on upgrade.
157+
> Whether `enable false` reaches the external PHY depends on the driver.
158+
> Direct-attach NICs handle it directly. Switch user ports go through the
159+
> switch driver, and some accept the request at the MAC but leave the PHY
160+
> auto-negotiating: the kernel reports the configured speed while the wire
161+
> runs at whatever was negotiated, and traffic stalls. If that happens,
162+
> read the PHY's BMCR register (e.g. with `mdio` from `mdiotools`) to see
163+
> what the PHY is actually doing.
166164
167165
The detail view exposes a `supported` block (operational state,
168166
backed by the `supported-pmd-types` leaf-list) listing the PMD types

doc/networking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ other traffic would be bridged as usual.
4747
|----------|----------------------------|--------------------------------------------------------------|
4848
| [bridge](bridging.md) | infix-if-bridge | SW implementation of an IEEE 802.1Q bridge |
4949
| [ip](ip.md) | ietf-ip, infix-ip | IP address to the subordinate interface |
50-
| [vlan](ethernet.md#vlan-interfaces) | infix-if-vlan | Capture all traffic belonging to a specific 802.1Q VID |
50+
| [vlan](vlan.md) | infix-if-vlan | Capture all traffic belonging to a specific 802.1Q VID |
5151
| [lag](lag.md) | infix-if-lag | Link aggregation, static and IEEE 802.3ad (LACP) |
5252
| lo | ietf-interfaces | Software loopback interface |
5353
| [eth](ethernet.md#physical-ethernet-interfaces) | ieee802-ethernet-interface | Physical Ethernet device/port |

doc/vlan.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# VLAN Interfaces
2+
3+
A VLAN interface is an interface stacked on top of another Linux interface
4+
that filters traffic for a single 802.1Q VID. `tcpdump` on a VLAN interface
5+
shows only frames matching that VID, compared to *all* VIDs when listening
6+
on the lower-layer interface.
7+
8+
![VLAN interface on top of Ethernet or Bridge interfaces](img/interface-vlan-variants.svg)
9+
10+
This page covers VLAN interfaces stacked on Ethernet, on a VLAN-filtering
11+
bridge, and on other VLAN interfaces. For VLAN handling *inside* a bridge
12+
(port VIDs, tagged/untagged membership, pvid), see [VLAN Filtering
13+
Bridge](bridging.md#vlan-filtering-bridge).
14+
15+
## On Top of an Ethernet Interface
16+
17+
A VLAN interface for VID 20 on top of an Ethernet interface `eth0` is by
18+
convention named `eth0.20`.
19+
20+
<pre class="cli"><code>admin@example:/> <b>configure</b>
21+
admin@example:/config/> <b>edit interface eth0.20</b>
22+
admin@example:/config/interface/eth0.20/> <b>show</b>
23+
type vlan;
24+
vlan {
25+
tag-type c-vlan;
26+
id 20;
27+
lower-layer-if eth0;
28+
}
29+
admin@example:/config/interface/eth0.20/> <b>leave</b>
30+
</code></pre>
31+
32+
The `tag-type` defaults to `c-vlan` (802.1Q customer VLAN, EtherType 0x8100).
33+
Set to `s-vlan` (802.1ad service VLAN, EtherType 0x88A8) to terminate an outer
34+
S-Tag.
35+
36+
> [!TIP]
37+
> If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a
38+
> number, the CLI infers the interface type automatically. Otherwise
39+
> the type must be set explicitly.
40+
41+
## On Top of a Bridge
42+
43+
When the lower-layer interface is a VLAN-filtering bridge, the VLAN interface
44+
gives the CPU an IP-addressable endpoint inside the bridged broadcast domain
45+
for that VID. This pattern is named `vlanN` by convention.
46+
47+
<pre class="cli"><code>admin@example:/> <b>configure</b>
48+
admin@example:/config/> <b>edit interface vlan10</b>
49+
admin@example:/config/interface/vlan10/> <b>set vlan id 10</b>
50+
admin@example:/config/interface/vlan10/> <b>set vlan lower-layer-if br0</b>
51+
admin@example:/config/interface/vlan10/> <b>leave</b>
52+
</code></pre>
53+
54+
The bridge `br0` must have VLAN 10 configured with the bridge itself as a
55+
tagged member. See [VLAN Filtering Bridge](bridging.md#vlan-filtering-bridge)
56+
for the bridge-side configuration.
57+
58+
## Stacked (Q-in-Q)
59+
60+
VLAN interfaces can be stacked. A VLAN interface whose lower-layer is itself
61+
a VLAN interface terminates the inner tag, leaving the outer tag for the
62+
parent to handle.
63+
64+
<pre class="cli"><code>admin@example:/> <b>configure</b>
65+
admin@example:/config/> <b>edit interface eth0.10</b>
66+
admin@example:/config/interface/eth0.10/> <b>set vlan tag-type s-vlan</b>
67+
admin@example:/config/interface/eth0.10/> <b>leave</b>
68+
admin@example:/config/> <b>edit interface eth0.10.20</b>
69+
admin@example:/config/interface/eth0.10.20/> <b>show</b>
70+
type vlan;
71+
vlan {
72+
tag-type c-vlan;
73+
id 20;
74+
lower-layer-if eth0.10;
75+
}
76+
admin@example:/config/interface/eth0.10.20/> <b>leave</b>
77+
</code></pre>
78+
79+
The summary view shows each VLAN row pointing at its immediate parent:
80+
81+
<pre class="cli"><code>admin@example:/> <b>show interface</b>
82+
<span class="header">INTERFACE PROTOCOL STATE DATA </span>
83+
eth0.10 vlan UP vid: 10
84+
│ ipv4 10.0.10.1/24 (static)
85+
└ eth0
86+
eth0.10.20 vlan UP vid: 20
87+
│ ipv4 10.0.10.20/28 (static)
88+
└ eth0.10
89+
</code></pre>

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ nav:
3333
- Bridging: bridging.md
3434
- Link Aggregation: lag.md
3535
- Ethernet Interfaces: ethernet.md
36+
- VLAN Interfaces: vlan.md
3637
- IP Addressing: ip.md
3738
- Routing: routing.md
3839
- Firewall Configuration: firewall.md

0 commit comments

Comments
 (0)