From the course: Network Automation Quick Start

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Configure multiple switches using a loop

Configure multiple switches using a loop

From the course: Network Automation Quick Start

Configure multiple switches using a loop

- So again, python3, python35.py press enter, username is david, password is gonna be cisco. You can see that the script is downloading to switch one. It's already on switch two we can see the debug on the screen. It's already got to switch four. We can see the debug on switch four. It's not configuring switch six. You can see the VLANs are being configured. It's now up to VLAN seven and as you can see, it's now completed. So this script only created seven VLANs on each switch but notice on switch four we now have the seven VLANs. So we were able to get the network automation container to telnet to each switch in the file and create these seven VLANs. If you wanted to create more, we could simply add additional lines of code here. So I could copy those two lines and paste them in to create the additional VLAN. I'll save the script so python3 python35.py username is david, password is cisco. You can see it's connecting to switch three at the moment, switch four, there's the output of…

Contents