Netforge.ai Docs
Open the app →
Docs/Guide/Tools/Config Compare

Config Compare

Side-by-side diff for configs and text dumps — green/yellow/red, block-aware sorting, major vs minor changes.

Relevant for:Enterprise / NetOpsAdmin / Owner
Where to find itTools (top nav)DiagnosticsConfig Compare

A change-review diff built for network text: two running-configs, two route tables, two ACL dumps — anything you can paste. Drop text into both panes (paste, Upload, or drag a file onto a pane) and the panes become the comparison; there is no Compare button. From then on the panes are also the editor: click any line to edit it in place and the colours, counts and badges follow every keystroke. Enter adds a line below, Backspace on an empty line removes it, the arrow keys walk up and down, and pasting several lines inserts them all. Direct link: /tools?tool=compare.

Note
The whole comparison runs in your browser. Nothing you paste or upload is sent to the server, which makes it safe for production configs.

Reading the colors#

  • Green — the line is identical on both sides. With sorting on (the default) that includes lines matched from a completely different position in the file.
  • Yellow — a pair of lines that open with the same command word and differ only in their detail. The words that actually changed are highlighted inside the row, so a changed next-hop or VLAN id is obvious at a glance.
  • Red — either a pair of lines that open with different command words, or a line with no counterpart at all.

Every line is matched to its closest counterpart and the two are shown opposite each other, so the panes never drift out of step. A cell is left blank only when one side genuinely runs out of lines. Matching is by shared content, with the leading command word as a strong tie-breaker: ip route … 10.0.0.1 pairs with ip route … 10.0.0.2 in yellow, while route 10.1.1.1 … facing ip route 10.1.1.1 … still lines up — in red, because the commands differ — with the shared address and mask left unhighlighted so you can see exactly what moved.

Major and minor changes#

Every non-green row also carries a severity badge, and the All / Major / Minor filter dims everything else so a review can start with what matters. Classification is fail-closed: cosmetic lines — descriptions, ACL remarks, banners, comments, exec-timeout, snmp-server location/contact, logging synchronous — are min. Everything else, including anything the classifier does not recognise, is MAJ.

Why
An unrecognised line on network gear must never be presented as harmless. Treating only a known list of cosmetic commands as minor means a vendor syntax the tool has never seen still shows up as a major change — the failure mode is a needless second look, not a missed routing change.

Block-aware sorting#

Sort lines (on by default) compares the two sides as sets rather than sequences, so a config whose sections were saved in a different order reports no differences. It is block-aware: indentation defines the hierarchy, so an interface, router bgp (including nested address-family and neighbor sub-modes), ip sla, policy-map/class, route-map, vrf definition or ACL block moves as a unit — a member line can never detach from its parent, and an identical child under a different parent never cancels out. Banner bodies stay attached to their banner, and Junos brace terminators stay with the stanza they close.

A flat file with no indentation — a route table, an ARP or MAC dump — simply compares as an order-insensitive set. Turn sorting off when line order itself is what you are reviewing.

Ignore rules and replacements#

Sort lines (block-aware)On by default. Order-insensitive comparison that keeps config blocks intact. Off = strict positional diff.
Ignore whitespaceTrims and collapses runs of spaces, so re-indented or re-spaced lines match.
Ignore caseCase-insensitive comparison of both sides.
Ignore blank linesOn by default — empty lines never count as differences.
Ignore comments & volatile linesDrops IOS “!” separators, “# ” comments and the lines that change on every save: Building configuration…, Current configuration…, ntp clock-period, Last configuration change, NVRAM config last updated.
Ignore lines matching…Your own case-insensitive regular expression; matching lines are ignored on both sides. An invalid pattern turns the box red and stays inactive rather than filtering wrongly.
ReplacementsEquivalence rules applied left → right: “R1 → R2” makes a renamed hostname or a renumbered prefix compare as identical. Displayed text is never altered — only the comparison is.
Why
The volatile-line list is the same one the drift engine uses before it diffs a live device, so an ad-hoc comparison here and a scheduled drift check agree on what counts as a real change instead of arguing about timestamps.

Working through a large diff#

  • The / buttons jump between changes with an n / total counter, and they honour the severity filter — step through majors only.
  • Runs of ten or more matching lines collapse to three lines of context; click the band to expand.
  • Side-by-side or Unified view; Swap exchanges the two sides (replacement rules flip with them).
  • Copy diff and Download .diff produce a standard unified diff; HTML report saves a self-contained, colour-coded page to attach to a change record.
Note
Limits: 5 MB per side, text formats (.txt .cfg .conf .config .log .ios .run .diff). Very large files that differ almost everywhere fall back to plain added/removed rows with a notice — turning Sort lines on usually gives a far more useful result.
Why
Config Compare is the paste-anything counterpart to Drift. Drift pulls a live running-config and measures it against the baseline NetForge deployed; Config Compare answers the everyday question that has no baseline yet — before versus after a change window, primary versus standby, my file versus the vendor's.