Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions deploy/containerlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,11 @@ its addresses. The script works for any Kind node of the topology.

The [VLAN transport contract](../../docs/designs/vlan-transport/contract.md) needs each side of an edge node to run tagged (802.1Q) or untagged. The topology above builds untagged bonds only. `scripts/vlan-transport.sh` re-plumbs sjc at run time, without changing a manifest. It changes the public side (sjc-worker2 `bond0` to tr2 `bond1`) and the fabric side (sjc-worker2 `bond1` to sjc-worker `bond0`).

- `resources/vlan-transport/cells.env` defines cells C1 to C6 of the [acceptance matrix](../../docs/designs/vlan-transport/acceptance.md) except C5, which point-to-point links cannot build. `PUB_VID` and `FAB_VID` override a cell's IDs.
- `resources/vlan-transport/cells.env` defines cells C1 to C6 of the [acceptance matrix](../../docs/designs/vlan-transport/acceptance.md), plus C1AB and C4AB on active-backup bonds. `PUB_VID` and `FAB_VID` override a cell's IDs, `PUB_PARENT` and `FAB_PARENT` its parent per side (`bond`, `nic` or `shared`), and `BOND_MODE` its bond mode. A later `apply` changes only the side whose ID or parent differs.
- C5 needs one parent that reaches both tr2 and sjc-worker, which point-to-point links cannot give. `scripts/vlan-transport-switch.sh` adds a bridge node, `clab-gvpc-vtsw`, with four new veths. The edge's new bond `bondsw` trunks both VLANs to the bridge, which passes the public VLAN to tr2 and the fabric VLAN to sjc-worker. `apply C5` builds it and `revert` removes it. Creating the veths needs passwordless `sudo` for `containerlab tools veth create`, as `restart-node.sh` does.
- `apply` creates the VLAN netdevices on both ends of each tagged side and moves the link's addresses onto them: with `ip` on the Kind nodes and in vtysh's running configuration on tr2. It then points `galactic-gateway`, `galactic-nat` and `galactic-cni` at the new interfaces with `kubectl set env`. `SELECT=logical` names the VLAN netdevice, as the contract requires. `SELECT=parent` names the parent instead.
- sjc's single `galactic-cni` DaemonSet needs a different interface on each node once a side is tagged. `apply` gives sjc-worker2 its own copy, `galactic-cni-vt-edge`, and excludes that node from the original.
- `apply` saves the deployed settings on sjc-worker2 in `/galactic/vlan-transport.state`. `revert` uses it to restore C1. `offload on|off` toggles VLAN offloads on every transport member.
- sjc's single `galactic-cni` DaemonSet needs a different interface on each node once a side is tagged. By default `apply` gives sjc-worker2 its own copy, `galactic-cni-vt-edge`, and excludes that node from the original. `CNI_SELECT=by-node` instead sets `GALACTIC_CNI_EBPF_INTERFACES_BY_NODE` on the one DaemonSet, which needs a `galactic-cni` that reads it ([#1539](https://github.com/datum-cloud/galactic/pull/1539), for [#1404](https://github.com/datum-cloud/galactic/issues/1404)).
- `apply` saves the deployed settings on sjc-worker2 in `/galactic/vlan-transport.state`. `revert` uses it to restore C1. `offload on|off` toggles VLAN offloads on every transport member. `csum on|off` toggles their transmit checksum offload: a veth sender with it on hands a natively redirected frame on with a partial checksum, which the far end counts as a checksum error.
- `VT_SITE=dfw-worker3` re-plumbs only dfw-worker3's public side. It exists for the same-node delivery row, which `verify:edge-listener` runs on dfw. Set `EDGE_CONFORMANCE_UPLINK_DEV=dfw-worker3=bond2.101` so the test pins its VIP through the VLAN.

