
Network Automation with Go
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Other editions
Additional editions

Persons
Nicolas is a Specialist Solutions Architect at Red Hat. In his role, he helps customers of all sizes to automate the provisioning and operation of IT infrastructure, services, and applications. Prior to that, he worked in the networking industry for 15 years, becoming a Cisco Certified Design Expert (CCDE) and Internetwork Expert (CCIE). He is passionate about writing open-source software in Go with a keen interest in cloud technologies.Kashin Michael :
Michael is a Cloud Infrastructure Solutions Architect, currently working in the networking business unit of NVIDIA. Throughout his career, he held multiple roles ranging from network operations, through software development to systems architecture and design. He enjoys breaking the boundaries between different disciplines to come up with creative solutions and help customers solve their problems in the most optimal way. He is a prolific open-source contributor and writer with much of his work focused on cloud-native infrastructure, automation, and orchestration.
Content
Introduction
Go Basics
Getting Started with Go
Networking (TCP/IP) with Go
Network Automation
Configuration Management
Automation Frameworks
Network APIs
OpenConfig
Network Monitoring
Expert Insights
Appendix: Building a Testing Environment
Preface
This book explores network automation, a discipline that aims to generate consistent and repeatable processes to increase efficiency and reliability in network operations. As you progress through the chapters, you'll learn the Go language basics and put it into practice by coding common day-to-day network processes to jumpstart your network automation journey.
Who this book is for
This book is designed for all network engineers, administrators, and other network practitioners looking to understand what network automation is and how the Go programming language can help us develop network automation solutions. Since the first part of the book offers a comprehensive overview of Go's main features, this book is suitable for beginners with a solid grasp of programming basics.
What this book covers
Chapter 1, Introduction, explores networking and Go, the benefits of Go, and how it contrasts with Python.
Chapter 2, Go Basics, defines Go and talks about its guiding principles. It presents the Go source code file structure and shows how to compile Go programs.
Chapter 3, Getting Started with Go, covers different characteristics of Go that are relevant for network automation such as control flow, input and output operations, decoding and encoding, and concurrency.
Chapter 4, Networking (TCP/IP) with Go, focuses on practical use cases with Go for each layer of the TCP/IP model.
Chapter 5, Network Automation, discusses what network automation is, its impact on network operations, and its benefits for the business. It also talks about scaling individual use cases into a network automation system.
Chapter 6, Configuration Management, walks us through practical examples using Go to interact with network devices from different networking vendors via SSH and HTTP to configure and collect their operational state to verify any changes.
Chapter 7, Automation Frameworks, describes how some automation frameworks can integrate with Go with an emphasis on Ansible and Terraform.
Chapter 8, Network APIs, takes a look at machine-to-machine interfaces to manage network devices that enable network automation. From RESTCONF and OpenAPI to gRPC.
Chapter 9, OpenConfig, examines how to perform common operational tasks with OpenConfig gRPC services, such as provisioning a device, subscribing to a telemetry stream, and executing an action such as traceroute.
Chapter 10, Network Monitoring, dives into the world of network monitoring from different angles with Go; capturing network packets, processing data plane telemetry, running active probes to measure network performance, and visualizing metrics.
Chapter 11, Expert Insights, consists of people who have real-world hands-on experience with network automation and/or are using Go for network-related tasks and activities sharing their perspectives with us.
Chapter 12, Appendix: Building a Testing Environment, documents the process of building a testing environment that includes the compatible version of Containerlab and other related dependencies, to make sure you get a seamless experience running examples from any chapter of this book.
To get the most out of this book
This book assumes a basic understanding of networking and programming fundamentals. You need to be familiar with the Linux OS to be able to install software packages and run and interpret the results of provided commands. Most hands-on exercises are executed within a container environment, so a basic understanding of containers will help you explore and modify example programs.
Examples included in this book can be reproduced in most Linux environments. All software requirements and dependencies are covered in detail in the Appendix.
Software/hardware covered in the book
Operating system requirements
Go 1.18.1
Linux (Ubuntu 22.04, Fedora 35), Windows Subsystem for Linux (WSL2) or macOS
Containerlab 0.28.1
Linux (Ubuntu 22.04, Fedora 35), Windows Subsystem for Linux (WSL2) or macOS
Docker 20.10.14
Linux (Ubuntu 22.04, Fedora 35), Windows Subsystem for Linux (WSL2) or macOS
Download the example code files
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Network-Automation-with-Go. If there's an update to the code, it will be updated in the GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/hOgov.
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You can test this code from ch03/type-definition/main.go."
A block of code is set as follows:
func main() { a := -1 var b uint32 b = 4294967295 var c float32 = 42.1 }When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
func main() { a := 4294967295 b := uint32(a) c := float32(b) }Tips or important notes
Appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Share Your Thoughts
Once you've read Network Automation with Go, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.
Download a free PDF copy of this book
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere?
Is your eBook purchase not compatible with the device of your choice?
Don't worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don't stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
- Scan the QR code or visit the link below
https://packt.link/free-ebook/978-1-80056-092-5
- Submit your proof of purchase
- That's it! We'll send your free PDF and other benefits to your email...
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.