Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Azure Networking Cookbook, Second Edition - Second Edition
Azure Networking Cookbook, Second Edition - Second Edition

Azure Networking Cookbook, Second Edition: Practical recipes for secure network infrastructure, global application delivery, and accessible connectivity in Azure, Second Edition

By Mustafa Toroman
Mex$1,128.99
Book Dec 2020 298 pages 2nd Edition
eBook
Mex$902.99 Mex$631.99
Print
Mex$1,128.99
Subscription
Free Trial
eBook
Mex$902.99 Mex$631.99
Print
Mex$1,128.99
Subscription
Free Trial

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Dec 17, 2020
Length 298 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781800563759
Vendor :
Microsoft
Concepts :
Table of content icon View table of contents Preview book icon Preview Book

Azure Networking Cookbook, Second Edition - Second Edition

2. Virtual machine networking

In this chapter, we'll cover Azure Virtual Machines (VMs) and the network interface (NIC) that is used as an interconnection between Azure VMs and Azure Virtual Network.

We will cover the following recipes in this chapter:

  • Creating Azure VMs
  • Viewing VM network settings
  • Creating a new NIC
  • Attaching an NIC to a VM
  • Detaching an NIC from a VM

Technical requirements

For this chapter, the following is required:

  • An Azure subscription

Creating Azure VMs

Azure VMs depend on virtual networking, and during the creation process, we need to define the network settings.

Getting ready

Before we 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 VM using the Azure portal, we must use the following steps:

  1. In the Azure portal, select Create a resource and choose the Windows Server 2016 Datacenter VM (or search for any VM image by searching for image in the Search the Marketplace search bar).
  2. In the Create a virtual machine pane, we need to provide information for various options; not all of these are related to networking. First, we need to provide information on our Azure Subscription and Resource group (create a new resource group or provide an existing one).
  3. In Instance details, we need to provide information for the Virtual machine name, Region, Availability options, and Image fields (for the Image field, leave the default or change to a different image from the drop-down menu). Some example settings are shown in Figure 2.1:
    Adding instance details when creating a new virtual machine using the Azure portal

    Figure 2.1: Providing information for Instance details

  4. Next, we need to select whether we want to use Azure Spot instance (where the VM runs on unused datacenter capacity at a lower price but can be turned off if resources are needed elsewhere) and provide information on our VM's Size, Username, and Password. Note that for Username, you can't use names such as admin, administrator, sysadmin, or root. The password must be at least 12 characters long and satisfy three of the four common rules (that is, having uppercase letters, lowercase letters, special characters, and numbers). An example of the completed screen is shown in Figure 2.2:
    Clicking on the radio button to configure an Azure Spot instance

    Figure 2.2: Configuring Azure Spot instance

  5. Next, we arrive at an option that concerns networking. We need to define whether we are going to allow any type of connection over a public IP address. We can select whether we want to deny all access or allow a specific port. Optionally, we can use Hybrid Benefit to use an existing license to save on costs. In the following example, I'm choosing RDP (3389), but the dropdown also offers options for SSH (22), HTTP (80), and HTTPS (443):
    Choosing Select inbound port from the drop-down menu

    Figure 2.3: Defining inbound port rules

  6. In the next section, we need to define disks. We can choose between Premium SSD, Standard SSD, and Standard HDD. An OS disk is required and must be defined. We can attach additional data disks as needed. Disks can be added at a later time, as well. The default encryption option is to use platform-managed keys, but we can select customer-managed keys if needed. An example of disk settings with only the OS disk is shown in Figure 2.4:
    Selecting the OS disk type from the drop-down menu

    Figure 2.4: Setting up storage options

  7. After defining disks, we get to the networking settings. Here, we need to define the Virtual network and Subnet options that the VM will use. These two options are mandatory. You can choose to assign the Public IP address to the VM (you can choose to disable the Public IP address, create a new one, or assign an existing IP address). The last part of the network settings relates to NIC network security group, where we need to choose whether we are going to use no network security group, a basic one, or an advanced one. There is also another option where we will define whether we will allow public ports. We can also configure Accelerated networking or Load balancing as additional options. An example of these VM network settings is shown in Figure 2.5:
    Configuring the networking settings for a new virtual machine

    Figure 2.5: Defining the virtual network and subnet options

  8. After the networking section, we need to set up Management as shown in Figure 2.6:
    Setting up the Monitoring and Identity settings under the Management section

    Figure 2.6: Enabling management features

  9. In Advanced options, we can set up post-deployment configuration steps by adding software installations, configuration scripts, custom data, and more. The Advanced options screen is shown in Figure 2.7:
    Configuring Advanced options for post-deployment configuration and automation

    Figure 2.7: Setting up post-deployment configuration

  10. In the second part of Advanced options, we can select a Host group setting (this option provides a dedicated host that allows us to provision and manage a physical server in an Azure datacenter), a Proximity placement group (for grouping servers in the same region), and whether we want to use VMs from Gen 1 or Gen 2. The default options are shown in Figure 2.8:
    Selecting the host group, proximity placement group, and virtual machine generation under Advanced options

    Figure 2.8: Allotting a dedicated host to provision and manage a physical server

  11. The last setting that we can edit concerns tags. Tags apply additional metadata to Azure resources to logically organize them into a taxonomy. The Tags tab is shown in Figure 2.9:

    Applying additional metadata to categorize multiple resources and resource groups under the Tags section

    Figure 2.9: Applying tags to Azure resources

  12. After all the settings are defined, we get to the validation screen, where all our settings are checked for the last time. After validation is passed, we confirm the creation of a VM by clicking the Create button, as shown in Figure 2.10:

    Clicking the Create button to validate our settings and create the virtual machine

