Network automation in practice lab 8 of 11

Pre-checks post-checks and automatic rollback

Run a real change request through a pipeline that snapshots the core, commits on EOS and Junos with a revert timer, checks the result against rules, and confirms only when nothing regressed. The first attempt has a mistake: watch the network put itself back, find the error in the change, and run it again until it is confirmed.

Run this lab

It needs Standard: its 4 nodes are set to 5 vCPU and 8,192 MB in total. It is ready about 16 minutes after you start it. It starts already set up, with nothing to paste before the first task.

In your workspace: Shared, then Network Automation in Practice - multi-vendor professional guided labs, then 08 - Pre-checks post-checks and automatic rollback

Run it on Standard from £5 a day

  • About 16 min to be ready
  • About 75 min of tasks

The free demo isn’t offered for this lab: it is Lite size, with 6 vCPU and 8 GB, and this lab’s nodes need 5 vCPU and 8,192 MB together. Every lab plan includes every guided lab.

Level
Advanced
How you work
CLI-led
Nodes need
5 vCPU, 8,192 MB
Smallest plan
Standard

The scenario

Change request CR-2041 is approved: York's new freight-booking service, 10.60.0.0/24, must be reachable from every site, and Leeds (srx1) must send Carlisle (r1) only Fenwick's own 10.0.0.0/8 routes, because a rail partner will soon peer at Leeds. The change is in changes/CR-2041.yaml.

Fenwick Rail doesn't type changes into routers any more. change.py runs a change request: it takes a snapshot of the core, commits each device's part with a timer that undoes it unless confirmed, takes a second snapshot, and confirms only if its rules find no regression. The rules aren't finished. Finish them, run the change, and get it confirmed.

Start-up and waits. Click Start all. Each device boots straight into today's core: no pasting. eos1 answers after about 3 minutes, r1 after about 4, srx1 after about 5; BGP settles a minute later. Read change.py and the change request while they boot (Task 1). A run that confirms takes 2 to 4 minutes; a run that rolls back takes up to 12, most of it waiting for the timers and for BGP to re-form. Measured on our servers: the whole lab was ready for its first task about 16 minutes after Start all, with every device booted.

What you’ll practise

  • Snapshot normalised state from three vendors before and after a change
  • Write post-check rules that catch a regression a reachability test misses
  • Use commit confirmed on Junos and a session commit timer on EOS as a dead-man switch
  • Let an unconfirmed change revert, and prove the network matches the pre-check
  • Correct a Junos routing policy and confirm the change

The tasks

  1. Read the pipeline and the change
  2. Write the post-check rules
  3. Run the change
  4. Find the mistake in the change
  5. Run it again

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of Pre-checks post-checks and automatic rollback4 nodes and 1 network, 7 links. Every link is listed as text below the diagram.devboxr1eos1srx1Mgmteth0Gi0/1Ethernet1Ethernet2ge-0/0/1Gi0/0fxp0Gi0/2ge-0/0/0Management1
4 nodes and 1 network, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Pre-checks post-checks and automatic rollback, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
devboxCloudLabBox code workstation (Docker)CloudLabBox’s own workstation image, with a browser code editor1 vCPU, 2,048 MB
r1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
eos1Arista vEOSveos-4.33.1.1F1 vCPU, 2,048 MB
srx1Juniper vSRX NextGen templatevsrxng-24.4R1.92 vCPU, 3,584 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder Network Automation in Practice - multi-vendor professional guided labs.

  3. Open 08 - Pre-checks post-checks and automatic rollback and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More Network automation in practice labs

All Network automation in practice labs

CloudLabBox is independent of Arista Networks, Cisco, Fortinet, Juniper Networks and Palo Alto Networks. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.