devices(ubiquiti): the compact gateway LAN banks carry a LAN role, so the uplink stops answering the LAN address (#130 fallback) #2356

Merged
jaylouisw merged 1 commit from catalogue/1121-0252 into main 2026-11-21 03:09:28 +00:00
Owner

Refs #130 (no closing keyword - this does not answer the Dream Wall Pro request).

The six compact UniFi gateways shipped their LAN banks with no role, and engine/device.js ownsIpOn separates WAN from LAN only when both sides carry one (owner.role && inIface.role && owner.role !== inIface.role). The invariant test/port-roles.test.js has asserted for the RT-AX89X since #8 - "the WAN port does not answer the LAN address" - was therefore silently false on all six. Measured before the change, with the roles stripped back out of each spec and 192.168.1.1/24 on the LAN port:

UCG-Ultra  ownsIpOn(wan1, '192.168.1.1') = TRUE   <- answered
UCG-Max    ownsIpOn(WAN,  '192.168.1.1') = TRUE
UXG-Lite   ownsIpOn(eth1, '192.168.1.1') = TRUE
UXG-Max    ownsIpOn(eth4, '192.168.1.1') = TRUE
UX        ownsIpOn(wan,  '192.168.1.1') = TRUE
UX7        ownsIpOn(eth1, '192.168.1.1') = TRUE

i.e. a host cabled to the uplink inside the LAN subnet was answered by the LAN gateway.

Vendor sources, read 2026-11-21. Both Ubiquiti surfaces name the uplink and the bank, per socket:

model controller ports (static.ui.com/fingerprint/ui/public.json, 200, 832,585 B, sku) product page (200) Default WAN Ports / Max. WAN Port Count
UCG-Ultra eth0-3 LAN, eth4 WAN, switchPorts [1,2,3,4], numberOfPorts 5 techspecs.ui.com/unifi/cloud-gateways/ucg-ultra, 657,109 B (1) 2.5 GbE RJ45 / 4
UCG-Max eth0-3 LAN, eth4 WAN, switchPorts [1,2,3,4], 5 .../ucg-max, 668,564 B (1) 2.5 GbE RJ45 / 4
UXG-Lite eth0 LAN, eth1 WAN, 2 .../uxg-lite, 643,116 B (1) GbE RJ45 / 1
UXG-Max eth0-3 LAN, eth4 WAN, switchPorts [1,2,3,4], 5 .../uxg-max, 647,803 B (1) 2.5 GbE RJ45 / 4
UX eth0 LAN, eth1 WAN, 2 .../ux, 670,206 B (1) GbE RJ45 / 1
UX7 eth0 LAN, eth1 WAN, 2 .../ux7, 688,360 B (1) 10 GbE RJ45 / 1

Each spec now declares role: "wan" on its uplink and role: "lan" on its LAN bank, and notes records which row came from which page. No port claims dualRole: the vendor prints a WAN ceiling (Max. WAN Port Count 4 on the UCG rows) without saying which socket gives up LAN duty, and a per-socket assignment would be invented.

Measured after the change - node test/ubiquiti-wan-lan-role-separation.test.js (81 assertions, extended from UDW/UDR to all eight rows): the uplink no longer owns the LAN address, the bank still answers bank-wide, the uplink still answers its own address, and a host on the uplink no longer reaches the LAN gateway.

Gates: node scripts/syntax-check.js -> 511 files, all OK. node scripts/audit-port-types.js -> 0 contradicting ports. node scripts/audit-devices.js -> 0 hard defects, 0 uncablable ethernet ports. npm test -> 431 suites, 14,450 assertions, 0 failed. npm run regen:registry-doc -> no drift.

Refs #130 (no closing keyword - this does not answer the Dream Wall Pro request). The six compact UniFi gateways shipped their LAN banks with no `role`, and `engine/device.js` `ownsIpOn` separates WAN from LAN only when **both** sides carry one (`owner.role && inIface.role && owner.role !== inIface.role`). The invariant `test/port-roles.test.js` has asserted for the RT-AX89X since #8 - "the WAN port does not answer the LAN address" - was therefore silently false on all six. Measured before the change, with the roles stripped back out of each spec and `192.168.1.1/24` on the LAN port: ``` UCG-Ultra ownsIpOn(wan1, '192.168.1.1') = TRUE <- answered UCG-Max ownsIpOn(WAN, '192.168.1.1') = TRUE UXG-Lite ownsIpOn(eth1, '192.168.1.1') = TRUE UXG-Max ownsIpOn(eth4, '192.168.1.1') = TRUE UX ownsIpOn(wan, '192.168.1.1') = TRUE UX7 ownsIpOn(eth1, '192.168.1.1') = TRUE ``` i.e. a host cabled to the uplink inside the LAN subnet was answered by the LAN gateway. **Vendor sources, read 2026-11-21.** Both Ubiquiti surfaces name the uplink and the bank, per socket: | model | controller `ports` (`static.ui.com/fingerprint/ui/public.json`, 200, 832,585 B, `sku`) | product page (200) | `Default WAN Ports` / `Max. WAN Port Count` | |---|---|---|---| | UCG-Ultra | `eth0-3 LAN, eth4 WAN`, `switchPorts [1,2,3,4]`, `numberOfPorts 5` | techspecs.ui.com/unifi/cloud-gateways/ucg-ultra, 657,109 B | `(1) 2.5 GbE RJ45` / `4` | | UCG-Max | `eth0-3 LAN, eth4 WAN`, `switchPorts [1,2,3,4]`, 5 | .../ucg-max, 668,564 B | `(1) 2.5 GbE RJ45` / `4` | | UXG-Lite | `eth0 LAN, eth1 WAN`, 2 | .../uxg-lite, 643,116 B | `(1) GbE RJ45` / `1` | | UXG-Max | `eth0-3 LAN, eth4 WAN`, `switchPorts [1,2,3,4]`, 5 | .../uxg-max, 647,803 B | `(1) 2.5 GbE RJ45` / `4` | | UX | `eth0 LAN, eth1 WAN`, 2 | .../ux, 670,206 B | `(1) GbE RJ45` / `1` | | UX7 | `eth0 LAN, eth1 WAN`, 2 | .../ux7, 688,360 B | `(1) 10 GbE RJ45` / `1` | Each spec now declares `role: "wan"` on its uplink and `role: "lan"` on its LAN bank, and `notes` records which row came from which page. No port claims `dualRole`: the vendor prints a WAN *ceiling* (`Max. WAN Port Count 4` on the UCG rows) without saying which socket gives up LAN duty, and a per-socket assignment would be invented. **Measured after the change** - `node test/ubiquiti-wan-lan-role-separation.test.js` (81 assertions, extended from UDW/UDR to all eight rows): the uplink no longer owns the LAN address, the bank still answers bank-wide, the uplink still answers its own address, and a host on the uplink no longer reaches the LAN gateway. **Gates:** `node scripts/syntax-check.js` -> 511 files, all OK. `node scripts/audit-port-types.js` -> 0 contradicting ports. `node scripts/audit-devices.js` -> 0 hard defects, 0 uncablable ethernet ports. `npm test` -> 431 suites, 14,450 assertions, 0 failed. `npm run regen:registry-doc` -> no drift.
devices(ubiquiti): the compact gateway LAN banks carry a LAN role, so their uplink stops answering the LAN address (refs #130)
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 25s
CI / Test (Node 22) (pull_request) Successful in 1m4s
CI / Test (Node 20) (pull_request) Successful in 1m7s
CI / Test (Node 18) (pull_request) Successful in 1m11s
CI / Server smoke and Docker build (pull_request) Successful in 26s
CI / Arm auto-merge (pull_request) Successful in 5s
28766092a4
UCG-Ultra, UCG-Max, UXG-Lite, UXG-Max, UX and UX7 shipped their LAN banks
with no `role`. engine/device.js `ownsIpOn` separates WAN from LAN only when
both sides carry one (`owner.role && inIface.role && owner.role !==
inIface.role`), so the invariant test/port-roles.test.js asserts for the
RT-AX89X was silently false on all six: with 192.168.1.1/24 on the LAN port,
ownsIpOn(<wan>, '192.168.1.1') returned TRUE before this change.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 03:06:08 +00:00
jaylouisw deleted branch catalogue/1121-0252 2026-11-21 03:09:31 +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!2356
No description provided.