zNetLaB › Guided labs › Automation
Network automation — facts, templates, playbooks and drift
Automation Intermediate 6 devices 5 checked tasks 100 points Plan lab
Read device state as structured data over RESTCONF, render one template across four routers, push it with a playbook, and prove it is idempotent. Then change one router by hand and catch it with a drift report. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 5 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
Read device state as structured data over RESTCONF, render one template across four routers, push it with a playbook, and prove it is idempotent. Then change one router by hand and catch it with a drift report.
Your role: a network automation engineer. Level: Intermediate Done when: all 5 goals show as passed (100 points).
Network status
Devices: 4 routers, 1 server, 1 switch, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. Automation-Host is a host with 10.100.0.50/24, gateway 10.100.0.1. R1, R2, R3, R4, MgmtSW start with an empty configuration.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
All four routers are addressed on the management LAN (20 pts) Every router carries the standard description on its uplink (20 pts) Every router has a loopback matching its number (20 pts) The playbook is idempotent — a second run changes nothing (20 pts) The automation host can reach every managed router (20 pts)
The activity, in order
All four routers are addressed on the management LAN On R1, go into interface GigabitEthernet0/0/0, give it 10.100.0.1 with the mask the topology shows, and bring it up with no shutdown. On R2, go into interface GigabitEthernet0/0/0, give it 10.100.0.2 with the mask the topology shows, and bring it up with no shutdown. On R3, go into interface GigabitEthernet0/0/0, give it 10.100.0.3 with the mask the topology shows, and bring it up with no shutdown. On R4, go into interface GigabitEthernet0/0/0, give it 10.100.0.4 with the mask the topology shows, and bring it up with no shutdown.Why: A router interface routes nothing until it has an address and is up. Every other task builds on this one. Verify with: show ip interface brief Every router carries the standard description on its uplink Set this up on R1, then prove it with the command below. Set this up on R2, then prove it with the command below. Set this up on R3, then prove it with the command below. Set this up on R4, then prove it with the command below.Why: Each goal is a state the lab can check on the running device. Verify with: show interfaces description Every router has a loopback matching its number On R1, go into interface Loopback99, give it 192.168.99.1 with the mask the topology shows, and bring it up with no shutdown. On R2, go into interface Loopback99, give it 192.168.99.2 with the mask the topology shows, and bring it up with no shutdown. On R3, go into interface Loopback99, give it 192.168.99.3 with the mask the topology shows, and bring it up with no shutdown. On R4, go into interface Loopback99, give it 192.168.99.4 with the mask the topology shows, and bring it up with no shutdown.Why: A router interface routes nothing until it has an address and is up. Every other task builds on this one. Verify with: show ip interface brief The playbook is idempotent — a second run changes nothing Set this up on the device in the topology, then prove it with the command below.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config The automation host can reach every managed router From Automation-Host, ping 10.100.0.1. If it fails, walk the path hop by hop: gateway, then each router’s routing table, then the way back. From Automation-Host, ping 10.100.0.2. If it fails, walk the path hop by hop: gateway, then each router’s routing table, then the way back. From Automation-Host, ping 10.100.0.3. If it fails, walk the path hop by hop: gateway, then each router’s routing table, then the way back. From Automation-Host, ping 10.100.0.4. If it fails, walk the path hop by hop: gateway, then each router’s routing table, then the way back.Why: A ping needs a route in BOTH directions. This is the end-to-end proof that everything before it worked. Verify with: ping 10.100.0.1
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong.
Why this matters
Read device state as structured data over RESTCONF, render one template across four routers, push it with a playbook, and prove it is idempotent. Then change one router by hand and catch it with a drift report.
What you will be able to do
All four routers are addressed on the management LAN
Every router carries the standard description on its uplink
Every router has a loopback matching its number
The playbook is idempotent — a second run changes nothing
The network
ISR 4331, Server, Switch 8-port — 6 devices in all, already cabled.
Gi0/0/0 Fa0/1 Gi0/0/0 Fa0/2 Gi0/0/0 Fa0/3 Gi0/0/0 Fa0/4 Fa0 Fa0/5 R1 R2 R3 R4 Automation-Host 10.100.0.50/24 · gw 10.100.0.1 MgmtSW Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
R1 ISR 4331 configure it
R2 ISR 4331 configure it
R3 ISR 4331 configure it
R4 ISR 4331 configure it
Automation-Host Server 10.100.0.50 / 255.255.255.0 gw 10.100.0.1
MgmtSW Switch 8-port configure it
Cabling
R1 Gi0/0/0 ↔ MgmtSW Fa0/1
R2 Gi0/0/0 ↔ MgmtSW Fa0/2
R3 Gi0/0/0 ↔ MgmtSW Fa0/3
R4 Gi0/0/0 ↔ MgmtSW Fa0/4
Automation-Host Fa0 ↔ MgmtSW Fa0/5
What is configured at the start
Nothing is configured to start with beyond the addresses above: you build the configuration from a clean start.
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 All four routers are addressed on the management LAN 20 On R1: show ip interface brief — Gi0/0/0 has 10.100.0.1 and is up/up. and On R2: show ip interface brief — Gi0/0/0 has 10.100.0.2 and is up/up. and On R3: show ip interface brief — Gi0/0/0 has 10.100.0.3 and is up/up. and On R4: show ip interface brief — Gi0/0/0 has 10.100.0.4 and is up/up.
2 Every router carries the standard description on its uplink 20 Checked automatically against the device’s live state (ifaceDesc). and Checked automatically against the device’s live state (ifaceDesc). and Checked automatically against the device’s live state (ifaceDesc). and Checked automatically against the device’s live state (ifaceDesc).
3 Every router has a loopback matching its number 20 On R1: show ip interface brief — Loopback99 has 192.168.99.1 and is up/up. and On R2: show ip interface brief — Loopback99 has 192.168.99.2 and is up/up. and On R3: show ip interface brief — Loopback99 has 192.168.99.3 and is up/up. and On R4: show ip interface brief — Loopback99 has 192.168.99.4 and is up/up.
4 The playbook is idempotent — a second run changes nothing 20 Checked automatically against the device’s live state (playbookIdempotent).
5 The automation host can reach every managed router 20 On Automation-Host: ping 10.100.0.1 must succeed. and On Automation-Host: ping 10.100.0.2 must succeed. and On Automation-Host: ping 10.100.0.3 must succeed. and On Automation-Host: ping 10.100.0.4 must succeed.
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Where this is examined
This lab practises these topics in the free zNetLaB courses. Each links to its lesson; the course's exam is beside it.
REST APIs, JSON, Ansible/Terraform concepts — CCNA · Automation and Programmability · the CCNA exam
Python, JSON, YANG, NETCONF/RESTCONF — CCNP Enterprise · ENCOR · Automation · the CCNP Enterprise exam
Ansible, Chef, Puppet, EEM, webhooks — CCNP Enterprise · ENCOR · Automation · the CCNP Enterprise exam
Python, YANG, NETCONF/RESTCONF, model-driven telemetry, EEM — CCIE Enterprise Infrastructure · Automation and Programmability · the CCIE Enterprise Infrastructure exam
Configuration management and documentation — CompTIA Network+ · Network Operations · the CompTIA Network+ exam
Automation and orchestration — CompTIA Security+ · Security Operations · the CompTIA Security+ exam
Network automation and programmability — Service Provider · Automation and Operations · the Service Provider exam
REST APIs and HTTP — Network Automation (DevNet Associate) · Foundations · the Network Automation (DevNet Associate) exam
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.
Try the simulator in your browser, no sign-up