A simulated CLI for this lab — click the workstation and run the `cfg` tool, then click a switch or router and verify with the real show commands. This is a concept lab for the CCNA v2.0 automation and AI-operations domain, not a real automation tool: there is no Ansible, no RESTCONF, no AI behind it — just a script applier, a diff, and verification. Type ? for help and use Tab to complete a command.
Microsoft Windows [Version 10.0.19045.0]
(c) Microsoft Corporation. All rights reserved.
Up/down arrows recall commands. The full command list is in the walkthrough below.
Interactive lab
Lab 16 — Automation & AI Ops
A workstation with a config applier, two bare switches, and two routers. Apply a generated snippet, read the diff, verify it — then catch the bad snippet before it ships.
Click a device to open its console, type the real commands, and check your work when you think it’s done. The lab checks each step as you go.
Walkthrough — commands in order
A concept lab for the CCNA v2.0 automation and AI-operations domain — not a real automation tool. There is no Ansible, no RESTCONF, no AI behind the workstation’s "cfg" command: it is a small script applier that feeds a config snippet through the same simulated switch and router engines as the other labs, prints the exact diff of what changed, and then checks the live device state for what the snippet broke. The point is the workflow, and it is the same one that applies to a config a person wrote, a template rendered, or a model generated: read the snippet, apply it, read the diff, verify against the real state — and never trust the snippet’s own description of what it does. Two of the four snippets are wrong on purpose.
Workstation 192.168.99.10 — runs "cfg" (the simulated applier)
│ applies snippets to
SW1 ─── Gi0/1 trunk ─── SW2 (bare switches, nothing configured)
R1 ─── G0/1 10.0.0.0/24 ─── R2 (pre-addressed, OSPF not configured)
R1 Lo0 1.1.1.1 · G0/0 192.168.1.0/24
R2 Lo0 2.2.2.2 · G0/0 192.168.2.0/24Where this shows up in the data center
I don’t run automation in production at Oracle — change control there is deliberate, and the switches I touch get their config from people who own it. But the discipline this lab teaches is the one I use every shift: before I trust a change, I check what it actually did. A generated snippet that "fixes" a native VLAN, a template with one digit wrong in a network statement, a change that looks right in the diff and breaks the trunk — I have seen the human-written versions of all three. The habit is the same whether the config came from a person, a template, or a model: apply it, read the diff, then verify against the device, not against the description.
C:\> cfg scripts C:\> cfg show baseline C:\> cfg apply baseline
The diff is computed from the real before-and-after state, not printed from the snippet: a line only appears if the device actually changed. Apply the baseline again right now and it reports "No changes" — an idempotent apply, which is what you want a repeatable config to be.
C:\> cfg verify SW1# show vlan brief SW1# show interfaces trunk
The verify step only counts once the baseline is in place and clean — it is a milestone, not a live-state check, so it stays done even after the next step breaks the trunk on purpose.
C:\> cfg apply fix-native C:\> cfg verify
Notice what the diff does and does not tell you: it shows the native VLAN changing from 99 to 1, which is accurate — and completely silent about whether that change is a fix or a break. The diff describes the change; only verification judges it.
C:\> cfg apply baseline C:\> cfg verify
This time the diff is short: only the native VLAN line changes, because everything else already matches. A good diff after a repair is a small one.
C:\> cfg apply ospf-starter-typo C:\> cfg verify C:\> cfg apply ospf-starter C:\> cfg verify R1# show ip ospf neighbor
The typo never broke the adjacency — 10.0.0.0 was correct, so the neighbors still formed. That is exactly why a typo like this is dangerous: the thing you would notice (no adjacency) never happens, and the thing that is wrong (the LAN never advertised) only shows up in the route table or in verification.
Verify it worked
Don’t trust the config until a show command proves it. These are the outputs you should see — if yours differ, that’s the troubleshooting.
Workstation: cfg apply baseline (first apply)
Applying baseline (VLAN + trunk baseline (good))... Diff: SW1: - Gi0/1 mode dynamic-auto allowed all native 1 no shutdown + vlan 10 Sales + vlan 20 Engineering + vlan 99 Management + Gi0/1 mode trunk allowed 10,20,99 native 99 no shutdown SW2: - Gi0/1 mode dynamic-auto allowed all native 1 no shutdown + vlan 10 Sales + vlan 20 Engineering + vlan 99 Management + Gi0/1 mode trunk allowed 10,20,99 native 99 no shutdown
SW1# show vlan brief
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4, Gi0/2 10 Sales active 20 Engineering active 99 Management active 1002 fddi-default act/unsup 1003 token-ring-default act/unsup
SW1# show interfaces trunk
Port Mode Encapsulation Status Native vlan Gi0/1 on 802.1q trunking 99 Port Vlans allowed on trunk Gi0/1 10,20,99 Port Vlans allowed and active in management domain Gi0/1 10,20,99
Workstation: cfg apply ospf-starter (the correction)
Applying ospf-starter (OSPF starter, corrected (good))... Diff: R1: - network 192.168.9.0 0.0.0.255 area 0 + network 192.168.1.0 0.0.0.255 area 0
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/DR 00:00:38 10.0.0.2 GigabitEthernet0/1
Check yourself
Three questions from the exam angle. Tap to reveal the answer — say it out loud first.
Q1. The diff after "cfg apply fix-native" accurately shows the native VLAN changing from 99 to 1. Why isn’t the diff enough to trust the snippet?
Q2. The typo’d OSPF snippet still formed an adjacency — "show ip ospf neighbor" looked fine. Why is that the dangerous kind of bug?
Q3. Re-applying the baseline reports "No changes". Why is that a property you want in generated config?