| About the Author |
|
xix | |
| About the Technical Reviewer |
|
xxi | |
| Acknowledgments |
|
xxiii | |
| Introduction |
|
xxv | |
|
Chapter 1 Introduction to Python Network Automation |
|
|
1 | (22) |
|
|
|
1 | (1) |
|
Exploring Your Skills and Prerequisites |
|
|
2 | (1) |
|
General Competencies of Three Main IT Domain Group |
|
|
3 | (3) |
|
Comparative Analysis of IT Engineers' Responsibilities |
|
|
6 | (4) |
|
Python and Network Automation Studies |
|
|
10 | (1) |
|
Why Do People Want to Learn Python? |
|
|
10 | (2) |
|
What Do I Need to Study Network Automation Using Python? |
|
|
12 | (1) |
|
Hardware: Minimum Specifications for Laptop or PC |
|
|
13 | (1) |
|
|
|
14 | (2) |
|
Building a Network Automation Development Environment Using GNS3 |
|
|
16 | (4) |
|
Downloading Supplementary Guides and Source Code |
|
|
20 | (1) |
|
|
|
21 | (1) |
|
Storytime 1 Mega Speed Shoe Factory |
|
|
21 | (2) |
|
Chapter 2 Learn Python Basics on Windows |
|
|
23 | (90) |
|
"Hello, World!" and print() Function in Interactive Mode |
|
|
24 | (3) |
|
Preparing for the Python Exercises |
|
|
27 | (1) |
|
|
|
28 | (2) |
|
Indentation and Code Blocks |
|
|
30 | (1) |
|
|
|
31 | (1) |
|
|
|
32 | (1) |
|
Doing the Python Exercises |
|
|
33 | (1) |
|
|
|
34 | (1) |
|
Exercise 2-1 Create Variables and Assign Various Data Types |
|
|
34 | (1) |
|
Exercise 2-2 Create Variables and Use the print() Function to Print Output |
|
|
35 | (1) |
|
Exercise 2-3 Use Abbreviated Variable Assignment |
|
|
36 | (1) |
|
Exercise 2-4 Enter a String, Escape Character Backslash (\), and type() Function |
|
|
36 | (2) |
|
Exercise 2-5 Determine If a Variable Is a Container, a Tag, or a Pointer |
|
|
38 | (1) |
|
Exercise 2-6 Use String Indexing |
|
|
39 | (1) |
|
Exercise 2-7 Understand Variable Assignment Errors |
|
|
39 | (1) |
|
Exercise 2-8 Avoid "SyntaxError: EOL While Scanning String Literal" |
|
|
40 | (1) |
|
Exercise 2-9 Avoid "NameError: name `variable_name' is not defined" |
|
|
40 | (1) |
|
Exercise 2-10 Avoid "SyntaxError: invalid syntax" |
|
|
41 | (1) |
|
Exercise 2-11 Avoid "TypeError: `str' object is not callable" |
|
|
41 | (2) |
|
Exercise 2-12 Add Multiline Comments with Triple Quotation Marks |
|
|
43 | (1) |
|
Exercise 2-13 Use \ as an Escape Character to Remove Special Character Meanings |
|
|
44 | (1) |
|
Exercise 2-14 Enter (Inject) Values/Strings in a String Using %s |
|
|
44 | (1) |
|
Printing, Concatenating, and Converting Strings |
|
|
45 | (1) |
|
Exercise 2-15 Use the print() and len() Functions to Create a Simple Function |
|
|
45 | (1) |
|
Exercise 2-16 Use the lower() and upper() String Methods |
|
|
46 | (1) |
|
Exercise 2-17 Perform String Concatenation and Use the str() Method |
|
|
46 | (1) |
|
Exercise 2-18 Learn to Change a String Using Curly Brackets and format() |
|
|
47 | (1) |
|
Exercise 2-19 Adjust the Text Position with Curly Brackets and format() |
|
|
48 | (1) |
|
Exercise 2-20 Adjust the Number of Decimal Places |
|
|
49 | (1) |
|
Exercise 2-21 Ask for and Receive User Input with input() |
|
|
49 | (1) |
|
Exercise 2-22 Change a Word or Characters in a String |
|
|
50 | (1) |
|
Recap: Variables and Strings |
|
|
51 | (1) |
|
Numbers and Arithmetic Operators |
|
|
52 | (1) |
|
Exercise 2-23 Use Arithmetic Operators |
|
|
52 | (1) |
|
Exercise 2-24 Understand Integers vs. Strings |
|
|
53 | (1) |
|
Recap: Arithmetic Operators |
|
|
53 | (1) |
|
Booleans and Relational Operators |
|
|
54 | (1) |
|
Exercise 2-25 Use Booleans |
|
|
54 | (1) |
|
Exercise 2-26 Use Relational Operators |
|
|
55 | (1) |
|
Exercise 2-27 Use Boolean Expressions to Test True or False |
|
|
55 | (1) |
|
Exercise 2-28 Use Logical (Membership) Operators |
|
|
56 | (1) |
|
Exercise 2-29 Change the Order of Operation with () |
|
|
56 | (1) |
|
Control Statements: if, elif, and else |
|
|
56 | (1) |
|
Exercise 2-30 Use if and else |
|
|
57 | (1) |
|
Exercise 2-31 Use if, elif, and else |
|
|
57 | (1) |
|
Exercise 2-32 Write Code with if, elif, and else |
|
|
58 | (1) |
|
Recap: Boolean and Conditionals |
|
|
59 | (1) |
|
|
|
59 | (1) |
|
Exercise 2-33 Defining a Function |
|
|
60 | (1) |
|
Exercise 2-34 Assign Default Values to a Function |
|
|
60 | (1) |
|
Exercise 2-35 Define Hello and Goodbye Functions |
|
|
61 | (1) |
|
Exercise 2-36 Use the Odd or Even Function |
|
|
62 | (1) |
|
Exercise 2-37 Nest a Function Within a Function |
|
|
62 | (1) |
|
|
|
63 | (1) |
|
|
|
63 | (1) |
|
Exercise 2-38 Create a List and Index Items |
|
|
63 | (1) |
|
Exercise 2-39 Use append, extend, and insert in a List |
|
|
64 | (1) |
|
|
|
65 | (1) |
|
Exercise 2-40 Slice a List |
|
|
65 | (1) |
|
Exceptions and Error Handling |
|
|
66 | (1) |
|
Exercise 2-41 Avoid a ValueError Error |
|
|
66 | (1) |
|
Exercise 2-42 Handle Errors with try and except in a List |
|
|
66 | (2) |
|
Exercise 2-43 Find an Index of an Item in a List with the Customized Exception |
|
|
68 | (1) |
|
|
|
69 | (1) |
|
Exercise 2-44 Practice a List |
|
|
69 | (2) |
|
Using for Loops and while Loops |
|
|
71 | (1) |
|
Exercise 2-45 Use the for Loop's upper() and capitalize() Methods |
|
|
71 | (1) |
|
Exercise 2-46 Use the while Loop and len() Function |
|
|
71 | (1) |
|
|
|
72 | (1) |
|
Exercise 2-47 Use sort() vs. sorted() in a List |
|
|
72 | (1) |
|
Exercise 2-48 Link Two Lists |
|
|
72 | (1) |
|
Exercise 2-49 Find the List Length Using the len() Function |
|
|
73 | (1) |
|
Exercise 2-50 Use range() and the for Loop |
|
|
73 | (1) |
|
Exercise 2-51 Use the String List for loop() and range() with Arguments |
|
|
74 | (1) |
|
|
|
75 | (1) |
|
|
|
76 | (1) |
|
Exercise 2-52 See Some Basic Tuple Examples |
|
|
76 | (1) |
|
Exercise 2-53 Convert a Tuple to a List |
|
|
76 | (1) |
|
Exercise 2-54 Determine Whether a Tuple Immutable |
|
|
77 | (1) |
|
Exercise 2-55 Convert a Tuple to a List and a List to a Tuple |
|
|
78 | (1) |
|
Exercise 2-56 Use a for Loop in a Tuple |
|
|
78 | (1) |
|
Exercise 2-57 Assign Multiple Variables to a Tuple |
|
|
79 | (1) |
|
Exercise 2-58 Create a Simple Tuple Function |
|
|
79 | (1) |
|
Exercise 2-59 Use Tuples as List Elements |
|
|
80 | (1) |
|
|
|
80 | (1) |
|
|
|
81 | (1) |
|
Exercise 2-60 Understand Dictionary Basics |
|
|
81 | (1) |
|
Exercise 2-61 Avoid a Dictionary TypeError and Convert Two Lists to a Single Dictionary |
|
|
82 | (1) |
|
Exercise 2-62 Use Keys to Print Values from a Dictionary |
|
|
82 | (1) |
|
Exercise 2-63 Change a Dictionary Value |
|
|
83 | (1) |
|
Exercise 2-64 Add a New Set of Keys and Values to a Dictionary |
|
|
83 | (1) |
|
Exercise 2-65 Find the Number of Dictionary Elements |
|
|
84 | (1) |
|
Exercise 2-66 Delete Dictionary Keys and Values |
|
|
84 | (1) |
|
Exercise 2-67 Write a Python Script with a Dictionary |
|
|
84 | (1) |
|
Exercise 2-68 Use a Dictionary for a Loop and Formatting |
|
|
85 | (1) |
|
|
|
86 | (1) |
|
|
|
87 | (1) |
|
Exercise 2-69 Read and Display Hosts File from Your PC |
|
|
87 | (1) |
|
Exercise 2-70 Open and Close Hosts Files |
|
|
88 | (1) |
|
Exercise 2-71 Create Code to Close a File in Two Ways |
|
|
89 | (1) |
|
Exercise 2-72 Create a Text File, and Read, Write, and Print |
|
|
90 | (3) |
|
Exercise 2-73 Use rstrip() or lstrip() to Remove Whitespace |
|
|
93 | (1) |
|
Exercise 2-74 Python File Mode Exercise: Use r Mode |
|
|
94 | (1) |
|
Exercise 2-75 Python File Mode Exercise: Use r+ Mode |
|
|
95 | (1) |
|
Exercise 2-76 Python File Mode Exercise: Use a Mode |
|
|
96 | (3) |
|
Exercise 2-77 Python File Mode Exercise: Use a+ Mode |
|
|
99 | (1) |
|
Exercise 2-78 Python File Mode Exercise: Use w Mode |
|
|
99 | (1) |
|
Exercise 2-79 Python File Mode Exercise: Use w+ Mode |
|
|
100 | (1) |
|
Exercise 2-80 Python File Mode Exercise: Use x Mode |
|
|
101 | (1) |
|
Exercise 2-81 Python File Mode Exercise: Use x Mode |
|
|
102 | (1) |
|
Exercise 2-82 Open a Byte File in Python |
|
|
103 | (1) |
|
Exercise 2-83 Handle Errors with try and except |
|
|
104 | (1) |
|
Recap: Python file Handling Concept |
|
|
105 | (1) |
|
|
|
105 | (1) |
|
|
|
106 | (1) |
|
Exercise 2-84 Import the time Module |
|
|
106 | (1) |
|
|
|
106 | (1) |
|
Exercise 2-85 Use the time.sleep() Function |
|
|
106 | (1) |
|
Exercise 2-86 Browse a Path Using the sys Module |
|
|
107 | (1) |
|
Exercise 2-87 Add a New Filepath Using the sys Module |
|
|
108 | (1) |
|
Exercise 2-88 Check Built-ins and sys.builtinjnodule |
|
|
109 | (1) |
|
Exercise 2-89 Use a Simple import sys Module in a try and except Exercise |
|
|
110 | (1) |
|
Exercise 2-90 Understand Lambdas by Making a Calculator |
|
|
111 | (1) |
|
|
|
112 | (1) |
|
|
|
112 | (1) |
|
Chapter 3 More Python Exercises |
|
|
113 | (26) |
|
Getting Ready for the Exercises |
|
|
113 | (1) |
|
Exercise 3-1 Concatenate a List and a Tuple into a Single List |
|
|
114 | (1) |
|
Exercise 3-2 Use Python as a Calculator |
|
|
114 | (1) |
|
Exercise 3-3 Do Some Basic String format() Exercises |
|
|
114 | (1) |
|
Exercise 3-4 Ask for a Username |
|
|
115 | (1) |
|
Exercise 3-5 Get a Username: Version 1 |
|
|
116 | (1) |
|
Exercise 3-6 Get a Username: Version 2 |
|
|
117 | (1) |
|
Exercise 3-7 Get a Username: Version 3 |
|
|
118 | (2) |
|
Exercise 3-8 Add a Temporary Filepath, Import ex3_7.py as a Module, and Run the Script |
|
|
120 | (1) |
|
Exercise 3-9 Use Commas to Add Spaces Between Strings |
|
|
120 | (1) |
|
Exercise 3-10 Practice if; if and else; and if, elif, and else |
|
|
121 | (1) |
|
Exercise 3-11 Practice for ~ in range with end='' |
|
|
122 | (1) |
|
Exercise 3-12 Practice for ~ in range |
|
|
123 | (1) |
|
Exercise 3-13 Practice for line in ~ |
|
|
123 | (1) |
|
Exercise 3-14 Use the split() Method |
|
|
124 | (1) |
|
Exercise 3-15 Practice with lstrip(), rstrip(), strip(), upper(), lower(), title(), and capitalize() |
|
|
124 | (1) |
|
Exercise 3-16 Create a file and read it four different ways |
|
|
125 | (1) |
|
Exercise 3-17 Read and Output Files for a More Detailed Understanding |
|
|
126 | (1) |
|
Exercise 3-18 Use the getpass() Module and User Input |
|
|
127 | (1) |
|
Exercise 3-19 Understand the Difference Between Encoding and Decoding |
|
|
128 | (1) |
|
Exercise 3-20 Handle CSV Files in Python with the csv Module |
|
|
128 | (4) |
|
Exercise 3-21 Output a CSV File |
|
|
132 | (1) |
|
Exercise 3-22 Find the Price of a Cisco ISR |
|
|
132 | (1) |
|
|
|
132 | (1) |
|
Exercise 3-23 Calculate the Total Cost of the Router Purchases: No Module |
|
|
133 | (1) |
|
Exercise 3-24 Calculate the Total Cost of the Router Purchases: Using the csv Module |
|
|
134 | (1) |
|
Exercise 3-25 Convert dd-mmm-yy and Calculate the Difference in Days and Then in Years |
|
|
134 | (2) |
|
Exploring the Python IDE Environment |
|
|
136 | (1) |
|
|
|
137 | (1) |
|
Storytime 2 Machine vs. Human, The First Confrontation |
|
|
138 | (1) |
|
Chapter 4 Introduction to VMware Workstation |
|
|
139 | (30) |
|
VMware Workstation at a Glance |
|
|
139 | (2) |
|
Type-1 vs. Type-2 Hypervisors |
|
|
141 | (1) |
|
VMware Workstation Pro for a Proof-of-Concept Lab |
|
|
142 | (1) |
|
Before Using VMware Workstation |
|
|
142 | (3) |
|
What's Next on VMware Workstation 15 Pro? |
|
|
145 | (1) |
|
VMware Workstation 15 Pro User Console |
|
|
145 | (1) |
|
Basic Operations of VMware Workstation 15 Pro |
|
|
146 | (1) |
|
VMware Workstation Pro: Basic Operations |
|
|
147 | (2) |
|
|
|
149 | (3) |
|
|
|
152 | (1) |
|
Virtual Network Editor Overview |
|
|
152 | (3) |
|
Virtual Network Interface Description |
|
|
155 | (4) |
|
Revealing Each Virtual Network Interface Types |
|
|
159 | (9) |
|
|
|
168 | (1) |
|
Chapter 5 Creating an Ubuntu Server Virtual Machine |
|
|
169 | (54) |
|
Downloading and Installing a Ubuntu Server |
|
|
20 | (150) |
|
|
|
170 | (1) |
|
Downloading the Ubuntu Server 20.04 LTS Image |
|
|
171 | (1) |
|
Installing Ubuntu Server 20.04 LTS |
|
|
172 | (24) |
|
Logging In to a New Ubuntu Server 20 via SSH |
|
|
196 | (6) |
|
|
|
202 | (1) |
|
Ubuntu VM Customization 1: Enable Root User SSH Login on Ubuntu Server 20.04 |
|
|
203 | (2) |
|
Ubuntu VM Customization 2: Install a Desktop GUI and Other Packages |
|
|
205 | (5) |
|
Ubuntu VM Customization 3: Enable Root User GUI Access |
|
|
210 | (4) |
|
Taking a Snapshot of a Virtual Machine |
|
|
214 | (3) |
|
Cloning a Virtual Machine |
|
|
217 | (5) |
|
|
|
222 | (1) |
|
Chapter 6 Creating a CentOS 8 Server Virtual Machine |
|
|
223 | (52) |
|
Downloading and Installing a CentOS 8 Server Image |
|
|
223 | (1) |
|
Downloading the CentOS 8 Server Image |
|
|
224 | (2) |
|
Installing CentOS 8 Server |
|
|
226 | (34) |
|
Logging In to a New CentOS 8 Server via SSH |
|
|
260 | (3) |
|
Managing a Network Adapter on Linux |
|
|
263 | (6) |
|
Creating a GNS3 VM by Importing an ova File |
|
|
269 | (1) |
|
Downloading and Installing the GNS3 VM from an ova File |
|
|
270 | (4) |
|
|
|
274 | (1) |
|
Storytime 3 The Origin of Hypervisors |
|
|
274 | (1) |
|
Chapter 7 Linux Fundamentals |
|
|
275 | (54) |
|
|
|
276 | (2) |
|
|
|
278 | (1) |
|
Understanding the Linux Environment |
|
|
279 | (1) |
|
Understanding Linux Directories and File Formats |
|
|
280 | (1) |
|
|
|
281 | (1) |
|
|
|
282 | (11) |
|
|
|
293 | (13) |
|
Linux Basic Administration |
|
|
306 | (1) |
|
|
|
306 | (3) |
|
Linux Basic File and Directory Commands |
|
|
309 | (2) |
|
Linux File and Directory Exercises |
|
|
311 | (16) |
|
|
|
327 | (2) |
|
Chapter 8 Linux Basic Administration |
|
|
329 | (38) |
|
Information on Linux: Kernel and Distribution Version |
|
|
329 | (3) |
|
Information on Linux: Use the netstat Command to Validate TCP/UDP Ports |
|
|
332 | (7) |
|
Installing TFTP, FTP, SFTP, and NTP Servers |
|
|
339 | (1) |
|
|
|
340 | (6) |
|
Installing the SFTP Server |
|
|
346 | (4) |
|
Installing the TFTP Server |
|
|
350 | (5) |
|
Installing the NTP Server |
|
|
355 | (4) |
|
Linux TCP/IP Troubleshooting Exercise |
|
|
359 | (5) |
|
|
|
364 | (1) |
|
Storytime 4 Becoming a Savvy Linux Administrator, Perhaps Every IT Engineer's Dream? |
|
|
364 | (3) |
|
Chapter 9 Regular Expressions for Network Automation |
|
|
367 | (48) |
|
|
|
368 | (1) |
|
|
|
369 | (2) |
|
Studying Regular Expressions Using Python |
|
|
371 | (1) |
|
|
|
372 | (2) |
|
Method 2 Using the Linux Shell |
|
|
374 | (1) |
|
Regular Expression Breakdown: [ A-Z]{3}\d{4}[ /]\w+ |
|
|
375 | (1) |
|
Method 3 Using the Internet to Study Regular Expressions |
|
|
375 | (1) |
|
Regex Operation: The Basics |
|
|
376 | (2) |
|
|
|
378 | (1) |
|
Dot (.): Single Character Match |
|
|
379 | (1) |
|
|
|
380 | (1) |
|
|
|
380 | (1) |
|
|
|
380 | (2) |
|
|
|
382 | (1) |
|
|
|
383 | (4) |
|
|
|
387 | (1) |
|
|
|
388 | (1) |
|
|
|
389 | (1) |
|
|
|
389 | (1) |
|
|
|
390 | (1) |
|
|
|
391 | (1) |
|
Confusing Backslash Character |
|
|
392 | (1) |
|
Regular Expressions: A Little Revision Plus More |
|
|
393 | (1) |
|
|
|
393 | (10) |
|
Lookahead and Lookbehind Assertions |
|
|
403 | (1) |
|
Lookahead, Lookbehind, and Noncapturing group |
|
|
403 | (2) |
|
Practice More Lookarounds |
|
|
405 | (2) |
|
Lookaround Application Examples |
|
|
407 | (2) |
|
Sub Method: Substituting Strings |
|
|
409 | (1) |
|
Substitute Strings Using sub |
|
|
410 | (1) |
|
Using sub and \g to Swap Positions |
|
|
410 | (1) |
|
Insert a Function in sub Method |
|
|
411 | (2) |
|
|
|
413 | (2) |
|
|
|
415 | (76) |
|
|
|
415 | (2) |
|
Installing GNS3 for the First Time |
|
|
417 | (1) |
|
Downloading the GNS3 Installation File |
|
|
417 | (1) |
|
GNS3 Installation and Setup |
|
|
418 | (1) |
|
|
|
418 | (1) |
|
|
|
418 | (6) |
|
Getting Familiar with GNS3 |
|
|
424 | (1) |
|
|
|
424 | (2) |
|
Gracefully Shutting Down GNS3 and GNS3 VM |
|
|
426 | (2) |
|
Starting GNS3 as an Administrator |
|
|
428 | (1) |
|
Using GNS3 for the First Time: Cisco I0S and Windows Lab |
|
|
429 | (1) |
|
Cisco I0S Software License and Downloading an Older Cisco I0S |
|
|
430 | (1) |
|
Decompressing Cisco I0S for GNS3 Use |
|
|
431 | (11) |
|
Installing Cisco IOS on the GNS3 VM |
|
|
442 | (12) |
|
Creating an IOS Lab Topology on GNS3 and Connecting to the Internet |
|
|
454 | (8) |
|
Installing the Microsoft Loopback Adapter |
|
|
462 | (7) |
|
Accessing GNS3 Network Devices Using MS Loopback |
|
|
469 | (9) |
|
Configuring the GNS3 IOS Router Using a Python Script from the Windows Host PC |
|
|
478 | (4) |
|
Cisco IOS and GNS3 Appliance Lab |
|
|
482 | (1) |
|
Importing and Installing the GNS3 Linux Appliance Server |
|
|
482 | (4) |
|
Manually Assigning IP Address to GNS3 Linux Appliance Server |
|
|
486 | (1) |
|
Using the GNS3 Appliance Linux's Python to Manage R1 |
|
|
487 | (2) |
|
|
|
489 | (2) |
|
Chapter 11 Cisco IOS Labs |
|
|
491 | (24) |
|
Cisco IOS and the Linux VM Lab |
|
|
491 | (1) |
|
Creating a New GNS3 Project for the Linux VM Lab |
|
|
492 | (11) |
|
Uploading and Downloading Files to the GNS3 IOS Router from Linux VMs (File Transfer Testing Lab) |
|
|
503 | (8) |
|
Copying (Cloning) a GNS3 Project |
|
|
511 | (3) |
|
|
|
514 | (1) |
|
Chapter 12 Building a Python Automation Lab Environment |
|
|
515 | (34) |
|
Cisco CML-PERSONAL Software License Information and Software Downloads |
|
|
516 | (1) |
|
Downloading the Cisco CML-PERSONAL IOSvL2 (Switch) Image |
|
|
516 | (1) |
|
Downloading the Cisco CML-PERSONAL IOSv (Router) Image and startup_config Files |
|
|
517 | (1) |
|
Installing the Cisco CML-PERSONAL L2 Switch and CML-PERSONAL L3 on GNS3 |
|
|
518 | (1) |
|
Installing the Cisco CML-PERSONAL L2 Switch on GNS3 |
|
|
518 | (10) |
|
Quick Communication Test on CML L2 Switch Integration on GNS3 |
|
|
528 | (1) |
|
Installing the Cisco CML-PERSONAL L3 Router on GNS3 |
|
|
529 | (10) |
|
Quick Communication Test on CML L3 Router Integration on GNS3 |
|
|
539 | (2) |
|
Building a CML-PERSONAL Lab Topology |
|
|
541 | (7) |
|
|
|
548 | (1) |
|
Chapter 13 Python Network Automation Lab: Basic Telnet |
|
|
549 | (34) |
|
Python Network Automation: Telnet Labs |
|
|
549 | (2) |
|
Telnet Lab 1 Interactive Telnet Session to Cisco Devices on a Python Interpreter |
|
|
551 | (6) |
|
Telnet Lab 2 Configure a Single Switch with a Python Telnet Template |
|
|
557 | (5) |
|
Telnet Lab 3 Configure Random VLANs Using a for Loop |
|
|
562 | (4) |
|
Telnet Lab 4 Configure Random VLANs Using a while Loop |
|
|
566 | (1) |
|
|
|
566 | (3) |
|
VLANs Using the for ~ in range Loop Method |
|
|
569 | (4) |
|
Telnet Lab 6 Add a Privilege 3 User on Multiple Devices Using IP Addresses from an External File |
|
|
573 | (6) |
|
Telnet Lab 7 Taking Backups of running-config (or startup-config) to Local Server Storage |
|
|
579 | (3) |
|
|
|
582 | (1) |
|
Chapter 14 Python Network Automation Labs: SSH paramiko and netmiko |
|
|
583 | (46) |
|
Python Network Automation Labs Using the paramiko and netmiko Libraries |
|
|
583 | (1) |
|
Python SSH Labs: paramiko |
|
|
584 | (1) |
|
Paramiko Lab 1 Configure the Clock and Time Zone of All Devices Interactively in the Python Interpreter |
|
|
584 | (8) |
|
Paramiko Lab 2 Configuring an NTP Server on Cisco Devices Without User Interaction (NTP Lab) |
|
|
592 | (6) |
|
Paramiko Lab 3 Create an Interactive paramiko SSH Script to Save Running Configurations to the TFTP Server |
|
|
598 | (7) |
|
|
|
605 | (1) |
|
Netmiko Lab 1 Netmiko Uses a Dictionary for Device Information, Nota JSON Object |
|
|
606 | (8) |
|
Netmiko Lab 2 Develop a Simple Port Scanner Using a Socket Module and Then Develop a nemiko Disable Telnet Script |
|
|
614 | (7) |
|
Netmiko Lab 3 Config compare |
|
|
621 | (7) |
|
|
|
628 | (1) |
|
Chapter 15 Python Network Automation Labs: cron and SNMPv3 |
|
|
629 | (46) |
|
|
|
629 | (1) |
|
Cloning a GNS3 Project for the Next Lab |
|
|
630 | (7) |
|
Quick-Start to the Linux Scheduler, cron |
|
|
637 | (1) |
|
Ubuntu 20.04 LTS Task Scheduler: crontab |
|
|
637 | (4) |
|
Cent0S8.1 Task Scheduler: crond |
|
|
641 | (5) |
|
Learn cron Job Definitions with Examples |
|
|
646 | (2) |
|
Using Python to Run an SNMPv3 Query |
|
|
648 | (1) |
|
Quick-Start Guide to SNMP |
|
|
649 | (4) |
|
Learn to Use SNMPwalk on a Linux Server |
|
|
653 | (13) |
|
Borrowing Some Example Python SNMP Code |
|
|
666 | (7) |
|
|
|
673 | (2) |
|
Chapter 16 Python Network Automation Labs: Ansible, pyATS, Docker, and the Twilio API |
|
|
675 | (58) |
|
Python Network Automation Development Labs |
|
|
675 | (1) |
|
Quick-Start Guide to Ansible: virtualenv Lab 1 |
|
|
676 | (2) |
|
Installing virtualenv and Getting Started with Ansible |
|
|
678 | (7) |
|
Quick-Start Guide to pyATS (Genie): VirtualEnv Lab 2 |
|
|
685 | (15) |
|
Sendmail Lab Using an Imported Docker Image |
|
|
700 | (1) |
|
Docker Components and Account Registration |
|
|
701 | (1) |
|
|
|
702 | (1) |
|
|
|
703 | (4) |
|
Docker Sendmail Python Lab |
|
|
707 | (5) |
|
Lab: Sendmail Email Notification script Development |
|
|
712 | (5) |
|
CPU Utilization Monitoring Lab: Send an SMS Message Using Twilio |
|
|
717 | (1) |
|
TWILIO Account Creation, Install Twilio Python Module and SMS Message Setup |
|
|
718 | (5) |
|
CPU Utilization Monitoring Lab with an SMS Message |
|
|
723 | (9) |
|
|
|
732 | (1) |
|
Chapter 17 Upgrading Multiple Cisco IOS XE Routers |
|
|
733 | (28) |
|
Practical Python Network Automation Lab: IOS XE Upgrade Lab |
|
|
733 | (1) |
|
Applying OOP Concepts to Your Network |
|
|
734 | (4) |
|
Flow Control and Controlling User Input: UID, PWD, and Information Collector |
|
|
738 | (5) |
|
|
|
743 | (1) |
|
CSR 1000v IOS XE Software and Download |
|
|
744 | (1) |
|
Cisco CSR 10OOv Installation on VMware Workstation |
|
|
745 | (11) |
|
Discussion of How an IOS (I0S-XE/XR) Is Upgraded on Cisco Devices |
|
|
756 | (1) |
|
Tasks Involved in a Cisco IOS Upgrade |
|
|
756 | (3) |
|
|
|
759 | (2) |
|
Chapter 18 Python Network Automation Lab: Cisco IOS Upgrade Mini Tools Development |
|
|
761 | (1) |
|
Cisco IOS Upgrade Application Development |
|
|
761 | (1) |
|
Part A Pre-check Tools Development Connectivity Validation Tool |
|
|
762 | (37) |
|
Collect User's Login Credentials and User Input |
|
|
774 | (4) |
|
Collect a New IOS Filename and MD5 Value from a CSV File |
|
|
778 | (10) |
|
Check the MD5 Value of the New IOS on the Server |
|
|
788 | (4) |
|
Check the Flash Size on Cisco Routers |
|
|
792 | (4) |
|
Make Backups of running-config, the Interface Status, and the Routing Table |
|
|
796 | (3) |
|
Part B IOS Uploading and More Pre-check Tools Development |
|
|
799 | (56) |
|
|
|
799 | (5) |
|
Check the New IOS MD5 Value on the Cisco Device's Flash |
|
|
804 | (6) |
|
Options to Stop or Reload the Routers |
|
|
810 | (9) |
|
Check the Reloading Device and Perform a Post-Reload Configuration Verification |
|
|
819 | (10) |
|
|
|
829 | (2) |
|
Chapter 19 Python Network Automation Labs: Combining and Completing the Cisco IOS Upgrade Application |
|
|
831 | (24) |
|
Creating a Single Python File |
|
|
832 | (20) |
|
|
|
852 | (1) |
|
|
|
853 | (2) |
| Index |
|
855 | |