Tools

Config remediation

Runs in your browser. Nothing you enter is sent anywhere, and the page’s security policy stops it from contacting other sites.

Paste the running configuration of a device and the configuration you want it to have. The tool works out the commands that get from one to the other: each line in its section, negated the way the command needs, in an order where nothing refers to an object that does not exist yet.

To see the differences as a line-by-line comparison instead, use the config and text compare tool.

How the commands are worked out

Lines

Both configurations are compared section by section: a line is matched by the lines it sits under, and interfaces by their name in any spelling (Gi0/0/1 isGigabitEthernet0/0/1). A line that sets one value, such asdescription, mtu, ip address orswitchport access vlan, is replaced by setting the new value, and removed without its value (no description). no X and X are the two states of one setting, so each undoes the other. Other lines are removed withno before the line. Where no rule covers a command, that form is still given, but marked “check”: read those before you paste them.

Sections and lists

A section that goes away is removed with the command for its kind; a physical interface cannot be removed, so it is reset with default interface. NX-OS ACL entries and prefix-list entries change by sequence number. An IOS ACL shown without sequence numbers can gain entries at its end or lose entries in place; any other change removes and recreates it, and so does any change to an IOS numbered ACL other than an addition at its end, because a single no access-list line removes the whole list. VLANs are added and removed as sets, however the configuration writes them.

Order

Features, VRFs, VLANs, ACLs, prefix-lists, class-maps, route-maps and policy-maps are created before the sections that use them, and removed after those sections stop using them. Changing an interface’s VRF removes its layer-3 configuration, so its lines are set again after the VRF.

Pasting the commands

The commands are indented like a configuration, with the section lines they belong under. Paste them in configuration mode: as with a pasted configuration, a line that is not valid in the current section is taken by the section above it. There are no exit lines, since one too many would leave configuration mode. The rules are the usual Cisco forms and are tested against each other, not against a device, so keep the undo commands at hand and try a change in a lab first when you can.

As Ansible tasks

The Ansible view gives the same commands as tasks for cisco.ios.ios_config orcisco.nxos.nxos_config, one for each section, with parents naming the section lines so Ansible enters each section itself. Every task uses match: none, which sends each line without comparing it with the running configuration. With the default,match: line, running the playbook a second time would send a line such asno 20 again, since it is never in the running configuration, and skip the20 permit … line that follows, since it now is, so the entry would be lost.

Banners use ios_banner or nxos_banner; a banner the module cannot take (an NX-OS login banner, or text with empty lines) is left to configure by hand, with a warning in the playbook. The first task backs up the running configuration. Saving is off by default; when it is on, the last task uses save_when: modified, which also saves any earlier change that was not saved. The playbook is made for the running configuration it was compared with: make it again before running it on one that has changed. The host or group name you enter stays in this page.

Both configurations are read in your browser, in a separate worker. They are not sent anywhere, kept on this device or put in the address bar.