From 338a6ac741161bd226deea3dc600d8d3a63c81f3 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Mon, 23 Nov 2026 12:50:31 -0800 Subject: [PATCH 1/2] docs(wan): ADR-0131 carries the WAN through neo's SFP+ cages at 2.5G em0 is the WAN's recurring fault, and #922's 2.5G sketch is one way off it. The CODA56's 2.5G port goes into sfp-sfpplus2 and igc0 into sfp-sfpplus1, both on S+RJ10s, with the WAN as VLAN 2. The runbook reads the modules' heat and alerts on it before the cutover, because MikroTik warns against two side by side on a passive switch. The modules enter Everything still to buy; the build is #1691. Refs #922 Co-Authored-By: Claude Opus 5.5 --- README.md | 10 +- ...-the-wan-through-neos-sfp-cages-at-2-5g.md | 145 +++++++++++++ docs/changelog.md | 20 ++ docs/hardware.md | 4 +- docs/network.md | 6 +- docs/roadmap.md | 12 +- docs/runbooks/move-the-wan-onto-neo.md | 195 ++++++++++++++++++ 7 files changed, 380 insertions(+), 12 deletions(-) create mode 100644 docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md create mode 100644 docs/runbooks/move-the-wan-onto-neo.md diff --git a/README.md b/README.md index 4c9d4767..41f80157 100644 --- a/README.md +++ b/README.md @@ -136,8 +136,8 @@ documents for different readers. at all. Every pinned digest is also scanned weekly for fixable HIGH and CRITICAL CVEs, and each image with findings has an open issue until a scan finds it clean. -- **Documented decisions and runbooks.** 129 ADRs covering what was chosen - and what was rejected — including the costs accepted knowingly; 54 +- **Documented decisions and runbooks.** 130 ADRs covering what was chosen + and what was rejected — including the costs accepted knowingly; 55 runbooks for the operations that are easy to get wrong at 1am, one of which is the handover page a successor reads first. Every critical alert links to one. @@ -236,9 +236,9 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology │ ├── architecture.md network.md hardware.md │ ├── observability.md security.md roadmap.md changelog.md │ ├── diagrams/ # the network diagram (SVG) and its predecessors -│ ├── adr/ # 129 ADRs — architecture decision records +│ ├── adr/ # 130 ADRs — architecture decision records │ ├── exercises/ # purple-team exercise records — see its README -│ └── runbooks/ # 54 runbooks; successor-handover.md is the front door +│ └── runbooks/ # 55 runbooks; successor-handover.md is the front door └── Makefile # make help ``` @@ -413,7 +413,7 @@ is [`docs/changelog.md`](docs/changelog.md), dated and never rewritten. **Every purchase still outstanding is in one place**, the roadmap's [*Everything still to buy*](docs/roadmap.md#everything-still-to-buy): -10 items now, 0 later, and a rule that nothing joins them without a +11 items now, 0 later, and a rule that nothing joins them without a decision. This sentence used to carry the list itself, name three purchases coupled to the UPS work and omit the tier's host entirely, which is how one ProDesk came to be bought for two jobs. It names no current item for the diff --git a/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md b/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md new file mode 100644 index 00000000..710ed0af --- /dev/null +++ b/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md @@ -0,0 +1,145 @@ +# ADR-0131: Carry the WAN through `neo`'s SFP+ cages at 2.5G + +**Status:** Accepted · 2026-11 + +## Context + +`morpheus`'s WAN is `em0`, the ProDesk's onboard Intel I219-LM, at 1000baseT. +Five times between 2026-11-01 and 2026-11-22 it began taking inbound frames as +CRC and fragment errors on a clean full-duplex link. Each time, downloads fell +to a few Mbit/s while upload and latency looked normal, and `WanReceiveErrors` +fired. On 2026-11-22 the errors carried on across a new modem, a re-plug at +`em0` and a different cable, and stopped when `morpheus` was rebooted +([#1594](https://github.com/Gerrrt/HomeLab/issues/1594), the changelog's +2026-11-22 entry). The fault is `em0`'s own state. Rebooting clears it, and +nothing so far has stopped it coming back. + +[#922](https://github.com/Gerrrt/HomeLab/issues/922) asked a different +question: whether the 2000/250 Mbit/s plan is worth paying for when every +port in the house is gigabit. It sketched a 2.5G WAN through the CRS326's two +SFP+ cages, and its data (2026-10-10 to 2026-11-09) found no need for it: +download peaked at 71% of ~940 Mbit/s and never held above 85%. On that data +the plan was to downgrade. + +Two facts have changed since #922 was written: + +- **The WAN has to leave `em0` anyway.** Any design that does so ends the + recurring fault. #922's sketch is one of them. +- **The modem's port is now trusted.** The XB7's striped 2.5G port was + blamed for the early incidents. The CODA56 that replaced it has one port, + 2.5G, and the faults that followed it were `em0`'s. + +`morpheus` has one other NIC: `igc0`, an Intel I226-V on an M.2 adapter, +2.5G-capable, today meeting `neo`'s `ether1` at 1000baseT as the LAN trunk +and the untagged switch LAN (VLAN 7, +[ADR-0041](0041-run-the-crs326-on-routeros-and-keep-neo-and-its-switch-lan.md)). +`neo`'s copper ports are all gigabit. Its two SFP+ cages, `sfp-sfpplus1` and +`sfp-sfpplus2` (ports 25 and 26), are empty and are not bridge ports. CRS3xx +runs SFP+ at a true 2.5G since RouterOS 7.3, and `neo` runs 7.24.6. + +## Decision + +**The WAN becomes VLAN 2 on `neo`. The CODA56's 2.5G port goes into +`sfp-sfpplus2`, and `igc0` moves from `ether1` to `sfp-sfpplus1` at 2.5G, +carrying the WAN tagged beside the LAN VLANs. Both cages take a MikroTik +S+RJ10. `em0` leaves service. The 2000/250 plan stays.** + +1. **Two MikroTik S+RJ10 modules**, genuine, the module MikroTik's + compatibility table lists for the CRS326-24G-2S+. They enter through the + roadmap's *Everything still to buy*. +2. **On `neo`, VLAN 2 touches two ports and nothing else.** `sfp-sfpplus2` + joins the bridge with PVID 2, admits untagged frames only, and is an edge + port. VLAN 2 is untagged on `sfp-sfpplus2`, tagged on `sfp-sfpplus1`, and + not a member of the bridge's own interface, so the switch has no address + and no service on the WAN. The VID is arbitrary. 2 is unused, and the + segment VLANs keep their tens. +3. **`sfp-sfpplus1` takes over `ether1`'s role whole.** PVID 7 for the + untagged switch LAN, the same frame admission, and tagged membership of + every segment VLAN that `ether1` carries today, plus VLAN 2. `ether1` is + left configured until the cutover has held, then emptied. The way back + into the switch stays untagged and stays on the trunk, as ADR-0041 + requires. Only the cage it arrives through changes. +4. **On `morpheus`, WAN is reassigned from `em0` to `igc0.2`**, with `em0`'s + MAC set on the new interface. The modem and the ISP then see the same + client, so the DHCP lease and the public address can carry over, and with + them the dynamic DNS record of + [ADR-0044](0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md). + pfSense's rules, NAT and the WireGuard `rdr` name the WAN interface, not + `em0`, so they follow the assignment. +5. **Heat is watched before it is trusted.** MikroTik's S+RJ10 guidance says + not to place two side by side, and to add cooling where they must be or + where the device is passive. The CRS326 is passive, and its two cages are + adjacent, so this design does exactly what the guidance warns about. The + module runs in 0–70 °C ambient and can itself reach 90 °C. U22 above the + switch is already a vented blank for this. The modules' DDM temperature + joins `neo`'s SNMP scrape, with an alert, before the cutover, and the + cutover waits until an hour of both modules idling in the cages has been + read. +6. **Monitoring follows the WAN.** The recording rules and + `WanReceiveErrors` move from `em0` to `igc0` and `neo`'s + `sfp-sfpplus2`, and `homelab_wan_capacity_bits_per_second`'s receive + figure moves from ~940 Mbit/s to what the plan delivers through the new + path, measured. + +The procedure is +[`move-the-wan-onto-neo.md`](../runbooks/move-the-wan-onto-neo.md), and the +build is [#1691](https://github.com/Gerrrt/HomeLab/issues/1691). This +decides #922: the plan stays, and the 2.5G path is built. + +## Considered and rejected + +- **The WAN as a VLAN on the existing 1G trunk, with the modem on a copper + port.** It costs nothing and fixes `em0` just as well. It was the + recommendation put to the operator on 2026-11-23. It caps the WAN at + ~940 Mbit/s and puts WAN, LAN and inter-VLAN traffic on one gigabit + trunk. The operator chose to pay ~$130 to make the plan usable and to + lift the trunk to 2.5G at the same time. It stays the fallback if the + modules run too hot. It needs no purchase and reuses this ADR's VLAN 2 + configuration on a copper port. +- **One S+RJ10, for `igc0` only, with the modem on a copper port.** It has + half the heat, but the WAN stays at ~940. It is the step down if two + modules side by side cannot be held under the alert. +- **A second add-on NIC for the WAN.** The Mini's add-on NIC already takes + its spare M.2 slot. A USB NIC on a firewall's WAN would trade one + unreliable port for another. +- **Downgrading the plan, as #922's data suggested.** It saves money and + leaves `em0` where it is, so it does not touch the fault. +- **Keeping `em0` and rebooting on `WanReceiveErrors`.** It works, and it + stays the remedy until the cutover. Each recurrence costs slow internet + until someone sees the alert and is home to reboot the firewall. + +## Consequences + +- **The internet becomes a VLAN on the core switch.** A bridge commit that + puts VLAN 2 on any other port hands that port a public DHCP lease from the + ISP, around the firewall. A reboot or a bad commit on `neo` now takes the + WAN down as well as the LAN. Two things guard against the first: + `SwitchPortVlanChanged` sees a PVID change on any bridge port, the cages + included once they join the bridge; and the port map in + [`network.md`](../network.md) names VLAN 2's two ports. The rollback is + physical and short: the modem's cable back into `em0`, and WAN reassigned + to `em0`. `em0` therefore stays in `morpheus`, unassigned, not removed. +- **One device still tops out at ~940 Mbit/s.** Every client NIC is gigabit. + The plan's 2000 is reachable only in aggregate, which is what #922 said. +- **`igc0` now carries everything.** Downloads arrive on its receive side + and leave on its transmit side towards the LAN, so the 2.5G full-duplex + trunk is shared by WAN, LAN and inter-VLAN traffic. That is more headroom + than today's 1G trunk carries for LAN alone. `igc0` is also the I226-V, + a family with its own history of dropped links. Energy-Efficient Ethernet + is checked and kept off on it, as it is on `em0`. +- **These current-state documents change in the PR that records the + cutover**, not in this one: + - [`network.md`](../network.md): the WAN and LAN notes, the port map and + `[^adapter]`; + - [`hardware.md`](../hardware.md): the CRS326 row, U22's note and the WAN + table; + - [`security.md`](../security.md) and + [`architecture.md`](../architecture.md), wherever they place the WAN on + `em0`; + - the network diagram and its PNG; + - [`move-into-the-32u-rack.md`](../runbooks/move-into-the-32u-rack.md) + §6.1; + - the `em0` series in `internet.rules.yaml`, its tests, the Internet + dashboard and Glance's network page. + + Until then they describe `em0`, which is still true. diff --git a/docs/changelog.md b/docs/changelog.md index cd1f666c..9d07c8f8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,26 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-23 +- **#922 closed: the 2000/250 plan stays, and the WAN moves off `em0` + through `neo`'s SFP+ cages at 2.5G + ([ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md)).** + #922's own data, 2026-10-10 to 2026-11-09, said the 2.5G path bought no + throughput and pointed to a downgrade. What changed the answer is + 2026-11-22's finding that `em0` itself is the WAN's fault. Every design + that takes the WAN off `em0` ends it, and #922's sketch is one of them, + with the CODA56's 2.5G port now trusted where the XB7's was not. The free + alternative, VLAN 2 on the existing gigabit trunk with the modem on a + copper port, was recommended and fixes `em0` as well. The operator chose + the two-module build, so that the plan's 2000 is usable in aggregate and + the trunk goes to 2.5G. MikroTik's S+RJ10 guidance warns against two + modules side by side on a passive switch, which is this design, so the + runbook reads an hour of idle temperatures and puts an alert on them before + the cutover, and the copper-port VLAN stays the fallback. The two S+RJ10s + entered *Everything still to buy*. The build is + [#1691](https://github.com/Gerrrt/HomeLab/issues/1691), by + [`move-the-wan-onto-neo.md`](runbooks/move-the-wan-onto-neo.md). Until then + the remedy for `WanReceiveErrors` is still rebooting `morpheus`. + - **The monitoring host's weekly prune also removes anonymous volumes that no container uses.** The 2026-11-13 audit of `prometheus` found 69 of them, and there were 99 by today, left behind by validation and scratch runs. diff --git a/docs/hardware.md b/docs/hardware.md index c87b6bc4..945e89cd 100644 --- a/docs/hardware.md +++ b/docs/hardware.md @@ -23,8 +23,8 @@ below. | U25–U32 | ViewSonic N1700W on an 8U VESA rack mount | PDU outlet 9, by its 12 V brick | The very top. The console's height frees the middle of the rack for air between machines. Light, so high is fine | | U24 | 1U sliding keyboard and mouse shelf[^Drawer] | — | Directly under the screen, about 112 cm up. Front-mounted, 10.8" deep. It wobbles on its ear screws alone, so the KVM's shelf below it is mounted upside down with its flat top pressed against the drawer's underside, in place of the support rails the plan had | | U23 | MT-VIKI 8-port KVM[^KVM], on a 1U vented shelf | PDU outlet 10 | Beside the console, so its console cables are short. Its lead sets reach the DL360 20 units down. The shelf is because the KVM is sold as a half-U device: its ears take two of a unit's three holes, unevenly spaced, so it sits off centre whichever pair is used. The shelf takes all three | -| U22 | Vented blank | — | Air over the CRS326. It is passive, and two S+RJ10s side by side need "additional cooling" ([MikroTik's guidance](https://help.mikrotik.com/docs/spaces/ROS/pages/240156916/S+RJ10+general+guidance)) if the 2.5G WAN work goes ahead | -| U21 | MikroTik CRS326-24G-2S+RM[^CRS326] (`neo`) | PDU outlet 4 | Core switching, in place of the MokerLink[^MokerLink] that was at U9 of the 9U frame ([#444](https://github.com/Gerrrt/HomeLab/issues/444)). SFP+ 1–2 are the 2.5G path, if built | +| U22 | Vented blank | — | Air over the CRS326. It is passive, and two S+RJ10s side by side need "additional cooling" ([MikroTik's guidance](https://help.mikrotik.com/docs/spaces/ROS/pages/240156916/S+RJ10+general+guidance)) when the 2.5G WAN is built ([ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md)). The two modules' temperatures are scraped and alerted on before the cutover | +| U21 | MikroTik CRS326-24G-2S+RM[^CRS326] (`neo`) | PDU outlet 4 | Core switching, in place of the MokerLink[^MokerLink] that was at U9 of the 9U frame ([#444](https://github.com/Gerrrt/HomeLab/issues/444)). SFP+ 1–2 are the 2.5G path decided by [ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md), empty until its two S+RJ10s are bought ([#1691](https://github.com/Gerrrt/HomeLab/issues/1691)) | | U20 | 1U horizontal cable manager | — | Strain relief between switch and panel. A tugged hand-crimped WAN plug was the slow internet #914 traced (#923) | | U19 | Jadol 24-port patch panel[^Panel] | — | Next to the switch, so its patch cords stay short. The house's in-wall runs reach it | | U18 | Lenovo ThinkCentre M80q on a 1U Tiny mount[^Tinymount] (`gandalf`) | PDU outlet 8, by its brick | The offensive range (ADR-0007, ADR-0017), beside the other two 1-litre boxes. Proxmox VE 9 since 2026-11-07, on `neo`'s `ether20`, and off between range sessions. Front-mounted, 6.6" deep, on support rails under its rear like the drawer | diff --git a/docs/network.md b/docs/network.md index 81ddafe2..57e3ae45 100644 --- a/docs/network.md +++ b/docs/network.md @@ -98,7 +98,11 @@ truth for what a box actually does. rebooted. So **the remedy is rebooting `morpheus`**, not the modem or the cable. The earlier incidents blamed on the XB7's ports (2026-11-01, 11-07, 11-18, 11-21) were cleared by re-plugging, which also reset `em0`'s link. - Taking the WAN off `em0` is the durable fix, and it is not decided. + Taking the WAN off `em0` is the durable fix. + [ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md) + decided it on 2026-11-23: VLAN 2 through `neo`'s SFP+ cages to `igc0` at + 2.5G. It is not built yet ([#1691](https://github.com/Gerrrt/HomeLab/issues/1691)), + so this link is still `em0`, and rebooting is still the remedy. - The modem is a modem only: no router and no Wi-Fi radio. All wireless is handled by eero units on tagged VLANs. - **One inbound pass, and one only** — the WireGuard endpoint decided by diff --git a/docs/roadmap.md b/docs/roadmap.md index 47e1675a..27ada718 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -81,10 +81,13 @@ Closes when it is empty. ([postlund/pyatv#2930](https://github.com/postlund/pyatv/pull/2930) or an equivalent). The component and its package go then. The mount stays while `ring_push_guard` does. -- **[#922](https://github.com/Gerrrt/HomeLab/issues/922) Decide: a 2.5 Gbit - WAN, or a cheaper plan.** The decision was due around 2026-11-03, on four - weeks of `WanLinkSaturated`. If it implies a purchase, the purchase enters - through *Everything still to buy* in the same PR that decides it. +- **[#1691](https://github.com/Gerrrt/HomeLab/issues/1691) Move the WAN + off `em0`, through `neo`'s SFP+ cages at 2.5G.** Decided by + [ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md); + the procedure is + [`move-the-wan-onto-neo.md`](runbooks/move-the-wan-onto-neo.md). Gate: the + two S+RJ10s in *Everything still to buy*. Until it is built, the remedy for + `WanReceiveErrors` is rebooting `morpheus`. - **[#1454](https://github.com/Gerrrt/HomeLab/issues/1454) Deploy MakeMKV on `smaug`.** Decided by [ADR-0114](adr/0114-rip-discs-on-smaug-with-makemkv-started-only-to-rip.md): @@ -173,6 +176,7 @@ move and stay until they are bought or dropped. | Item | For | Decided by | When it is needed | | --- | --- | --- | --- | +| 2 × MikroTik S+RJ10, genuine | `neo`'s two SFP+ cages: the CODA56's 2.5G port into `sfp-sfpplus2`, `morpheus`'s `igc0` into `sfp-sfpplus1`, taking the WAN off `em0` ([#1691](https://github.com/Gerrrt/HomeLab/issues/1691)) | [ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md), the operator, 2026-11-23 | Now: until it is built, every `em0` fault is a reboot of the firewall | | Switched, SNMP-managed 1U PDU, eight outlets or more: APC AP7900B class | Remote power-cycling for the four hosts without a BMC: `morpheus`, `trinity`, `gandalf`, `smaug`. It replaces the strip at U4; the screen's brick and the KVM move to the UPS's own outlets, so eight outlets suffice | The operator, 2026-10-16. **Its segment and hardening are an ADR before it is cabled**, as [ADR-0036](adr/0036-poll-the-ilo-and-the-ups-card-over-snmpv3-and-keep-the-firewall-on-bsnmpd.md) was for the iLO and the UPS card | Now that the #919 move is done: a management-plane device, not a move part | | USB-to-RJ45 serial console cable | The CRS326's console port: the way back in when its UI is unreachable, which is the swap runbook's rollback case | The operator, 2026-10-16 | Any time; the #919 move is done | | Label maker with flag tape, or self-laminating wrap labels | Both ends of every lead, and the panel and switch ports: the physical half of the port map the swap runbook captures | The operator, 2026-10-16 | Any time; the #919 move is done | diff --git a/docs/runbooks/move-the-wan-onto-neo.md b/docs/runbooks/move-the-wan-onto-neo.md new file mode 100644 index 00000000..46165273 --- /dev/null +++ b/docs/runbooks/move-the-wan-onto-neo.md @@ -0,0 +1,195 @@ +# Runbook: Move the WAN onto `neo` + +**Target:** `morpheus`'s WAN, from `em0` (onboard I219, 1000baseT) to +`igc0.2`, VLAN 2 through `neo`'s SFP+ cages at 2.5G +**Time:** an hour of preparation with nothing interrupted, then a 30-minute +window: about a minute with the LAN down, and up to fifteen with the +internet down +**You will need:** two MikroTik S+RJ10 modules, physical access to the rack, +a workstation on Hicks, the switch's serial console cable if you have one, and +`em0`'s MAC address read from `morpheus` (it is not in this repository) + +[ADR-0131](../adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md) +decided the shape. This is how it gets there, +[#1691](https://github.com/Gerrrt/HomeLab/issues/1691). The end state: + +| Port | What | VLANs | +| --- | --- | --- | +| `neo` `sfp-sfpplus1` (port 25), S+RJ10 | `morpheus`'s `igc0`, 2.5G | 7 untagged (PVID 7); 2 and every segment VLAN tagged | +| `neo` `sfp-sfpplus2` (port 26), S+RJ10 | The CODA56's 2.5G port | 2 untagged (PVID 2), untagged frames only | +| `neo` `ether1` | Empty, once the cutover has held | none | +| `morpheus` `em0` | Unassigned, cable-free, kept for rollback | — | + +## Read this part first + +1. **VLAN 2 is the internet.** If it reaches any port but the two above, a + device on that port gets a public address from the ISP, with no firewall in + front of it. Before each commit, read `/interface bridge vlan print` and + confirm VLAN 2 names `sfp-sfpplus1` and `sfp-sfpplus2` and nothing else. +2. **`igc0`'s move is the management path's move.** The switch LAN rides + `ether1`'s PVID today. `sfp-sfpplus1` must carry PVID 7 and the same + frame admission before the cable moves, or the workstation loses the + switch. Do every `neo` change in RouterOS Safe Mode (`Ctrl+X` in the + terminal), so a lost session undoes it. The serial console is the way in + that depends on none of this. +3. **The two modules sit side by side on a passive switch**, which is what + MikroTik's + [S+RJ10 guidance](https://help.mikrotik.com/docs/spaces/ROS/pages/240156916/S+RJ10+general+guidance) + warns against. Do not start Phase 2 until §1.2's hour of temperatures + has been read and the alert exists. +4. **Until Phase 2, the remedy for `WanReceiveErrors` is still rebooting + `morpheus`.** Nothing in Phase 1 changes the WAN. + +--- + +## Phase 1 — preparation, nothing interrupted + +### 1.1 Back up both ends + +- `morpheus`: *Diagnostics → Backup & Restore*, download the configuration. + Keep it off the repository. +- `neo`: `/export file=pre-wan` and copy `pre-wan.rsc` off the switch. +- Read and write down, outside the repository: `em0`'s MAC + (`ifconfig em0 | grep ether`), the WAN's current public address and its + IPv6 prefix (*Status → Interfaces*). + +### 1.2 Seat the modules and read their heat + +Insert both S+RJ10s, `sfp-sfpplus1` and `sfp-sfpplus2`, with nothing +plugged into them. Then: + +``` +/interface ethernet monitor sfp-sfpplus1,sfp-sfpplus2 once +``` + +Each should show the module (`sfp-module-present: yes`, vendor MikroTik, +part S+RJ10) and an `sfp-temperature`. Read it again after an hour. Write +both readings, and the room's temperature, into #1691. + +Then add the temperature to the scrape, so Phase 2 is watched: + +- Walk MIKROTIK-MIB's optical table with `scripts/snmp-walk.sh` and confirm + the temperature column (`mtxrOpticalTemperature`, under + `1.3.6.1.4.1.14988.1.1.19.1`) returns a row per module, as + `generator.yaml`'s other modules were measured before they were written. +- Add it to the `neo` module in + `stacks/observability/snmp-exporter/generator.yaml`, and add a warning + alert to `network.rules.yaml` for either module at 80 °C or more for ten + minutes, with a test. The module can reach 90 °C itself, so 80 leaves + room to act. +- Deploy it, and see both series in Prometheus before going on. + +If an idle module already reads within 10 °C of the alert, stop here. +ADR-0131's fallback is one module, or none. + +### 1.3 Prepare `neo`'s bridge + +Nothing below changes a port with a link. In Safe Mode: + +1. Read `ether1`'s port entry, so `sfp-sfpplus1` can match it: + ``` + /interface bridge port print detail where interface=ether1 + /interface bridge vlan print + ``` +2. Add `sfp-sfpplus1` to the bridge with `ether1`'s `pvid` (7), + `frame-types` and `ingress-filtering`. Add it to the `tagged` list of + every VLAN entry where `ether1` is tagged. +3. Add `sfp-sfpplus2`: + ``` + /interface bridge port add bridge= interface=sfp-sfpplus2 pvid=2 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes edge=yes + /interface bridge vlan add bridge= vlan-ids=2 tagged=sfp-sfpplus1 untagged=sfp-sfpplus2 + ``` + `` is the name `/interface bridge print` shows. +4. Re-read `/interface bridge vlan print`. VLAN 2 names the two cages and + nothing else, and not the bridge itself. Leave Safe Mode to commit. + +`SwitchPortVlanChanged` cannot fire on this, because the cages were not +bridge ports before. Their `dot1qPvid` rows appear now, reading 7 and 2. + +### 1.4 Prepare `morpheus` + +1. *Interfaces → Assignments → VLANs → Add*: parent `igc0`, tag `2`, + description `WAN`. Do not assign it yet. +2. Read `igc0`'s Energy-Efficient Ethernet setting (`sysctl dev.igc.0 | grep + -i eee`). If it is on, turn it off in a loader tunable, the way `em0`'s + is, so it survives a reboot. + +--- + +## Phase 2 — the window + +Silence alerts with `component=~"internet|network"` for an hour, from +`prometheus`, as [`move-into-the-32u-rack.md`](move-into-the-32u-rack.md) §2 +does. Delete the silence at the end, not on expiry. + +### 2.1 Move the trunk: `igc0` to `sfp-sfpplus1` + +Move the cable from `neo`'s `ether1` to the S+RJ10 in `sfp-sfpplus1`. The +LAN is down for as long as that takes. + +- On `morpheus`: `ifconfig igc0` reads `2500Base-T `. +- On `neo`: `/interface ethernet monitor sfp-sfpplus1 once` reads + `rate: 2.5Gbps` and `full-duplex: yes`. +- From the workstation: `https://10.7.7.2/` answers, and a host on each + segment reaches its gateway. + +**Rollback A:** the cable back to `ether1`. Its configuration is untouched. + +### 2.2 Move the WAN: the modem to `sfp-sfpplus2`, WAN to `igc0.2` + +1. Move the modem's cable from `em0` to the S+RJ10 in `sfp-sfpplus2`. + `sfp-sfpplus2` should read `2.5Gbps`. +2. *Interfaces → Assignments*: set WAN to `igc0.2` (VLAN 2 on `igc0`). + Save, then apply. +3. *Interfaces → WAN*: set *MAC Address* to `em0`'s, as read in §1.1. Save, + then apply. +4. *Status → Interfaces*: WAN has an address, the IPv6 prefix is delegated, + and *Status → Dynamic DNS* shows the record current. If WAN has no lease + within two minutes, unplug the CODA56's brick from PDU outlet 5 for 30 + seconds. The modem then learns the client again. +5. Run a speed test from a wired host and one from speedtest-tracker's UI. + Expect about 940 down on the wired host, which is the client's own + gigabit port. The tracker's figure is the one to record. + +**Rollback B:** the modem's cable back into `em0`, and WAN reassigned to +`em0`, with the *MAC Address* field cleared. Then Rollback A if the trunk is +also suspect. + +### 2.3 Close the window + +- `netstat -I igc0 -w 5` for a minute: `errs` stays at 0. +- The two modules' temperatures under load are in Prometheus. +- Delete the silence. + +--- + +## Phase 3 — the configuration and the documents + +In one PR, with the facts the window measured: + +- **`internet.rules.yaml` and its tests.** The recording rules match the + WAN by `pfInterfacesIfDescr`. Replace `0x656D30` (`em0`) with the hex of + the new interface's description, read from the exporter rather than + derived. `WanReceiveErrors` reads `ifInErrors` on `igc0` from `morpheus` + and on `sfp-sfpplus2` from `neo`. Its description drops the reboot remedy + and says which end counted. The receive figure in + `homelab_wan_capacity_bits_per_second` becomes the plan's usable rate, as + measured in §2.2. The comment at the top of the file stops calling the + port the ceiling. +- **The Internet dashboard and Glance's network page**, wherever they name + `em0`. +- `grep -rnE 'em0|0x656D30|ether1\b|port 1\b' docs stacks` and settle + every hit. A record (the changelog, an ADR, an exercise) is left as + written. +- **The current-state documents** ADR-0131's *Consequences* lists, and the + diagram's PNG re-rendered in the same commit. +- **The changelog**, a dated entry: the window, both modules' + temperatures idle and under load, the speed test, and anything that went + differently from here. + +Then empty `ether1`: remove it from the VLAN entries and from the bridge, in +Safe Mode. `SwitchInterfaceDown` stays quiet, because the port has been down +since the window. + +Close #1691 after a week on `igc0.2` with `WanReceiveErrors` quiet and both +modules under the temperature alert. From c1261b04a1636b237facc2d9beac43b36209714b Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Mon, 23 Nov 2026 13:02:16 -0800 Subject: [PATCH 2/2] docs(wan): no MAC cloning, scrape crs326's errors and heat, measure the aggregate pfSense makes a VLAN interface's MAC read-only, so the WAN arrives with igc0's MAC and the modem is power-cycled to learn it. The crs326 module gains ifInErrors and the S+RJ10 temperature, with snmp.yaml regenerated. The window's silence leaves the temperature alert live, and capacity is an aggregate across several gigabit clients rather than one speed test. The runbook's fences take a language and blank lines, for markdownlint. Co-Authored-By: Claude Opus 5.5 --- ...-the-wan-through-neos-sfp-cages-at-2-5g.md | 24 ++-- docs/runbooks/move-the-wan-onto-neo.md | 126 +++++++++++------- 2 files changed, 92 insertions(+), 58 deletions(-) diff --git a/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md b/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md index 710ed0af..29444fd0 100644 --- a/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md +++ b/docs/adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md @@ -59,13 +59,16 @@ S+RJ10. `em0` leaves service. The 2000/250 plan stays.** left configured until the cutover has held, then emptied. The way back into the switch stays untagged and stays on the trunk, as ADR-0041 requires. Only the cage it arrives through changes. -4. **On `morpheus`, WAN is reassigned from `em0` to `igc0.2`**, with `em0`'s - MAC set on the new interface. The modem and the ISP then see the same - client, so the DHCP lease and the public address can carry over, and with - them the dynamic DNS record of - [ADR-0044](0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md). - pfSense's rules, NAT and the WireGuard `rdr` name the WAN interface, not - `em0`, so they follow the assignment. +4. **On `morpheus`, WAN is reassigned from `em0` to `igc0.2`**, with + `igc0`'s own MAC, and the modem is power-cycled to learn it. pfSense makes + a VLAN interface's MAC read-only, and cloning `em0`'s onto the parent + `igc0` would change the gateway's MAC on every segment, so `em0`'s MAC + does not carry over. The ISP may lease a new public address. The dynamic + DNS client of + [ADR-0044](0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md) + follows it, as it would after any lease change. pfSense's rules, NAT and + the WireGuard `rdr` name the WAN interface, not `em0`, so they follow the + assignment. 5. **Heat is watched before it is trusted.** MikroTik's S+RJ10 guidance says not to place two side by side, and to add cooling where they must be or where the device is passive. The CRS326 is passive, and its two cages are @@ -74,12 +77,15 @@ S+RJ10. `em0` leaves service. The 2000/250 plan stays.** switch is already a vented blank for this. The modules' DDM temperature joins `neo`'s SNMP scrape, with an alert, before the cutover, and the cutover waits until an hour of both modules idling in the cages has been - read. + read. The temperature alert is left out of the window's silence. 6. **Monitoring follows the WAN.** The recording rules and `WanReceiveErrors` move from `em0` to `igc0` and `neo`'s `sfp-sfpplus2`, and `homelab_wan_capacity_bits_per_second`'s receive figure moves from ~940 Mbit/s to what the plan delivers through the new - path, measured. + path. That is measured as an aggregate across several wired clients at + once, because every client in the house, `prometheus` and its speed test + included, is gigabit. `neo`'s `crs326` module gains `ifInErrors` and the + modules' temperature for this, and `snmp.yaml` is regenerated from it. The procedure is [`move-the-wan-onto-neo.md`](../runbooks/move-the-wan-onto-neo.md), and the diff --git a/docs/runbooks/move-the-wan-onto-neo.md b/docs/runbooks/move-the-wan-onto-neo.md index 46165273..5ad55618 100644 --- a/docs/runbooks/move-the-wan-onto-neo.md +++ b/docs/runbooks/move-the-wan-onto-neo.md @@ -6,8 +6,7 @@ window: about a minute with the LAN down, and up to fifteen with the internet down **You will need:** two MikroTik S+RJ10 modules, physical access to the rack, -a workstation on Hicks, the switch's serial console cable if you have one, and -`em0`'s MAC address read from `morpheus` (it is not in this repository) +a workstation on Hicks, and the switch's serial console cable if you have one [ADR-0131](../adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md) decided the shape. This is how it gets there, @@ -36,8 +35,15 @@ decided the shape. This is how it gets there, MikroTik's [S+RJ10 guidance](https://help.mikrotik.com/docs/spaces/ROS/pages/240156916/S+RJ10+general+guidance) warns against. Do not start Phase 2 until §1.2's hour of temperatures - has been read and the alert exists. -4. **Until Phase 2, the remedy for `WanReceiveErrors` is still rebooting + has been read and the alert is live. +4. **The public address may change.** pfSense does not let a VLAN interface + take another MAC, and cloning `em0`'s onto `igc0` would change the + gateway's MAC on every segment. So the WAN arrives with `igc0`'s MAC, the + modem is power-cycled to learn it, and the ISP may lease a new address. + The dynamic DNS client of + [ADR-0044](../adr/0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md) + follows it, and the remote path waits for that record. +5. **Until Phase 2, the remedy for `WanReceiveErrors` is still rebooting `morpheus`.** Nothing in Phase 1 changes the WAN. --- @@ -49,16 +55,15 @@ decided the shape. This is how it gets there, - `morpheus`: *Diagnostics → Backup & Restore*, download the configuration. Keep it off the repository. - `neo`: `/export file=pre-wan` and copy `pre-wan.rsc` off the switch. -- Read and write down, outside the repository: `em0`'s MAC - (`ifconfig em0 | grep ether`), the WAN's current public address and its - IPv6 prefix (*Status → Interfaces*). +- Write down, outside the repository, the WAN's current public address and + its IPv6 prefix (*Status → Interfaces*), to compare after the window. -### 1.2 Seat the modules and read their heat +### 1.2 Seat the modules, read their heat, and scrape it Insert both S+RJ10s, `sfp-sfpplus1` and `sfp-sfpplus2`, with nothing plugged into them. Then: -``` +```text /interface ethernet monitor sfp-sfpplus1,sfp-sfpplus2 once ``` @@ -66,18 +71,30 @@ Each should show the module (`sfp-module-present: yes`, vendor MikroTik, part S+RJ10) and an `sfp-temperature`. Read it again after an hour. Write both readings, and the room's temperature, into #1691. -Then add the temperature to the scrape, so Phase 2 is watched: - -- Walk MIKROTIK-MIB's optical table with `scripts/snmp-walk.sh` and confirm - the temperature column (`mtxrOpticalTemperature`, under - `1.3.6.1.4.1.14988.1.1.19.1`) returns a row per module, as - `generator.yaml`'s other modules were measured before they were written. -- Add it to the `neo` module in - `stacks/observability/snmp-exporter/generator.yaml`, and add a warning - alert to `network.rules.yaml` for either module at 80 °C or more for ten - minutes, with a test. The module can reach 90 °C itself, so 80 leaves - room to act. -- Deploy it, and see both series in Prometheus before going on. +Then put two things into the `crs326` module, the one +`prometheus/targets/snmp.yaml` selects for `neo`. Its walk has neither today: + +- **The modules' temperature**, MIKROTIK-MIB's `mtxrOpticalTemperature`, + under `1.3.6.1.4.1.14988.1.1.19.1`. Add MIKROTIK-MIB to + `scripts/snmp-mibs.sh`, which does not fetch it yet. +- **`ifInErrors`**, `1.3.6.1.2.1.2.2.1.14`, so that Phase 3's + `WanReceiveErrors` can read the modem-facing port from the switch's side. + +The steps: + +1. Walk both with `scripts/snmp-walk.sh` first, as `generator.yaml`'s other + modules were measured. The temperature should return one row per + module. +2. Add them to the `crs326` walk in + `stacks/observability/snmp-exporter/generator.yaml`. Then run + `make snmp-mibs` and `make snmp-generate`, so that the `snmp.yaml` the + exporter loads is regenerated. Editing the generator alone changes + nothing. +3. Add `SwitchSfpModuleHot` to `network.rules.yaml`, with a test: either + module at 80 °C or more for ten minutes, warning. The module can reach + 90 °C itself, so 80 leaves room to act. +4. Deploy, and see both modules' temperatures and `ifInErrors` for + `sfp-sfpplus2` in Prometheus before going on. If an idle module already reads within 10 °C of the alert, stop here. ADR-0131's fallback is one module, or none. @@ -87,19 +104,23 @@ ADR-0131's fallback is one module, or none. Nothing below changes a port with a link. In Safe Mode: 1. Read `ether1`'s port entry, so `sfp-sfpplus1` can match it: - ``` + + ```text /interface bridge port print detail where interface=ether1 /interface bridge vlan print ``` + 2. Add `sfp-sfpplus1` to the bridge with `ether1`'s `pvid` (7), `frame-types` and `ingress-filtering`. Add it to the `tagged` list of every VLAN entry where `ether1` is tagged. -3. Add `sfp-sfpplus2`: - ``` +3. Add `sfp-sfpplus2`. `` is the name `/interface bridge print` + shows: + + ```text /interface bridge port add bridge= interface=sfp-sfpplus2 pvid=2 frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes edge=yes /interface bridge vlan add bridge= vlan-ids=2 tagged=sfp-sfpplus1 untagged=sfp-sfpplus2 ``` - `` is the name `/interface bridge print` shows. + 4. Re-read `/interface bridge vlan print`. VLAN 2 names the two cages and nothing else, and not the bridge itself. Leave Safe Mode to commit. @@ -118,9 +139,11 @@ bridge ports before. Their `dot1qPvid` rows appear now, reading 7 and 2. ## Phase 2 — the window -Silence alerts with `component=~"internet|network"` for an hour, from -`prometheus`, as [`move-into-the-32u-rack.md`](move-into-the-32u-rack.md) §2 -does. Delete the silence at the end, not on expiry. +From `prometheus`, silence `component=~"internet|network"` with +`alertname!="SwitchSfpModuleHot"` for an hour, as +[`move-into-the-32u-rack.md`](move-into-the-32u-rack.md) §2 does. The +module-temperature alert stays live: the window is the modules' first time +under load. Delete the silence at the end, not on expiry. ### 2.1 Move the trunk: `igc0` to `sfp-sfpplus1` @@ -141,24 +164,29 @@ LAN is down for as long as that takes. `sfp-sfpplus2` should read `2.5Gbps`. 2. *Interfaces → Assignments*: set WAN to `igc0.2` (VLAN 2 on `igc0`). Save, then apply. -3. *Interfaces → WAN*: set *MAC Address* to `em0`'s, as read in §1.1. Save, - then apply. -4. *Status → Interfaces*: WAN has an address, the IPv6 prefix is delegated, - and *Status → Dynamic DNS* shows the record current. If WAN has no lease - within two minutes, unplug the CODA56's brick from PDU outlet 5 for 30 - seconds. The modem then learns the client again. -5. Run a speed test from a wired host and one from speedtest-tracker's UI. - Expect about 940 down on the wired host, which is the client's own - gigabit port. The tracker's figure is the one to record. - -**Rollback B:** the modem's cable back into `em0`, and WAN reassigned to -`em0`, with the *MAC Address* field cleared. Then Rollback A if the trunk is -also suspect. +3. Unplug the CODA56's brick from PDU outlet 5 for 30 seconds, then plug it + back in, so the modem learns the new client. Wait for it to come online. +4. *Status → Interfaces*: WAN has an address, and the IPv6 prefix is + delegated. Compare them with §1.1. *Status → Dynamic DNS* shows the + record current with the address WAN now holds. +5. Speed tests, as baselines: one from a wired host, and one from + speedtest-tracker's UI. Each is a single gigabit client, `prometheus` + included, so each should read about 940 down. Neither measures the new + path's aggregate. +6. **The aggregate:** start large downloads on three or more wired hosts on + different switch ports at once, and read `homelab_wan_bits_per_second` + for `receive` while they run. The highest figure that holds for a few + minutes is Phase 3's capacity. + +**Rollback B:** the modem's cable back into `em0`, WAN reassigned to `em0`, +and the modem power-cycled again. Then Rollback A if the trunk is also +suspect. ### 2.3 Close the window - `netstat -I igc0 -w 5` for a minute: `errs` stays at 0. -- The two modules' temperatures under load are in Prometheus. +- The two modules' temperatures under load are in Prometheus, under the + alert. - Delete the silence. --- @@ -171,11 +199,11 @@ In one PR, with the facts the window measured: WAN by `pfInterfacesIfDescr`. Replace `0x656D30` (`em0`) with the hex of the new interface's description, read from the exporter rather than derived. `WanReceiveErrors` reads `ifInErrors` on `igc0` from `morpheus` - and on `sfp-sfpplus2` from `neo`. Its description drops the reboot remedy - and says which end counted. The receive figure in - `homelab_wan_capacity_bits_per_second` becomes the plan's usable rate, as - measured in §2.2. The comment at the top of the file stops calling the - port the ceiling. + and on `sfp-sfpplus2` from `neo`, the series §1.2 added. Its description + drops the reboot remedy and says which end counted. The receive figure in + `homelab_wan_capacity_bits_per_second` becomes §2.2's aggregate, not a + single client's speed test. The comment at the top of the file stops + calling the port the ceiling. - **The Internet dashboard and Glance's network page**, wherever they name `em0`. - `grep -rnE 'em0|0x656D30|ether1\b|port 1\b' docs stacks` and settle @@ -184,8 +212,8 @@ In one PR, with the facts the window measured: - **The current-state documents** ADR-0131's *Consequences* lists, and the diagram's PNG re-rendered in the same commit. - **The changelog**, a dated entry: the window, both modules' - temperatures idle and under load, the speed test, and anything that went - differently from here. + temperatures idle and under load, the baselines and the aggregate, whether + the public address changed, and anything that went differently from here. Then empty `ether1`: remove it from the VLAN entries and from the bridge, in Safe Mode. `SwitchInterfaceDown` stays quiet, because the port has been down