automating multi- vendor...
TRANSCRIPT
![Page 1: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/1.jpg)
Automating Multi-Vendor Networks
Teren SappArista Networks
![Page 2: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/2.jpg)
The “Crosshead” screw
▰ Credited to John P. Thompson in 1932▰ Sold to Henry F. Phillips in 1935▰ Thompson struggled to get into
manufacturing and gain industry support▰ Granted the first patent in 1932 for the
screw and in 1933 for the screwdriver
![Page 3: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/3.jpg)
Why Did We Need Another?
▰ The slot varied by screw size and required a closely matched bit on the driver
▰ Alignment with the bit to the screw aperture is difficult
▰ The bit often slips out since both ends are open
![Page 4: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/4.jpg)
The Right Tool For the Job
▰ The Phillips screw overcomes the problems of the slotted screwHowever….
▰ Single slot screws (aka flat head) are still quite prevalent
▰ In certain applications, one may be better than the other
▰ Hardware stores sell both along with many other types
![Page 5: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/5.jpg)
How’s this tie into Multi-Vendor Network Automation?
▰ Lots of choices when it comes to automation▻ Choose the one that’s right for you
▰ Ansible, Puppet, Chef, Salt etc are all great and very powerful
So what/where to start?
![Page 6: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/6.jpg)
“ The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that automation applied to an inefficient operation will magnify the inefficiency - Bill Gates
![Page 7: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/7.jpg)
NapalmNetwork Automation and Programmability Abstraction Layer with Multivendor support
▰ Napalm simplifies the communication to network devices
▰ Uses modern API’s for interaction▰ Simply provide the credentials and transport
and you’re off!
![Page 8: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/8.jpg)
NapalmNetwork Automation and Programmability Abstraction Layer with Multivendor support
show version
show version
show version
<------- pyeapi -------->
<------- pynxos ------->
<---- junos-eznc ----->
Network Automation and Programmability Abstraction Layer with Multivendor support
![Page 9: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/9.jpg)
Why not netmiko or paramiko?
Goes back to the
![Page 10: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/10.jpg)
Nornir - Formally Brigade
▰ Written completely in Python▰ Purpose built for network automation▰ Easy to debug - use Python tools!▰ Manages inventory of devices
![Page 11: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/11.jpg)
Parallel Task Execution
▰ Allows you to define how many “workers” you’d like (default is 20)
▰ 1 worker means everything is processed serially
▰ Tasks create more tasks which then run in serial
![Page 12: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/12.jpg)
Nornir Initialization
![Page 13: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/13.jpg)
Nornir - Inventory
▰ Inventory consists of three items:▻ Hosts - Individual devices▻ Groups - Groups of devices▻ Defaults - Default values for all devices
▰ SimpleInventory (default) uses YAML▻ Network Source of Truth (NSOT)▻ Netbox▻ Ansible
![Page 14: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/14.jpg)
Sample inventory/hosts.yaml
![Page 15: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/15.jpg)
Putting Nornir and Napalm together
▰ Napalm is a plugin for Nornir▻ Could use netmiko or paramiko instead
▰ Nornir uses Napalm to handle all device communication
![Page 16: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/16.jpg)
Putting Nornir and Napalm together
![Page 17: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/17.jpg)
Demo TimeConfiguration/state auditing and a few changes
Arista (eos), Cisco (nxos) and Juniper (junos)
![Page 18: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/18.jpg)
Getting basic info like model from the devices
![Page 19: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/19.jpg)
Running the ‘show version’ command on all devices
![Page 20: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/20.jpg)
Adding a vlan to all devices
![Page 21: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/21.jpg)
Show arp across all devices
![Page 22: Automating Multi- Vendor Networkschinog.org/.../F_9.10_Automating-a-Multi-Vendor-Network-by-Teren-S… · How’s this tie into Multi-Vendor Network Automation? Lots of choices when](https://reader034.vdocuments.us/reader034/viewer/2022052006/601a998aebc9a052f0232677/html5/thumbnails/22.jpg)
Additional Resources
▰ https://github.com/dravetech/nornir-workshop - Start here!▰ https://github.com/nornir-automation/nornir▰ https://github.com/napalm-automation/napalm▰ https://packetpushers.net/podcast/heavy-networking-445-an-introduction-to-the-nornir-
automation-framework/
▰ Special thanks to David Barroso and the rest of the Nornir team