v1v2v3v4102030200102030200102030200102030200templatevarspass ✓0 changescheck ✕check ✓drift ✕
Envelope: a config on its way to a switchChips: the VLANs a switch has right nowCards: saved versions in the history (v1, v2, ...)Green puck: the tests every change passes firstFour switches configured two ways: typed by hand one at a time, then as code: a template and a variables file, kept in version history, tested, and pushed to all four at once. Envelopes are configs on the move; the chips on each switch are its VLANs. A push changes only what differs, so repeating it changes nothing. The switches sit on a private management network, 192.168.1.0/24 (RFC 1918). VLAN ids run from 1 to 4094; 0 and 4095 are reserved (IEEE 802.1Q).

By hand

  1. The old way: you log in to each switch over SSH (a secure remote login) and type the same commands. Four switches means typing it all four times. Real networks have hundreds.

Config as code

Save and test

Push and roll back

The files and the switches

;; step 1/11 · by-hand · packet
;; laptop → sw4
you   192.168.1.10  →  .11 .12 .13 .14  (ssh)
typed 4 lines × 4 switches = 16 lines, by hand
  hostname sw1
  management-address 192.168.1.11/24
  vlan 10 name staff
  vlan 20 name servers
the same work, again and again, by a tired human

The config lines here are neutral example syntax, not any vendor’s commands. Real tools render the same idea into each vendor’s format, or send YANG data directly. NETCONF runs over SSH on port 830 (RFC 6242). RESTCONF is the same YANG data over HTTPS (RFC 8040). Both can also be used to read the current config, which is how drift is found. NETCONF can also roll back by itself: with a confirmed commit, a switch undoes the change unless it is confirmed in time, by default within 600 seconds (RFC 6241 §8.4).