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

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Run native .NET application in Docker (.NET Framework 4.6.2)

Scope
The main scope of this post is to see how we can run a legacy application written in .NET Framework in Docker.

Context
First of all, let’s define what is a legacy application in our context. By a legacy application we understand an application that runs .NET Framework 3.5 or higher in a production environment where we don’t have any more the people or documentation that would help us to understand what is happening behind the scene.
In this scenarios, you might want to migrate the current solution from a standard environment to Docker. There are many advantages for such a migration, like:

Continuous DeploymentTestingIsolationSecurity at container levelVersioning ControlEnvironment Standardization
Until now, we didn’t had the possibility to run a .NET application in Docker. With .NET Core, there was support for .NET Core in Docker, but migration from a full .NET framework to .NET Core can be costly and even impossible. Not only because of lack of features, but also because once you…