Azure Networking Cookbook
eBook - ePub

Azure Networking Cookbook

Practical recipes for secure network infrastructure, global application delivery, and accessible connectivity in Azure, 2nd Edition

  1. 298 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Azure Networking Cookbook

Practical recipes for secure network infrastructure, global application delivery, and accessible connectivity in Azure, 2nd Edition

About this book

Find out how you can leverage virtual machines and load balancers to facilitate secure and efficient networking

Key Features

  • Discover the latest networking features and additions in Microsoft Azure with this updated guide
  • Upgrade your cloud networking skills by learning how to plan, implement, configure, and secure your infrastructure network
  • Provide a fault-tolerant environment for your apps using Azure networking services

Book Description

Azure's networking services enable organizations to manage their networks effectively. With the Azure Networking Cookbook, you'll see how Azure paves the way for an enterprise to achieve reliable performance and secure connectivity.

This updated second edition will take you through the latest networking features in Azure. The book starts with an introduction to Azure networking, covering basics such as creating Azure virtual networks, designing address spaces, and creating subnets. You'll create and manage network security groups, application security groups, and IP addresses in Azure using easy-to-follow recipes. As you progress through the book, you'll explore various aspects such as DNS and routing, load balancers, Traffic Manager, and site-to-site, point-to-site, and VNet-to-VNet connections. This cookbook covers all the functions crucial to understanding cloud networking practices and being able to plan, implement, and secure your network infrastructure with Azure. You'll not only upscale your current environment but also get well-versed with monitoring, diagnosing, and ensuring secure connectivity. The book will help you grasp best practices as you learn how to create a robust environment.

By the end of this Azure cookbook, you'll have gained hands-on experience developing cost-effective solutions that can facilitate efficient connectivity in your organization.

What you will learn

  • Get to grips with building Azure networking services
  • Understand how to create and work on hybrid connections
  • Configure and manage Azure networking services
  • Explore ways to design high availability network solutions in Azure
  • Discover how to monitor and troubleshoot Azure network resources
  • Work with different methods to connect local networks to Azure virtual networks

Who this book is for

This cookbook is for cloud architects, cloud solution providers, and anyone who deals with networking on Azure. A basic understanding of Azure will help you to make the most of this book.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Azure Networking Cookbook by Mustafa Toroman in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Networking. We have over one million books available in our catalogue for you to explore.

Information

1. Azure Virtual Network

In this very first chapter, we will learn about the basics of Azure networking, including creating Azure virtual networks and designing address spaces and subnets. This will lay the foundation for all future recipes that will be covered in this chapter.
We will cover the following recipes in this chapter:
  • Creating a virtual network in the Azure portal
  • Creating a virtual network with PowerShell
  • Adding a subnet in the Azure portal
  • Adding a subnet with PowerShell
  • Changing the address space size
  • Changing the subnet size

Technical requirements

For this chapter, the following is required:
  • An Azure subscription
  • Azure PowerShell
The code samples can be found at https://github.com/PacktPublishing/Azure-Networking-Cookbook-Second-Edition/tree/master/Chapter01.

Creating a virtual network in the Azure portal

Azure Virtual Network represents your local network in the cloud. It enables other Azure resources to communicate over a secure private network without exposing endpoints over the internet.

Getting ready

Before you start, open a web browser and go to the Azure portal at https://portal.azure.com.

How to do it…

