Automation and Deployment
(BGN4) Task 2 study guide
updated 2026/2027 syllabus
Part I: VLAN Deployment Automation Solution
A. Python Scripting for VLAN Identification
1. What is the first step in replicating network connection states for the
VLAN automation task?
Replicate network connection states in QEMU within the GNS3 lab
environment. You must ensure the virtual network devices are correctly
connected and started before running any automation scripts.
2. What is the purpose of the first Python script you must write for the
VLAN deployment?
The script is designed to identify existing VLANs within Access Closet 1
on the 10.10.1.1 network.
3. What Python library is commonly used to connect to network devices via
SSH for VLAN inspection?
Netmiko or Paramiko. These libraries facilitate SSH connections to network
switches to run show commands like show vlan.
1
,4. How do you verify the successful execution of the VLAN identification
script?
By providing a screenshot that clearly shows the full screen, the script's
output, and the date and time displayed on the monitor.
5. What command would you use to manually identify VLANs on a Cisco
switch before automating the process?
show vlan brief
6. What specific network information must be included in the Python script
for connecting to Access Closet 1 switches?
The management IP address (10.10.1.1 network), SSH credentials
(username/password), and the device type (e.g., cisco_ios).
7. If your script fails to connect to a switch, what should be the first
troubleshooting step?
Check if the device is powered on and if the network connection state in
QEMU/GNS3 is active and replicated correctly.
8. How should you handle exceptions in your Python script to make it
robust for the assessment?
Use try-except blocks to catch exceptions like
netmiko.ssh_exception.NetmikoTimeoutException to handle connection
failures gracefully.
2
, 9. What is the validation step for the identification script?
Manually logging into a switch and running show vlan to compare the
output with the results generated by your Python script.
10. What is a key troubleshooting step if the script returns an incomplete list
of VLANs?
Verify that the parsing logic in the script correctly reads the output from the
switch. Use print() statements to debug the raw output before parsing.
B. Python Scripting for VLAN Deployment
11. What is the core function of the second Python script?
It adds and configures the VLAN infrastructure to align with the specific
needs described in the "Network Automation Scenario" document.
12. How does the Python script add VLANs to a switch?
By establishing an SSH connection (via Netmiko) and sending
configuration commands such as vlan 10, name Faculty, and exit.
13. What must be included with the script to prove it ran correctly?
A copy of the script and a screenshot of the successful execution showing
the date and time.
14. You need to configure a VLAN named "Students" with ID 20. Write the
3