```bash
Expand All @@ -713,6 +714,26 @@ task variant:vlan-transport:revert

`verify-gateway-ingress*.sh` take `UPLINK_DEV="sjc-worker2=bond1.101"` to pin through a tagged transit-side device.

#### Acceptance run

`task verify:vlan-transport` runs the matrix's lab rows, V01 to V28, over the cells, the host XDP modes (`lab:xdp-mode`) and both VLAN offload states, and writes a row-by-row report:

```bash
task verify:vlan-transport DRY_RUN=1 CELL=C4 # print every step; no lab needed
task verify:vlan-transport CELL="C1 C4" ROWS="V01-V08 V11" OUT=/tmp/vt
task verify:vlan-transport # every cell, row, mode and offload state
task report:vlan-transport OUT=/tmp/vt # re-render the report
```

- `CELL` takes cell names, or `all`: C1 to C6, C4ALT (C4 with the IDs in `ALT_PUB_VID` and `ALT_FAB_VID`, default 1234 and 3456), C1AB and C4AB. Untagged cells run first, since each tagged cell's throughput, latency and recovery are compared with C1 (C1AB for C4AB) in the same XDP mode and offload state.
- `ROWS` takes row IDs, ranges such as `V01-V08`, or `all`. `XM` checks every XDP hook's mode, `NAA` reproduces the `verify:nat-active-active` finding from #1401 once, and `POST` runs sjc's untagged checks after the final revert.
- `XDP_MODES` (default `native generic`), `OFFLOADS` (default `on off`), `SELECT`, `CSUM` (default `off`) and `CNI_SELECT` set the run's configuration. `BASELINE` names a pre-change run's output for V20.
- V17 to V28 test configuration and lifecycle, so they run once per cell and XDP mode, in the first offload state.

`OUT` holds `report.md` (pinned revisions, configuration, expected against observed for every check, skips, captures and counters, commands), `results.tsv`, and a directory per cell, mode and offload state with each step's output and captures. A check is PASS, FAIL, SKIP (did not run, with the reason), BASELINE (an untagged measurement), N/A (excluded by the contract for that cell) or PLANNED (dry run). A skip is never a pass: the task exits 1 when a check failed and 3 when none failed but some were skipped. An interrupted live run still reverts sjc to C1, restores the XDP mode and writes the report.

The rows reuse the variant's scripts: `vlan-transport.sh` for cells, offloads and captures (with the tenant attachment's own capture), `vlan-transport-inject.sh` for V11 to V13, `vlan-transport-interrupt.sh` for V21 to V28 with a public, a fabric and an end-to-end probe every 20 ms, and `vlan-transport-perf.sh` for V09 (iperf3 and ping between tenants and through NAT66). Rows that call the `verify-*` scripts and tasks run them unchanged.

Hold a containerlab-manager reservation for everything except `plan`, and end with `revert` and the sjc checks: `verify-gateway-ingress*.sh --node sjc-worker2`, `verify:nat-datapath SENDER_SITE=sjc SHARD_NODE=sjc-worker2 SHARD_SITE=sjc`, `verify-ns20.sh` and `verify:bonds`. The [baseline report](../../docs/archive/benchmarks/vlan-transport-baseline-2026-11-30.md) lists which rows have run.

## Notes
Expand Down
32 changes: 32 additions & 0 deletions deploy/containerlab/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,13 @@ tasks:
cmds:
- LAB={{.LAB}} ./scripts/vlan-transport.sh offload {{.STATE}}

"variant:vlan-transport:csum":
desc: Turn transmit checksum offload on or off on every sjc transport member (STATE=on|off)
requires:
vars: [STATE]
cmds:
- LAB={{.LAB}} ./scripts/vlan-transport.sh csum {{.STATE}}

"variant:vlan-transport:status":
desc: Show the applied transport cell and sjc's transport interfaces
cmds:
Expand All @@ -1443,6 +1450,31 @@ tasks:
LAB={{.LAB}} {{if .PUB_VID}}PUB_VID={{.PUB_VID}} {{end}}{{if .FAB_VID}}FAB_VID={{.FAB_VID}} {{end}}
./scripts/vlan-transport-baseline.sh {{.CELL}} {{.SELECT | default "logical"}} {{.OUT}} {{.ROWS | default "V06 V01 V03 V05 V07"}}

# The acceptance matrix's lab rows (docs/designs/vlan-transport/
# acceptance.md, #1405), over the cells in resources/vlan-transport/
# cells.env, with a row-by-row report in OUT. DRY_RUN=1 prints every step
# and writes the report skeleton without the lab. Anything else needs the
# containerlab-manager reservation and ends with sjc back at C1.
"verify:vlan-transport":
desc: Run the VLAN transport acceptance rows with a row-by-row report (CELL=, ROWS=, XDP_MODES=, OFFLOADS=, OUT=, DRY_RUN=1)
cmds:
- >-
LAB={{.LAB}} ./scripts/verify-vlan-transport.sh
{{if .DRY_RUN}}--dry-run{{end}}
--cells "{{.CELL | default "all"}}" --rows "{{.ROWS | default "all"}}"
--xdp-modes "{{.XDP_MODES | default "native generic"}}" --offloads "{{.OFFLOADS | default "on off"}}"
--select {{.SELECT | default "logical"}} --csum {{.CSUM | default "off"}}
--cni-select {{.CNI_SELECT | default "copy"}}
{{if .BASELINE}}--baseline {{.BASELINE}}{{end}}
{{if .OUT}}--out {{.OUT}}{{end}}

"report:vlan-transport":
desc: Re-render OUT/report.md from a verify:vlan-transport run's results (OUT=)
requires:
vars: [OUT]
cmds:
- ./scripts/vlan-transport-report.sh {{.OUT}}

clean:
desc: Destroy the lab and delete artifacts
cmds:
Expand Down
34 changes: 27 additions & 7 deletions deploy/containerlab/resources/vlan-transport/cells.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
# The variant runs on the sjc site. Contract name to lab interface:
# bondpub sjc-worker2 bond0 (peer tr2 bond1) public side
# bondfab sjc-worker2 bond1 (peer sjc-worker bond0) fabric side
# PARENT=nic takes each side's first bond member out of its bond on both ends
# and uses that veth as a plain NIC.
#
# C5 (two VLANs on one parent) is not a lab cell: the lab's links are
# point-to-point, so one parent cannot reach both the external router and the
# compute node. Its kernel behaviour is measured by the vlanprobe root test
# (internal/plumbing/ebpf/vlanprobe).
# PARENT is the kind of parent for both sides; PUB_PARENT and FAB_PARENT
# override it per side, as do the same names in the environment at apply time.
# bond the side's existing bond
# nic each side's first bond member, taken out of its bond on both ends
# and used as a plain NIC
# shared C5 only: both sides on one new bond, bondsw, behind a VLAN-aware
# bridge node (scripts/vlan-transport-switch.sh) that trunks the
# public VLAN to tr2 and the fabric VLAN to sjc-worker
#
# BOND_MODE is the mode of every bond on the variant's links: 802.3ad (the
# lab's default) or active-backup.

# cell public-VID fabric-VID parent
# cell public-VID fabric-VID parent bond mode
C1_PUB_VID=
C1_FAB_VID=
C1_PARENT=bond
Expand All @@ -33,6 +38,21 @@ C4_PUB_VID=101
C4_FAB_VID=202
C4_PARENT=bond

C5_PUB_VID=101
C5_FAB_VID=202
C5_PARENT=shared

C6_PUB_VID=101
C6_FAB_VID=202
C6_PARENT=nic

# Active-backup bonds: C1AB is the untagged baseline for C4AB.
C1AB_PUB_VID=
C1AB_FAB_VID=
C1AB_PARENT=bond
C1AB_BOND_MODE=active-backup

C4AB_PUB_VID=101
C4AB_FAB_VID=202
C4AB_PARENT=bond
C4AB_BOND_MODE=active-backup
Loading
Loading