Figure 2.10: Creation of a VM

How it works...

When a VM is created, an NIC is created in the process. An NIC is used as a sort of interconnection between the VM and the virtual network. An NIC is assigned a private IP address by the network. As an NIC is associated with both the VM and the virtual network, the IP address is used by the VM. Using this IP address, the VM can communicate over a private network with other VMs (or other Azure resources) on the same network. Additionally, NICs and VMs can be assigned public IP addresses as well. A public address can be used to communicate with the VM over the internet, either to access services or to manage the VM.

Now that we have created an Azure VM and defined network settings; in the next section, we'll see how to review these network settings.

There's more...

If you are interested in finding out more about Azure VMs, you can read my book, Hands-On Cloud Administration in Azure, from Packt Publishing, where VMs are covered in more detail.

Viewing VM network settings

After an Azure VM is created, we can review the network settings in the VM pane.

Getting ready

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

How to do it...

In order to review the VM network settings, we must follow the steps given here:

  1. In the VM pane, locate the Networking settings. Here, you can see Network interface, Application security groups, and the Network security group associated with the VM. An example of this is shown in Figure 2.11:

    Reviewing the Networking settings in the Virtual machine pane

    Figure 2.11: Network settings of a VM

  2. If we select any of the associated network elements, we can discover more details. For example, if we select the Network Interface option associated with the VM, we can see other networking information such as Private IP address, Public IP address, Virtual network/subnet, Network security group, IP configurations, DNS servers, and more. The NIC view is shown in Figure 2.12:

    Selecting the Network Interface option to view other networking information

Figure 2.12: Viewing networking information from the NIC

How it works...

Networking information is displayed in several places, including in the VM's network settings. Additionally, each Azure resource has a separate pane and exists as an individual resource, so we can view these settings in multiple places. However, the most complete picture of VM network settings can be found in the VM pane and the NIC pane.

Creating a new NIC

An NIC is usually created during the VM creation process, but each VM can have multiple NICs. Based on this, we can create an NIC as an individual resource and attach it or detach it as needed.

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 NIC using the Azure portal, we must take the following steps:

  1. In the Azure portal, select Create a resource and choose Network interface under Networking services (or search for network interface in the search bar).
  2. In the creation pane, we need to provide information for the Name and Virtual network fields, as well as giving the subnet that the NIC will be associated with. Other information to be provided includes the IP address assignment type (Dynamic or Static), whether we want the NIC to be associated with a Network security group type, and whether we want to use IPv6. All Azure resources require information on the Subscription, Resource group, and Region, and NICs are no exception. The information needed to create a new NIC is shown in Figure 2.13:

    Creating a new NIC using the Azure portal

Figure 2.13: Creating an NIC using the Azure portal

How it works...

An NIC can't exist without a network association, and this association must be assigned to a virtual network and subnet. This is defined during the creation process and cannot be changed later. On the other hand, association with a VM can be changed and the NIC can be attached or detached from a VM at any time.

Attaching an NIC to a VM

Each VM can have multiple NICs. Because of this, we can add a new NIC at any time.

Getting ready

Before you start, open a web browser and go to the Azure portal at https://portal.azure.com. Here, locate the VM we created earlier in this chapter.

How to do it...

To attach an NIC to a VM, we must do the following:

  1. In the VM pane, make sure the VM is stopped (that is, deallocated).
  2. Locate the Networking settings in the VM pane.
  3. At the top of the Networking settings screen in the VM pane, select the Attach network interface option.
  4. A new option will appear, allowing you to create a new NIC or select an already-existing NIC that is not associated with the VM.
  5. Click OK and, in a few moments, the process will finish and the NIC will be associated with the VM. An example of this is shown in Figure 2.14:

    Clicking the Attach network interface button to associate an NIC with the virtual machine

Figure 2.14: Attaching an NIC

How it works...

Each VM can have multiple NICs. The number of NICs that can be associated with a VM depends on the type and size of the VM. To attach an NIC to a VM, the VM needs to be stopped (that is, deallocated); you can't add an additional NIC to a running VM.

Detaching an NIC from a VM

Just as with attaching an NIC, we can detach an NIC at any time and attach it to another VM.

Getting ready

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

How to do it...

To detach an NIC from a VM, we must do the following:

  1. In the VM pane, make sure the VM is stopped (that is, deallocated).
  2. Locate the Networking settings in the VM pane.
  3. At the top of the Networking settings screen in the VM pane, select the Detach network interface option.
  4. Select the NIC you want to detach from the VM.
  5. Click OK and, in a few moments, the process will finish and the NIC will be removed from the VM. An example of this is shown in Figure 2.15:

    Clicking the Detach network interface button to disassociate an NIC from our virtual machine

Figure 2.15: Detaching an NIC

How it works...

To detach an NIC, the VM associated with the NIC must be stopped (that is, deallocated). At least one NIC must be associated with the VM—so you can't remove the last NIC from a VM. All network associations stay with the NIC—they are assigned to the NIC, not to the VM.

Left arrow icon Right arrow icon

Key benefits

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.

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

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Black & white paperback book shipped to your address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Dec 17, 2020
Length 298 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781800563759
Vendor :
Microsoft
Concepts :

Table of Contents

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

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela