Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Networking with Azure

You're reading from   Hands-On Networking with Azure Build large-scale, real-world apps using Azure networking solutions

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher
ISBN-13 9781788998222
Length 276 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mohamed Waly Mohamed Waly
Author Profile Icon Mohamed Waly
Mohamed Waly
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Azure Virtual Networks 101 FREE CHAPTER 2. Delving into Azure Virtual Networks 3. Azure Network for VMs 4. Network Connectivity Scenarios in Azure 5. Azure DNS 6. Azure Load Balancers 7. Azure Traffic Manager 8. Azure Application Gateway 9. Other Books You May Enjoy

Azure VNet

As you have a network in your on-premises (private data center) to facilitate the communication between your machines/devices and even to secure and isolate machines/devices from each other, you will need to do the same tasks in the cloud. That is why Microsoft offers Azure VNet.

Azure VNet is one of the most commonly used Microsoft Azure Networking services. Azure VNet is sort of like a LAN within which you can have address spaces that can be divided into multiple subnets. Considering that, only private IPs ranges can be used for the address spaces and their subnets.

The subnets within each address space are automatically routed. The address range of a subnet that is in use cannot be edited.

Azure VNet benefits

Azure VNet has many benefits and capabilities. The following benefits are some of them:

  • Isolation: Each virtual network is isolated from other virtual networks. Therefore, you can have your dev/test environment in a virtual network separated from the production environment that exits in other virtual networks.
  • Communicating with other VNets: By default, virtual networks are isolated from each other. However, you can reach out resources in another virtual network, because virtual networks can be connected to each other.
  • Broad network access: By default, all Azure services have access to the internet, which means you can access Azure services from wherever you want, using whatever you want, as long you have an internet connection.
  • Hybrid connectivity: Azure VNet can be spanned to your data center. As a result, you will be able to connect to both your Azure resources and on-premises resources privately without the need to connect via the internet.
  • Security: You can secure your virtual networks by setting rules that determine which inbound and outbound traffic can be flowed to and outside the virtual network.

Creating Azure VNet

Creating an Azure VNet is a pretty straightforward process. To do this task, follow these steps:

  1. Open the ARM portal and log in using the account associated with your Azure subscription.
  1. Once logged in, navigate to More services, and search for virtual network, as shown in the following screenshot:
Figure 1.4: Searching for virtual networks blade
  1. You will be navigated to a new blade, wherein you can display the virtual networks you have created, and you can also create new virtual networks, as shown in the following screenshot:
Figure 1.5: Virtual networks blade
  1. Click on Add, and a new blade will be opened for which you have to fill the following fields:
    • Name: The name of the virtual network.
    • Address space: The virtual network's address range in CIDR notion.
    • Subscription: If you have multiple subscriptions associated to the account you have logged in with, you have to specify which subscription will be charged for this service.
    • Resource group: Specify whether you want to create a new resource group for the resource you are creating, or use an existing one.
    • Location: The region on which this virtual network will operate.
    • Subnet-name: The name of the first subnet in the virtual network you are creating.
    • Subnet | Address range: The subnet's address range in CIDR notion. It must be contained by the address space of the virtual network.
    • Service endpoints (Preview): It can be used in securing your traffic between some Azure services in Microsoft's backbone network. More information about it will be covered in Chapter 2Delving into Azure Virtual Networks:
Figure 1.6: Creating a virtual network
  1. Click on Create, and within a moment the virtual network will be created.

Adding address spaces to the virtual network

You can add other address spaces to the virtual network, and later those address spaces can be divided into subnets. To add another address space, follow these steps:

  1. Navigate to the Virtual networks blade, and you will find that the virtual network you have created is already there, as shown in the following screenshot:
Figure 1.7: Displaying the created virtual networks
  1. Click on the virtual network, and a new blade will pop up, as shown in the following screenshot:
Figure 1.8: PP-Virtual Network overview
  1. Then, you will navigate to Address space, wherein you will find all the address spaces of this virtual network, as shown in the following screenshot:
Figure 1.9: Address spaces of the virtual network
  1. To add a new address space, you only need to hover over Add additional address range, and add the address space you would need, then click on Save, as shown in the following screenshot:
Figure 1.10: Adding new address space
  1. Once you save the changes, the address space will be a part of the virtual network.

Adding subnets to the virtual network

There are two types of subnets in Azure VNet:

  • Subnet: The normal form of subnets, which is the result of dividing the virtual network
  • Gateway subnet: The subnet that acts as a gateway for communication with other networks

By default, you must specify at least one subnet while creating the virtual network, as discussed earlier. However, later you might need to have other subnets, and to do so, you have to follow these steps:

  1. Navigate to the virtual network that you have created earlier and then go to SETTINGS | Subnets, as shown in the following screenshot:
Figure 1.11: Virtual Network Subnets
  1. Click on Subnets, and a new blade will be opened, where you need to specify the following:
    • Name: The name of the subnet.
    • Address range (CIDR block): The subnet's address range in CIDR notation (considering that it must be contained by the address space of the virtual network).
    • Network security group: This works like a firewall to filter what traffic that be allowed to flow in/out of the network. More information about this topic will be covered in Chapter 2, Delving into Azure Virtual Networks.
    • Route table: You can expand the communication between multiple VNets by setting a route table. More information about this topic will be covered in Chapter 4, Network Connectivity Scenarios in Azure.
    • Service endpoints (Preview): As mentioned earlier, this can be used to let some Azure services communicate in Microsoft's backbone network. More information about it will be covered in Chapter 2, Delving into Azure Virtual Networks.
Figure 1.12: Adding subnets
  1. Once you click on OK, the subnet will be added within a moment.

When specifying the subnet's address range, you must have noted that there are five reserved IPs. The first and the last IPs are reserved for protocol conformance known as network and broadcast in addition to three more IPs used for Azure services.

Creating the gateway subnet is no different than the normal subnet creation, except you cannot set the name of the gateway subnet, as shown in the following screenshot:

Figure 1.13: Adding gateway subnet

Every virtual network can only have one gateway subnet.

Azure VNet key points

While building your virtual network, you might need to consider the following points:

  • You cannot add the following address spaces to your virtual network:
    • 224.0.0.0/4 (multicast)
    • 255.255.255.255/32 (broadcast)
    • 127.0.0.0/8 (loopback)
    • 169.254.0.0/16 (link-local)
    • 168.63.129.16/32 (internal DNS)
  • You cannot connect virtual networks that have overlapped address spaces
  • As a default limit, you can create 50 virtual networks per region per subscription, but it can be increased up to 1,000 virtual networks if you contact support
  • As a default limit, you can create 1,000 subnets per virtual network, but it can be increased up to 10,000 subnets, if you contact support
  • As a default limit, you can have 4,096 private IPs per virtual network, but it can be increased up to 8,192 if you contact support
You have been reading a chapter from
Hands-On Networking with Azure
Published in: Mar 2018
Publisher:
ISBN-13: 9781788998222
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime