In your first Python lesson, you ran the script
deploy_vlan.pywithout understanding its code.
Now you can read every part of it:
Figure 1 - The Four Parts of the Script
In the lab, open
deploy_vlan.pyand read its four parts.
Change the variables to create VLAN 50 named GUEST on SW1 and SW2 to get the flag.Answer the question below
Enter the flag you obtained.
The function
deployconnects to one switch and sends the commands.
It uses an object of Netmiko and its methods:
Figure 2 - The Function deploy Uses an Object
In the lab, the function
build_configwrites the commands of one port.
Add the commanddescription PRINTERto these commands and run the script to get the flag.Answer the question below
Enter the flag you obtained.
The main program calls
deployfor each switch of the inventory.
Withtryandexcept, a switch that does not answer does not stop the script:
Figure 3 - The Main Program of the Script
In the lab, a new switch SW3 has the address 10.0.0.4 and a printer on its port Gi0/2.
Add it to the inventory and run the script to get the flag.Answer the question below
Enter the flag you obtained.