I am commerce graduate.. But few years back I developed passion for Networking. I was having so much of trouble with understanding programming.. Thank you.. your videos helped me in CCNA. Now taking help of your videos for CCNP ENCOR.
I'm guessing the answer is "use jinja2 templates" but what if we had to do deeper into the prompt, such as*interface* or *config-bgp* *config-ospf*, is it still possible to configure with just netmiko? I guess we would just have to change what we expect back from the router as the expect value (so not #) or just put in send_config_timing?
This is all cool stuff, however it seems I would have done it faster by writing the commands in notepad and then pasting them into command line. I am interested to see how would you do it on 20 switches at the same time. Also what is lacking in those scripts is the workspace concept which you could leverage for storage of configuration templates and building a database/inventory of devices you want to work with :) I think Nornir has got this functionality.
@@brunomuniz8904 You create an array with all the IP addresses for each device and you do a for and search in the elements of the array. With that you can automate the selection in the array.
"I am interested to see how would you do it on 20 switches at the same time" 2 Ways to do that....Write a file with all of the device IP address. Write you Python code to read the first IP, configure that device, when done go back to the file read the 2nd IP, configure the next device, when done read the third IP and so on until all of the IP's are read and configured. Second option (if the IP's are somewhat contiguous) write a loop that increments the IP's in your Python configuration code. Cut and paste is nice but...6 devices configured 48 ports per, with about 10- 12 lines of code, complete in less than 15 minutes, you can't beat.
@@kwallaceccie thanks for replying, how do I get to a stage where I can write scripts from scratch by memory without needing to copy someone else’s code? Is it just practicing by copying code and then eventually I won’t need to copy and I’ll be able to originate my own code?
How to input enable secret password? I try with this command : net_connect.enable() . But enable secret password not input to device. with log device : % Invalid input detected at '^' marker.
How to input enable secret password? I try with this command : net_connect.enable() . But enable secret password not input to device. with log device : % Invalid input detected at '^' marker.
For some reason, your tone and speaking style reminds me of a college football sportscaster. Love netmiko.
I am commerce graduate.. But few years back I developed passion for Networking. I was having so much of trouble with understanding programming..
Thank you.. your videos helped me in CCNA. Now taking help of your videos for CCNP ENCOR.
Man I been trying to do this for days, and watching your finally it click and work. Thank you!!!
awesome information
Great video as always Kevin. Thank you for sharing the knowledge.
You're very welcome, and I'm glad you enjoyed the video!
Kavin W thanks for your simple explanation
What would be suggested for other network device platforms that weren't listed?
Nice dev ops video, Kevin. Kirk Byers did a great job with that python package.
awesome video sir. Thanks
waw.. interesting stuff
It seems it also handles the exit/end of vlan sub-config mode.
Fantastic!
Thank you Mr. Wallace.
I'm guessing the answer is "use jinja2 templates" but what if we had to do deeper into the prompt, such as*interface* or *config-bgp* *config-ospf*, is it still possible to configure with just netmiko? I guess we would just have to change what we expect back from the router as the expect value (so not #) or just put in send_config_timing?
This is all cool stuff, however it seems I would have done it faster by writing the commands in notepad and then pasting them into command line. I am interested to see how would you do it on 20 switches at the same time. Also what is lacking in those scripts is the workspace concept which you could leverage for storage of configuration templates and building a database/inventory of devices you want to work with :) I think Nornir has got this functionality.
If you are thinking in only one device, I agree with you, however, what if you need to configure dozens of devices?
@@brunomuniz8904 You create an array with all the IP addresses for each device and you do a for and search in the elements of the array. With that you can automate the selection in the array.
"I am interested to see how would you do it on 20 switches at the same time"
2 Ways to do that....Write a file with all of the device IP address. Write you Python code to read the first IP, configure that device, when done go back to the file read the 2nd IP, configure the next device, when done read the third IP and so on until all of the IP's are read and configured.
Second option (if the IP's are somewhat contiguous) write a loop that increments the IP's in your Python configuration code. Cut and paste is nice but...6 devices configured 48 ports per, with about 10- 12 lines of code, complete in less than 15 minutes, you can't beat.
how would you go about grabbing the existing user logged in and then prompt for a password instead of typing it in the script?
Hi Kevin,
Is this from the course you have on o’Reily? I’m thinking about taking it on there. Or is this from a different course?
Thanks
Yes indeed! It is from my Fundamentals of Network Programmability course on O'Reily. I hope you enjoy the training.
@@kwallaceccie thanks for replying, how do I get to a stage where I can write scripts from scratch by memory without needing to copy someone else’s code? Is it just practicing by copying code and then eventually I won’t need to copy and I’ll be able to originate my own code?
kevin where exactly can i learn network programmability?
I recommend my “Fundamentals of Network Programmability” course. It can be purchased at the following link: www.kwtrain.com/offers/g3qaptrR
I got failed to enter configuration mode.... May I know why it is happening
with this voice you could work for a radio station
How to input enable secret password? I try with this command : net_connect.enable() . But enable secret password not input to device. with log device : % Invalid input detected at '^' marker.
Set attribute secret:password
Great! thanks a lot!
How to input enable secret password? I try with this command : net_connect.enable() . But enable secret password not input to device. with log device : % Invalid input detected at '^' marker.