Simon Tasker

Games, apps, and the occasional detour.

App Dev · · 3 min read

NetLay: The bit between the switch and the desk

Patch panels, outlets and cable IDs, because the switch port tells you where the configuration lives and not where to go with a tester.

A switch port is not the whole story#

Gi1/0/12 tells you where the configuration lives. It does not tell you where to go.

What you need standing in a comms cupboard with a cable tester is the other half of the journey. Patch panel one, port twelve, out to outlet 3B-07, on cable C-0412. That is the bit between the switch and the desk, it is the bit that is never written down anywhere except in somebody's head, and it is the bit that takes the afternoon when that somebody has left.

So NetLay can hold it now.

The decision not to model cables.#

The tempting design is to make every cable an object, with two ends and a path, and build a full cable management system. I did not do that.

Instead the cabling lives on the device record. Which panel, which port on it, the outlet label, the cable identifier, the length. That is five fields on something that already exists, rather than a whole new concept with its own lifecycle, and it is enough to answer every question I have ever actually been asked in a comms room.

If this thing ever needs real cable management it can grow into it. Starting there would have been building for an imaginary user instead of the real one, who is me on a Tuesday trying to find out where socket 3B-07 goes.

Panels in the rack.#

Patch panels are drawn as rows in the cabinet, alongside the switches, with a dashed outline so they read as passive rather than powered, and a port strip that fills up as ports get used along with a used and total count.

New panels take position zero, which puts them at the top of the rack, because that is where they usually are and because a drawing that matches the room is the entire point of this application.

The rules are the obvious ones. One device per panel port. The port number has to be within the panel's range. And a panel cannot be shrunk below its highest used port, which stops you turning a 48 port panel into a 24 port one and silently orphaning half the building.

Deleting a panel unlinks the devices from it but keeps their outlet and cable details, because that information is about the building and the building is still there even if you got the panel wrong. All of it travels in the JSON export with everything else.

The payoff in the path trace.#

A hop in the path trace used to say the switch port. Now it says the port, the panel and panel port, the outlet and the cable identifier.

That is the sentence you would say to somebody on site over the phone, generated from the model, and it is the first time this application has told me something I could not have worked out faster by walking.

Printing the schedule.#

There is a patch schedule per cabinet now. Every panel port with its cable identifier, outlet, the device on it with its address, the switch port it lands on and the length. Then, per switch, every connected device with its port, VLAN, panel port, outlet and cable.

It prints through the browser with a print stylesheet rather than generating a PDF. I went back and forth on that and the browser won, because generating a PDF properly means a dependency that has to be installed, bundled and kept up to date, and window.print() gives you the paper copy, the save as PDF option and whatever the person's printer does best, for about thirty lines of CSS.

That schedule taped inside a comms cupboard door is, I suspect, the most useful thing this project has produced so far.

And the box behind the cabinet.#

One other thing went in the same morning, because somebody looked at my screen and asked what the box behind the cabinet was.

It was an uplink. Two switches in the same cabinet, joined by a line drawn between their two rows, which naturally ran straight through the cabinet node and came out as a mysterious shape poking out behind it.

Uplinks inside a cabinet are now drawn as a small loop out of the right hand edge, joining the two rows, in the cable's own colour and dash style with the ports in the tooltip. It took half an hour and it stopped the map lying about something it had been drawing wrong since post two.

Next time, being able to ask the map a question instead of hunting for the answer.