Network automation lab 1 of 27

Your automation workstation: Bash, SSH keys and management ports

Set up the Linux workstation you will automate from: Bash files, pipes and environment variables, a syslog report, a port checker that tells SSH, HTTPS and NETCONF apart, SSH keys on IOS and IOS XE, and a backup script that runs without a password.

Run this lab

It needs Lite: its 3 nodes are set to 3 vCPU and 5,632 MB in total. That fits the free demo too.

In your workspace: Shared, then Network Automation - CCNA and CCNP Automation guided labs, then 01 - Your automation workstation - Bash SSH keys and management ports

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Beginner
Time
About 70 minutes
Nodes need
3 vCPU, 5,632 MB
Smallest plan
Lite

The scenario

You've just joined Kestrel Freight's network team, which wants to stop configuring routers one SSH session at a time. Before any Python, you need a workstation you're fluent with: Bash, files and pipes, SSH that doesn't nag for passwords, and a clear picture of which management services each router offers. By the end of this lab your workstation will report on a syslog file, check management ports, and back up both routers with one command.

DeviceRoleInterfaceAddress
devboxAutomation workstation (Ubuntu desktop)eth010.10.20.10/24
r1Branch router, IOS 15.9 (IOSv)Gi0/010.10.20.11/24
xe1WAN router, IOS XE 17.3 (CSR 1000v)Gi110.10.20.21/24

Topology: all three sit on the management LAN 10.10.20.0/24, so no gateway is needed between them. Device login: netops / NetOps-Lab1 (privilege 15).

What you’ll practise

  • Manage files and directories, permissions and environment variables in Bash
  • Turn a raw syslog file into a report with grep, awk, sort and uniq
  • Check management ports (SSH 22, Telnet 23, HTTP 80, HTTPS 443, NETCONF 830) from the command line
  • Log in to IOS and IOS XE with SSH, run one-shot commands and install an SSH public key on both
  • Write a safe Bash script (shebang, set -euo pipefail, loops, exit codes) that backs up device configurations

The tasks

  1. Find your way around Bash
  2. Use environment variables
  3. Turn a syslog file into a report
  4. Check your addressing and reachability
  5. Check the management ports
  6. Log in with SSH and run one-shot commands
  7. Log in with a key instead of a password
  8. Back up both routers with one script

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 Your automation workstation - Bash SSH keys and management ports3 nodes and 1 network, 3 links. Every link is listed as text below the diagram.devboxr1xe1Mgmteth0Gi0/0Gi1
3 nodes and 1 network, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Your automation workstation: Bash, SSH keys and management ports, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
devboxEVE-NG GUI server (Docker)eve-gui-server:latest1 vCPU, 1,024 MB
r1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
xe1Cisco CSR 1000vcsr1000vng-universalk9.17.03.08a-serial1 vCPU, 4,096 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 - CCNA and CCNP Automation guided labs.

  3. Open 01 - Your automation workstation - Bash SSH keys and management ports 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 labs

All Network automation labs

Related labs in other courses

CloudLabBox is independent of Cisco. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.