In order to create a new virtual network using the Azure portal, take the following steps:
  1. In the Azure portal, select Create a resource and choose Virtual network under Networking (or search for virtual network in the search bar). A new pane will open, where we need to provide information for the virtual network. First, select the Subscription option we want to use and the Resource group option for where the virtual network will be deployed. Then, include a name and select a region (of the Azure datacenter) for where the virtual network will be deployed. An example is shown in Figure 1.1:
    Creating a virtual network in the Basics pane
    Figure 1.1: Creating an Azure virtual network
  2. In the next pane, we first need to define the address space and define the Subnet name and Subnet address range values for the first subnet. After the address space is defined, as shown in Figure 1.2, we will receive a message stating that This virtual network doesn't have any subnets. Therefore, we need to select the Add subnet option:
    Configuring a virtual network address space and subnet
    Figure 1.2: Configuring a virtual network address space and subnet
  3. In the Add subnet pane, we need to define Subnet name and Subnet address range. Optionally, we can add service endpoints we want to connect to the virtual network. Service endpoints allow us to connect to Azure services in a secure way, over Azure backbone infrastructure, without needing a public IP address. An example is shown in Figure 1.3:
    Adding a subnet by providing various information in the Add subnet pane
    Figure 1.3: Adding a subnet
  4. After we have added the first subnet, in our case, FrontEnd, we can add more subnets to the virtual network or proceed to the Security section, as shown in Figure 1.4:
    Adding the FrontEnd subnet in the IP Addresses pane
    Figure 1.4: Adding the FrontEnd subnet
  5. In the Security section, we can choose whether we want to enable Bastion Host, DDoS protection, and Firewall. If any of these options are enabled, we need to provide additional information for that service. Afterward, we can optionally add tags, or skip that and create the service. An example is shown in Figure 1.5:
    Toggling security options in the Security pane
    Figure 1.5: Toggling security options
  6. Creating a virtual network usually does not take much time and should be completed in under two minutes. Once the deployment is finished, we can start using the virtual network.

How it works…

We deploy virtual networks to Resource group under Subscription in the Azure datacenter that we choose. Region and Subscription are important parameters; we will only be able to attach Azure resources to this virtual network if they are in the same subscription and region as the Azure datacenter. The address space option defines the number of IP addresses that will be available for our network. It uses the Classless Inter-Domain Routing (CIDR) format and the largest range we can choose is /8. In the portal, we need to create an initial subnet and define the subnet address range. The smallest subnet allowed is /29 and the largest is /8 (however, this cannot be larger than the virtual network range). For reference, the range 10.0.0.0/8 (in CIDR format) will create an address range of 167772115 IP addresses (from 10.0.0.0 to 10.255.255.255) and 10.0.0.0/29 will create a range of 8 IP addresses (from 10.0.0.0 to 10.0.0.7).

Creating a virtual network with PowerShell

PowerShell is a command-line shell and scripting language based on .NET Framework. It's often used by system administrators to automate tasks and manage operating systems. Azure PowerShell Az is a PowerShell module that allows us to automate and manage Azure resources. Az is also very often used to automate deployment tasks and can also be used to deploy a new Azure virtual network.

Getting ready

Before we start, we need to make sure that we have the latest Az modules installed. To install Az modules, we need to run this command in the PowerShell console:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
For more information, you can visit https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-4.5.0.
Before we start, we need to connect to the Azure subscription from a PowerShell console. Here's the command to do this:
Connect-AzAccountAzAccount
This will open a pop-up window where we need to input the credentials for the Azure subscription.
Afterward, we need to create a resource group where our virtual network will be deployed:
New-AzResourceGroup -name 'Packt-Networking-Script' -Location 'westeurope'
The output should be similar to that shown in Figure 1.6:
Output displaying the connection to an Azure subscription from PowerShell
Figure 1.6: Connecting to an Azure subscription from PowerShell

How to do it…

D...

Table of contents

  1. Azure Networking Cookbook, Second Edition
  2. Preface
  3. 1. Azure Virtual Network
  4. 2. Virtual machine networking
  5. 3. Network Security Groups
  6. 4. Managing IP addresses
  7. 5. Local and virtual network gateways
  8. 6. DNS and routing
  9. 7. Azure Firewall
  10. 8. Creating hybrid connections
  11. 9. Connecting to resources securely
  12. 10. Load balancers
  13. 11. Traffic Manager
  14. 12. Azure Application Gateway and Azure WAF
  15. 13. Azure Front Door and Azure CDN
  16. Index