Skip to main content

Virtual Networks (Day 9 of 31)

List of all posts from this series: http://vunvulearadu.blogspot.ro/2014/11/azure-blog-post-marathon-is-ready-to.html

Short Description 
A Virtual Network is a ‘private’ network that you can define over Azure infrastructure. In each Virtual Network users has the ability to add Azure services and VM that he wants and need.
Only VMs and Azure services from the same Virtual Network can see each other’s. By default, external resources cannot access resources from Virtual Network. Of course users have the ability to configure a Virtual Network to be accessed from outside world (if needed).
We can imagine a Virtual Network as a private network that we create home or at work. We can add to it any resources, allocate specific IPs and subnet masks, open different ports for external access and so on. Is a network inside a network if we could say this. Many time I refer to it as a Private Network, because you can add resources to it and limit access of external resources to them (it).

Main Features 
Isolate resources to public access
Using Virtual Networks you can create your own private cornet in Azure, where only you have access to it. All your resources are isolated from the rest of Azure
3 type of models
In general, there are 3 types of configuration used with Virtual Networks:

  • Cloud-Only – A Virtual Network with resources only from Azure. Used to manage, secure and isolated cloud resources.
  • Cross-Premises Virtual Network– For hybrid solutions, where Virtual Network is used to create a space in Azure that can be accessed and is integrated with an on-premises network. Both networks form a single networks, that allow cross access.
  • No-Virtual Network – No Virtual Network used for cloud resources. 

Cross-Premises Connection
In use cases when you need to connect your on-premises solution to Azure resources, than Virtual Network is a have to and you need to think about it from the first moment.
Resource Name Resolution
Once you integrate your network with a Virtual Network you can access your resources directly by their DNS name (for example Virtual Machine name).
Automatically integration scripts
When you create a Virtual Network, Azure can generate your custom scripts that needs to be run by IT on your on-premises network. Using this scripts the two networks can become one network without additional configuration.
Custom IP range and Subnet Mask
When creating a Virtual Network you have the ability to set a custom IP range and subnet mask. You can create your own configuration based on your own needs and network requirements.
Persistent Private IP Address 
In the Virtual Network resources will have a static IP that don’t change in time. For example a VM will have the same IP and will not change. On top of this you can assign a specific IP to your resources by hand from your Virtual Network IP range. In this way when a resource is deallocated or stopped.
Azure Resources Supported
In this moment only Virtual Machines and PaaS resources can be added to a Virtual Network. Resources like Service Bus cannot be added to a Virtual Network (yet).
Tools that can be used
For setup and configuration we have two tools that can be used:

  • Netcfg – a file that is generated by Azure platform and can be used to make different configuration
  • Management Portal

Subnet Masks Limitation
You can define how many subnets, as long as they don’t overlap. The same rules are applicable for any network (from on-premises or cloud).
IP Type and Ranges
Virtual Network allow us to use any kind of IP, from public IP Address to any kind of IP ranges.
Type of Network
Virtual Network is a Layer 3 network that is responsible for package forwarding and routing.
Supported Protocols 
There are 3 types of protocols that are supported in this moment:

  • TCP
  • UDP
  • ICMP


VPNs
VPN connection are supported (RRAS – Remote Access servers and Windows Server 2012 Routing).
Linux Support
All Linux distribution that are supported on Azure can be used in a Virtual Network.


Limitations 
Cannot move resources to a Virtual Network once were created
Once a resource like a Virtual Machine was created and deployed you cannot move it to a Virtual Network. This is happening because network information are acquire during deployment. Of course you can redeploy your machine, but a short downtime will appear.
VPN is limited only to Windows OS
You can use VPN only for Windows OS (W7,W8, Windows Server 2008 R2 64b, Windows Server 2012)
Cannot be used with all Azure Services
In this moment only Virtual Machines and PaaS resources can be added to a Virtual Network. Other type of services cannot be added to a Virtual Network.
Cross Region
A virtual region can be defined only in one region. If you want to create a cross region network you need to create multiple Virtual Networks and connect them.
Network Size
The smallest subnet network that is supported is /29 and the largest is a /8.
VLANs cannot be added
Because Virtual Network is a Layer 3 network, there is no support for VLANs (that operate at Layer 2).
Tracert
This network diagnostic tools cannot be used in a Virtual Network.
IPv6
In this moment there is no support of IPv6.
Broadcast
In this moment there is no support for packages broadcast.
Multicast
In this moment there is no support for multicast.
IP-in-IP encapsulated packets 
In this moment this is not supported.
Generic Routing Encapsulation (GRE)
In this moment this is not supported.
SQL DB
In this moment SQL DBs cannot be used in combination with Virtual Networks.

Applicable Use Cases 
Below you can find 4 use cases when I would use Virtual Network:
Isolate an application that contains multiple resources (like VM)
In this case you would like all your resources to be part from the same network and to be isolated from external world.
Scale your on-premises resources
When you need more computing power resources (VMs) and you want to scale your on-premises resources in a secure and simple way, Virtual Network can create the secure environments to do something like this.
Hybrid Solutions
When your solution is hosted on-premises and also on cloud, Virtual Network can be used with success to unify the system and resources.
Connect to Azure VM in a secure way
If you want to access VM in a secure and reliable way from your own networks that Virtual Network is a have to.

Code Sample 
-

Pros and Cons 
Pros

  • Easy to configure
  • Isolate resources from internet
  • Secure

Cons

  • Only VM and PaaS resources can be used
  • IPv6 is not yet supported


Pricing
When you calculate how much Virtual Networks would cost, you should take into consideration the fallowing components:

  • Outbound data transfer (Inter V-NET)
  • VPN Gateway time duration


Conclusion
Virtual Network can be used with success when you need to extend your on-premises network, giving us the possibility to create hybrid scenarios very easily without any kind of effort. We can secure extend our data centers and create secure and isolated corners on cloud where we can manage our own resources.

Comments

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

Azure AD and AWS Cognito side-by-side

In the last few weeks, I was involved in multiple opportunities on Microsoft Azure and Amazon, where we had to analyse AWS Cognito, Azure AD and other solutions that are available on the market. I decided to consolidate in one post all features and differences that I identified for both of them that we should need to take into account. Take into account that Azure AD is an identity and access management services well integrated with Microsoft stack. In comparison, AWS Cognito is just a user sign-up, sign-in and access control and nothing more. The focus is not on the main features, is more on small things that can make a difference when you want to decide where we want to store and manage our users.  This information might be useful in the future when we need to decide where we want to keep and manage our users.  Feature Azure AD (B2C, B2C) AWS Cognito Access token lifetime Default 1h – the value is configurable 1h – cannot be modified

What to do when you hit the throughput limits of Azure Storage (Blobs)

In this post we will talk about how we can detect when we hit a throughput limit of Azure Storage and what we can do in that moment. Context If we take a look on Scalability Targets of Azure Storage ( https://azure.microsoft.com/en-us/documentation/articles/storage-scalability-targets/ ) we will observe that the limits are prety high. But, based on our business logic we can end up at this limits. If you create a system that is hitted by a high number of device, you can hit easily the total number of requests rate that can be done on a Storage Account. This limits on Azure is 20.000 IOPS (entities or messages per second) where (and this is very important) the size of the request is 1KB. Normally, if you make a load tests where 20.000 clients will hit different blobs storages from the same Azure Storage Account, this limits can be reached. How we can detect this problem? From client, we can detect that this limits was reached based on the HTTP error code that is returned by HTTP