O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Python Network Programming for Network Engineers (Python 3)

Video Description

Program networks using Python 3. Learn network programmability with this practical GNS3 and Cisco course

About This Video

  • Learn network programmability with GNS3 and Python 3
  • Learn how to scale your network scripts

In Detail

This course is based on Python 3. You'll master network programmability and network automation using GNS3 and Python 3. This course will show you how you can start programming Cisco networks within 20 minutes. This course is practical; we will show you how you can quickly and easily start network programming by using GNS3, Cisco IOS, and Python. You will see demonstrations showing the configuration of both Cisco routers and switches in GNS3—for example, how to configure multiple VLANs on a multiple switches, or how to configure OSPF on a router and more. This course shows you practical examples using Python to programmatically configure Cisco network devices rather than just talking about it. Learn how to automate networks using Telnet, SSH, Paramiko, Netmiko, NAPALM. Tools such as NAPALM and Netmiko make it easy to configure and interact with network devices using an API such as NETCONF or via SSH. Don't reinvent the wheel: use the tools available to you to quickly and easily automate your networks.

Table of Contents

  1. Chapter 1 : Introduction
    1. Introduction 00:03:49
    2. Code Password 00:00:05
  2. Chapter 2 : GNS3 2.1 Setup
    1. GNS3 2.1 Install Part 1: Components and software requirements 00:03:33
    2. GNS3 2.1 Install Part 2: GUI install 00:11:47
    3. GNS3 2.1 Install Part 3: Troubleshooting GNS3 2.1 installation issues Windows 10 00:04:38
    4. GNS3 2.1 Install Part 4: Basic GNS3 2.1 Network (your first network) 00:09:51
    5. GNS3 2.1 Install Part 5: Where do I get Cisco IOS images? 00:07:55
    6. GNS3 2.1 Install Part 6: Cisco IOS network using Dynamips 00:12:13
    7. GNS3 2.1 Install Part 7: GNS3 2.1 VM, VIRL and switching 00:08:29
    8. GNS3 2.1 Install Part 8: GNS3 2.1 VM, VMware 14 issues 00:11:55
    9. GNS3 2.1 Install Part 9: Cisco VIRL IOSv import into GNS3 2.1 00:11:24
    10. GNS3 2.1 Install Part 10: Cisco VIRL and Dynamips network! 00:07:48
  3. Chapter 3 : Quick Start Guide to Network Automation
    1. Quick Start 1: GNS3 2.1 Lab Setup and IDEs 00:10:22
    2. Quick Start 2: Telnet Script creation 00:11:21
    3. Quick Start 3: Telnet Script Test 00:06:04
    4. Quick Start 4: Telnet to a switch and create VLANs 00:08:16
    5. Quick Start 5: Loops 00:07:29
    6. Quick Start 6: PEP8: Python Style Guide 00:02:41
    7. Quick Start 7: Configure switch VLANs using loops 00:08:55
    8. Quick start 8: Create a multiple switch network 00:08:17
    9. Quick Start 9: Open a file of switch IP addresess 00:08:22
    10. Quick Start 10: Configure multiple switch with a loop 00:03:01
    11. Quick Start 11: Loops within loops 00:06:52
    12. Quick Start 12: Backup Network Device Configurations 00:07:10
  4. Chapter 4 : Netmiko: Use SSH for Network Automation
    1. Netmiko Part 1: Introduction 00:02:34
    2. Netmiko Part 2: Enable SSH on switches in network 00:04:38
    3. Netmiko Part 3: Your first Netmiko SSH Script 00:08:01
    4. Netmiko Part 4: Script for multiple switches 00:03:55
    5. Netmiko Part 5: Run script and configure multiple devices 00:05:11
    6. Netmiko Part 6: File of multiple Cisco commands 00:05:56
    7. Netmiko Part 7: Program multiple switches with file of commands 00:10:16
    8. Netmiko Part 8: Script to program entire network 00:05:43
    9. Netmiko Part 9: Run script to program entire network 00:04:41
  5. Chapter 5 : NAPALM
    1. VNAPALM Introduction (P75_12) 00:05:58
    2. NAPALM Python 3 versus 2.7 00:03:31
    3. Install NAPALM (P68_13) 00:02:22
    4. NAPALM connect to switch 1 (P68_14) 00:03:52
    5. JSON and more commands (P68_16) 00:05:03
    6. Mac address table, ARP cache (P68_17) 00:05:47
  6. Chapter 6 : NAPALM and BGP
    1. Use NAPALM to retrieve BGP neighbor information: Part 1 (P75_1) 00:02:09
    2. Use NAPALM to retrieve BGP neighbor information: Part 2 (P75_2) 00:05:12
    3. Use NAPALM to retrieve BGP neighbor information: Part 3 (P75_3) 00:01:13
    4. NAPALM: Multiple BGP neighbors (P75_4) 00:04:42
    5. NAPALM and bigger BGP Network Part 1 (P75_5) 00:04:24
    6. NAPALM and bigger BGP network Part 2 (P75_5b) 00:02:52
  7. Chapter 7 : Use NAPALM for device configuration audit and changes
    1. Use NAPALM to configure Access lists (P75_6) 00:03:45
    2. Check if ACL already exists and add if missing (P75_7) 00:04:17
    3. Use NAPALM for auditing device configs (P75_8) 00:00:52
    4. Use NAPALM to add multiple config files (P75_9) 00:04:08
    5. NAPALM: Multiple config files, multiple devices (P75_10) 00:03:56
  8. Chapter 8 : Iteration Examples: Netmiko scripts
    1. Netmiko Iteration: Script Overview 00:05:52
    2. Netmiko Iteration (Script 1): Basic Script 00:01:33
    3. Netmiko Iteration (Script 2): Open a file of commands 00:05:51
    4. Netmiko Iteration (Script 3): Configure multiple devices using a file of devices 00:07:24
    5. Netmiko Iteration (Script 4): Remove passwords from script 00:04:13
    6. Netmiko Iteration (Script 5): Except (Error) Handling 00:07:37
    7. Netmiko Iteration (Script 6): Determine device types and run specific device typ 00:07:43
    8. Netmiko Iteration (Script 7): Iterate device type script 00:03:04
  9. Chapter 9 : Netmiko Scaling
    1. Part 1: Encrypted Password File 00:07:30
    2. Part 2: Netmiko Sequential Part 1 00:05:04
    3. Part 3: Netmiko Sequential Part 2 00:06:52
    4. Part 4: Netmiko Multithreading 00:05:40
    5. Part 5: Netmiko Thread Pools 00:05:41
  10. Chapter 10 : Python Theory
    1. Theory topics - very short (P62_14_15) 00:02:04
    2. Keep learning (P61_26) 00:02:18
    3. 2.7 and 3 setup (P61_27) 00:04:12
    4. 2.7 and 3 examples (P61_28) 00:03:14
    5. Basic Hello World Scripts (P61_29_30) 00:01:29
  11. Chapter 11 : Python Theory: Objects, Variables and Data Types
    1. Python Objects (P61_1) 00:05:13
    2. Python Objects Part 2 (P61_2) 00:01:12
    3. Python Variables (P61_3) 00:03:31
    4. Python Variables Part 2 (P61_4_5) 00:02:35
    5. Python Variables Part 3 (P61_6) 00:04:16
    6. Python Variables Part 4 (P61_7_8) 00:02:27
    7. Data Types (P61_9) 00:01:47
    8. Data Type testing (P61_10) 00:03:14
  12. Chapter 12 : Python Theory: Numbers
    1. Introduction (P61_19) 00:00:59
    2. Numeric Types (P61_11) 00:01:50
    3. Int and Float (P61_12) 00:01:45
    4. Operators (P61_14) 00:04:35
    5. Operators Part 2 (P61_15_16) 00:06:27
    6. Operators (P61_17_18) 00:03:28
    7. bin hex oct (P61_20) 00:01:34
    8. binary decimal octal number examples (P62_1) 00:00:31
    9. int calculation (P62_2) 00:03:12
    10. Floats (P62_3) 00:02:11
  13. Chapter 13 : Python Theory: Strings
    1. strings (P62_4) 00:03:33
    2. strings (GT 06-8-17 7_8) 00:03:23
    3. convert to a string using str() (P62_10) 00:00:40
    4. escape special character meaning with \ (P62_12) 00:03:02
    5. strings (P62_9) 00:01:58
    6. string concatenation with + (P62_13) 00:01:27
    7. multiplication operator * (P62_16) 00:01:26
    8. string offsets - extract characters with [] (P62_17) 00:03:36
    9. string slice _ slicing (P62_string) 00:03:36
    10. string slice _ slicing 2 (P62_1string) 00:02:16
    11. string slice _ slicing 3 (P62_2string) 00:01:24
    12. lower upper (P73_11) 00:02:10
    13. startswith endswith (P73_12) 00:02:14
    14. strip lstrip rstrip (P73_13) 00:02:15
    15. isdigit (P73_14) 00:01:15
    16. count (P73_15) 00:03:17
    17. Old Style text using % (P66_24) 00:03:34
    18. Strings: New way to do text using {} (P73_16) 00:02:39
    19. dir (P73_9) 00:01:44
  14. Chapter 14 : Get version information from a switch
    1. Get show version from switch (P65_14) 00:04:18
    2. Telnet and string offset (P65_16) 00:04:36
    3. Show version using len (P65_17) 00:02:02
    4. Split 1 (P65_18_21) 00:01:57
    5. Split 2 (P73_18) 00:01:19
    6. List and join (P73_17) 00:02:52
    7. List and len - use Interface example (P73_25) 00:01:47
    8. Index introduction(P66_1) 00:03:17
    9. Real switch get version using index and slice (P66_2_3) 00:03:53
    10. Python3 telnet to switch (P66_4) 00:03:22
    11. Count (P66_6) 00:05:59
    12. Use find to get information from a real switch (P66_10) 00:05:22
    13. Python3 Telnet versus Python2 - Find version of software (P66_11) 00:03:18
    14. find not found (P66_12) 00:00:51
    15. String methods - upper (P66_13) 00:01:43
    16. String methods - startswith and endswith (P66_14) 00:01:45
    17. String methods - strip (P66_15) 00:03:08
    18. String methods - split demo (P66_16) 00:01:09
    19. String methods - Join (P66_17_18) 00:00:47
    20. String methods - is it in string? (P66_19) 00:01:01
    21. String concatenation (P66_20) 00:00:31
    22. Capitalize, upper, lower, swap (P66_23) 00:01:44
  15. Chapter 15 : Python Theory: Comparisons
    1. Boolean comparisons 00:04:45
    2. Boolean Truth Table 00:02:01
    3. Boolean Truth Table Demo 00:03:37
    4. false conditions 00:01:21
  16. Chapter 16 : Python Theory: Lists
    1. Lists versus tuples 00:03:05
    2. lists 00:02:45
    3. create a list using split 00:03:08
    4. lists in lists 00:04:49
    5. lists versus tuples – documentation 00:00:48
    6. list merge and extend 00:01:43
    7. List methods 00:01:35
    8. lists insert and delete 00:04:10
    9. list pop index and in 00:03:55
    10. reverse sort 00:04:37
    11. len copy list 00:03:56
  17. Chapter 17 : Python Theory: Tuples
    1. tuples 00:04:52
    2. Tuples and Sequences v2 00:01:59
  18. Chapter 18 : Python Theory: Code Structures
    1. Comments in Code (P72_2) 00:03:17
    2. Line Continuation (P72_3) 00:01:42
  19. Chapter 19 : Python Theory: if / else / elseif logic
    1. if logic 00:07:09
    2. physical router demonstration 00:07:58
    3. elseif 00:04:24
  20. Chapter 20 : Python Theory: While Loops
    1. while loop 00:04:21
    2. infinite while loop with break 00:03:21
    3. infinite while loop with continue 00:03:17
    4. while loop with a list 00:02:44
    5. while loop with else 00:02:14
  21. Chapter 21 : Python Theory: For Loops
    1. for loops 00:03:17
    2. for loop with dictionary 00:02:56
    3. for loop with if and lists 00:01:35
  22. Chapter 22 : Python Theory: Ranges
    1. Ranges 1 00:04:55
    2. Ranges 2 00:02:42
  23. Chapter 23 : Python Theory: Dictionaries
    1. Dictionary Theory (P70_17) 00:03:04
    2. Dictionary Demo (P70_18) 00:03:29
    3. Combine Dictionaries (P70_19) 00:01:32
    4. Dictionaries: Clear and check (P70_20) 00:03:25
    5. Dictionaries: Add values (P70_21) 00:04:27
  24. Chapter 24 : Python Theory: Functions
    1. Functions Intro 00:06:10
    2. Functions Intro Part 2 00:03:32
    3. Functions Part 3 00:02:51
    4. Functions - Netmiko and Router 00:03:44
    5. Functions - Netmiko and Router 00:03:57
    6. Function 6 - Named keyword arguments (Netmiko) 00:04:08