Skip to content

Network engineers

The same change, on forty switches, without forty chances to fumble it

The job that keeps coming back: a new NTP server, a new syslog collector, a VLAN that has to exist on every access switch in a building. It is four commands. It is never the four commands that go wrong — it is the thirty-eighth switch, at ten past six, when you paste the block one line short and do not notice.

What it looks like here

Build the procedure once as a button: an expect for the prompt so nothing fires into a device that has not finished answering, a form that asks for the address, the send steps, and a confirm in front of the write. Select the switches, press it once.

The value comes from the prompt, so the same button works on every site. If the address is the same for you every time and different for the next engineer, it goes in global variables instead and the button stops asking at all — and the set stays shareable, because your address never enters the file.

The parts that matter on real kit

  • Waiting, not guessing. An expect block blocks until the prompt comes back. Slow supervisor, congested link, a device thinking about a large ACL — none of it turns into half a command in the buffer.
  • A gate before anything irreversible. A confirm stops the run if you answer no, and there is a separate flag for buttons that are dangerous end to end. Read "broadcast to every session" and "reload" in the same sentence once and you will want both.
  • An answer for the morning after. The audit log records which button ran against which connection, when, and what came back. Useful the day someone asks what changed at 03:40.

Where to start

Take one thing you type every week and make it a button — terminal length 0 and a show is a real one, and most people's most-pressed button never grows past that. Then look at what other people have published on the exchange: every set shows its full script before you download it, so you can read a stranger's procedure the way you would read one a colleague emailed you.