Sveriges mest populära poddar

David Bombal

#92: Python and Linux on Cisco IOS?

30 min • 2 oktober 2019
Run Python and Linux directly on IOS XE? Yes you can! Take your network automation skills to the next level with scripting and automation directly on Cisco devices. You can be a DevNet Engineer! Amaze others with your knowledge of the Cisco IOS. You don't need python for these scripts. Rock that job interview and show senior network engineers what you can do. Keep on learning and change your life. Get that good paying job by showing your skills. Menu: Overview: 0:01 Lab Setup (GNS3 / CSR): 2:00 IOS XE & Container explanation: 3:14 Guestshell Setup: 7:14 Access the Linux Shell: 13:48 Sort out routing: 15:11 SSH to Guestshell remotely: 19:30 Install applications: 22:20 Python scripting: 23:14 ================================= Documentation: ================================= Cisco IOS Shell Configuration Guide: http://bit.ly/2kwMyYN ================================ Books: ================================= Cisco Press Book: https://amzn.to/2LpaU1a Good O'Reilly Book: https://amzn.to/2Lpbw6Z ================================= Free TFTP Server: ================================= Free SolarWinds TFTP Server: http://bit.ly/2mbtD6j ================================= Free DevNet Labs: ================================= DevNet Lab: Introduction to the Guest Shell: http://bit.ly/2oq9fj7 DevNet Lab: Introduction to On-Box Python: http://bit.ly/2nEXjcI ================================= CSR Configuration steps: ================================= ! Check if service is running en show iox-service ! Configure Basics conf t hostname CSR1 interface GigabitEthernet1 no shut ip address 10.1.1.1 255.255.255.0 exit exit ! Enable the service conf t iox exit show iox-service ! Configure Virtual Port conf t interface VirtualPortGroup0 ip unnumbered GigabitEthernet1 exit exit ! Enable the guestshell guestshell enable VirtualPortGroup 0 guest-ip 10.1.1.2 ! Access guestshell guestshell run bash ! Add DNS information to Linux container echo nameserver 8.8.8.8 | sudo tee —append /etc/resolv.conf ! Need to set up routing so Router knows how to route conf t ip route 10.1.1.2 255.255.255.255 virtualportgroup 0 ip route 0.0.0.0 0.0.0.0 10.1.1.254 ip domain-lookup ip name-server 8.8.8.8 exit ! Check stuff on guestshell host ====================== sudo ifconfig cat /etc/resolv.conf !Add a user sudo useradd david sudo passwd david ! Install nano and Python 3 sudo yum install nano -y ! You don't need Python3 for these script examples sudo yum install python3 ================================= Python Script: ================================= import sys import cli cli.executep(‘show ip int brief’) cli.executep(‘show ver’) ================================= Documentation ================================= Programmability Configuration Guide, Cisco IOS XE Fuji 16.9.x: http://bit.ly/2lUSETq Programmability Configuration Guide, Cisco IOS XE Gibraltar 16.10.x: http://bit.ly/2mErAIo DevNet presentation: http://bit.ly/2lWedD8 Hank Preston: http://bit.ly/2nu4VyG DevNet 10x Engineer CCNA Cisco Devnet Associate Python Devnet cert CCNP Enterprise CCNP Security CCNP Data Center CCNP Service Provider CCNP Collaboration Cisco Certified Devnet Professional Cisco Certified Network Professional LPIC 1 LPIC 2 Linux Professional Institute LX0-103 LX0-104 XK0-004 David’s details: YouTube: https://www.youtube.com/davidbombal Twitter: https://www.twitter.com/davidbombal Instagram: https://www.instagram.com/davidbombal LinkedIn: https://www.linkedin.com/in/davidbombal Facebook: https://www.facebook.com/davidbombal.co Website: http://www.davidbombal.com #python #linux #DevNet
Kategorier
Förekommer på
00:00 -00:00