devices(ubiquiti): Dream Wall and Dream Router LAN banks carry a LAN role, so the WAN socket stops answering the LAN address (refs #130) #2351

Merged
jaylouisw merged 1 commit from catalogue/1121-0222 into main 2026-11-21 02:38:22 +00:00
Owner

Refs #130. The Pro still has no vendor page; this is the LAN/WAN surface of the two Dream-family rows that already carry a WAN role.

Measured defect. engine/device.js ownsIpOn separates the two L3 surfaces only when both sides carry a role:

if (owner.role && inIface.role && owner.role !== inIface.role) return null;

PR #2320 gave the Dream Wall's wan1 role: "wan", PR #2346 gave the Dream Router's eth4 the same, and neither row gave its LAN bank a role - so the check never fired and the separation the engine documents ("a router's LAN address is not reachable from its WAN port") did not exist on either row. test/port-roles.test.js has asserted the invariant for the RT-AX89X since #8.

Topology: 192.168.1.1/24 on eth0, one host on eth0, one on the far side of the bank (eth5 / eth1), one cabled to the WAN socket and placed in 192.168.1.0/24:

probe UDW before UDW after UDR before UDR after
ownsIpOn(wan, '192.168.1.1') true false true false
host on the WAN socket pings 192.168.1.1 answered no reply answered no reply
host on eth0 / eth5 reaches 192.168.1.1 answered answered answered answered
ownsIpOn(wan, <wan's own address>) true true true true

Change. 17 UDW and 4 UDR copper LAN ports now declare role: "lan". Evidence is the rows both specs already cite, re-read today: https://dl.ui.com/ds/udw_ds.pdf (200, 544,909 B) "Networking interface (17) LAN: GbE RJ45 ports / (1) WAN: 2.5 GbE RJ45 port"; https://techspecs.ui.com/unifi/cloud-gateways/udw (200, 704,702 B) "Default WAN Ports (1) 2.5 GbE RJ45 (1) 10G SFP+", "Max. WAN Port Count 8"; https://dl.ui.com/ds/udr_ds.pdf (200, 771,202 B) "LAN: (4) GbE RJ45 ports / WAN: (1) GbE RJ45 port"; https://techspecs.ui.com/unifi/cloud-gateways/udr (200, 685,837 B) "Default WAN Ports (1) GbE RJ45". Recorded in research/ubiquiti-wan-lan-role-separation.md and in both spec notes.

Deliberately not touched. The UDW's two SFP+ cages keep dualRole with no role (the datasheet prints one LAN and one WAN cage without numbering them) and Max WAN Port Count 8 stays unmodelled (the vendor states a ceiling, not which sockets) - both recorded as known gaps rather than guessed. The radios stay role-less, and ownsIpOn(radio0, '192.168.1.1') is still true, so the access point still serves the LAN address.

Gates. node scripts/syntax-check.js 511 OK; audit-port-types.js and audit-devices.js 0 gated defects; test/hardware-invariants.test.js 26/0; node scripts/run-tests.js 431 suites / 14,394 assertions, 0 failed. New gate: test/ubiquiti-wan-lan-role-separation.test.js (27 assertions).

Refs #130. The Pro still has no vendor page; this is the LAN/WAN surface of the two Dream-family rows that already carry a WAN role. **Measured defect.** `engine/device.js` `ownsIpOn` separates the two L3 surfaces only when *both* sides carry a role: ```js if (owner.role && inIface.role && owner.role !== inIface.role) return null; ``` PR #2320 gave the Dream Wall's `wan1` `role: "wan"`, PR #2346 gave the Dream Router's `eth4` the same, and neither row gave its LAN bank a role - so the check never fired and the separation the engine documents ("a router's LAN address is not reachable from its WAN port") did not exist on either row. `test/port-roles.test.js` has asserted the invariant for the RT-AX89X since #8. Topology: `192.168.1.1/24` on `eth0`, one host on `eth0`, one on the far side of the bank (`eth5` / `eth1`), one cabled to the WAN socket and placed in `192.168.1.0/24`: | probe | UDW before | UDW after | UDR before | UDR after | |---|---|---|---|---| | `ownsIpOn(wan, '192.168.1.1')` | **true** | false | **true** | false | | host on the WAN socket pings `192.168.1.1` | **answered** | no reply | **answered** | no reply | | host on `eth0` / `eth5` reaches `192.168.1.1` | answered | answered | answered | answered | | `ownsIpOn(wan, <wan's own address>)` | true | true | true | true | **Change.** 17 UDW and 4 UDR copper LAN ports now declare `role: "lan"`. Evidence is the rows both specs already cite, re-read today: `https://dl.ui.com/ds/udw_ds.pdf` (200, 544,909 B) "Networking interface (17) LAN: GbE RJ45 ports / (1) WAN: 2.5 GbE RJ45 port"; `https://techspecs.ui.com/unifi/cloud-gateways/udw` (200, 704,702 B) "Default WAN Ports (1) 2.5 GbE RJ45 (1) 10G SFP+", "Max. WAN Port Count 8"; `https://dl.ui.com/ds/udr_ds.pdf` (200, 771,202 B) "LAN: (4) GbE RJ45 ports / WAN: (1) GbE RJ45 port"; `https://techspecs.ui.com/unifi/cloud-gateways/udr` (200, 685,837 B) "Default WAN Ports (1) GbE RJ45". Recorded in `research/ubiquiti-wan-lan-role-separation.md` and in both spec notes. **Deliberately not touched.** The UDW's two SFP+ cages keep `dualRole` with no `role` (the datasheet prints one LAN and one WAN cage without numbering them) and `Max WAN Port Count 8` stays unmodelled (the vendor states a ceiling, not which sockets) - both recorded as known gaps rather than guessed. The radios stay role-less, and `ownsIpOn(radio0, '192.168.1.1')` is still true, so the access point still serves the LAN address. **Gates.** `node scripts/syntax-check.js` 511 OK; `audit-port-types.js` and `audit-devices.js` 0 gated defects; `test/hardware-invariants.test.js` 26/0; `node scripts/run-tests.js` 431 suites / 14,394 assertions, 0 failed. New gate: `test/ubiquiti-wan-lan-role-separation.test.js` (27 assertions).
devices(ubiquiti): the Dream Wall and Dream Router LAN banks carry a LAN role, so the WAN socket stops answering the LAN address (refs #130)
All checks were successful
CI / Classify the change (pull_request) Successful in 21s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 21s
CI / Test (Node 22) (pull_request) Successful in 1m6s
CI / Test (Node 20) (pull_request) Successful in 1m8s
CI / Test (Node 18) (pull_request) Successful in 1m12s
CI / Server smoke and Docker build (pull_request) Successful in 25s
CI / Arm auto-merge (pull_request) Successful in 4s
88f07ace4c
role separation in engine/device.js ownsIpOn needs a role on both sides; both rows had role wan on the uplink and no role at all on the LAN bank, so ownsIpOn(wan, '192.168.1.1') was true and a host cabled to the uplink inside 192.168.1.0/24 was answered by the LAN gateway. 17 UDW + 4 UDR LAN ports now declare role lan; radios, SFP+ dual-role cages and the vendor's unnumbered 8-WAN ceiling are left as they were.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 02:31:37 +00:00
jaylouisw deleted branch catalogue/1121-0222 2026-11-21 02:38:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2351
No description provided.