IP Pool – Tech-Coffee //www.tech-coffee.net Mon, 25 Aug 2014 19:45:22 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.9 65682309 IP Pool in Virtual Machine Manager 2012R2 //www.tech-coffee.net/ip-pool-virtual-machine-manager-2012r2/ //www.tech-coffee.net/ip-pool-virtual-machine-manager-2012r2/#comments Fri, 23 May 2014 19:34:42 +0000 //www.tech-coffee.net/?p=1527 For the first time, I used in a real project IP Pool in Virtual Machine Manager 2012R2. Before that, I used as everyone a DHCP server or I set manually the IP addresses in network configuration. But this time I used IP Pools intensively to avoid these constraints. So in this topic I want to ...

The post IP Pool in Virtual Machine Manager 2012R2 appeared first on Tech-Coffee.

]]>
For the first time, I used in a real project IP Pool in Virtual Machine Manager 2012R2. Before that, I used as everyone a DHCP server or I set manually the IP addresses in network configuration. But this time I used IP Pools intensively to avoid these constraints. So in this topic I want to share you my happiness about IP Pool and how it is working.

But before it is important to understand what an IP Pool is. An IP Pool is like a DHCP server. There is an IP address range, and you can configure basic options as the gateway, the suffixes DNS and DNS itself or Wins server (who use that today ? J). An IP Pool is associated to a VM Subnet that belong to a VM network. For each VM Subnet it is possible to create one or more IP Pool while the IP addresses in the range belong to the VM subnet. For further information about the network components in Virtual Machine Manager you can view this topic. So IP Pool can only be used by Virtual Machines (VM) or virtual network card (vNIC) of hosts.

As you should know, on an IPv4 or an IPv6 network configuration you have two modes: dynamic or static configuration. When you use dynamic configuration, you must use a DHCP server that delivers network configuration (IP address, netmask, gateway and so on) instead of static configuration where you have to set manually (or by script). There are some disadvantages about using dynamic configuration. The first is that some applications don’t support dynamic IP (as Domain Controller, DHCP server itself and so on)So even if you use DHCP server, you have to set your IP configuration manually in some cases. The second disadvantage is that your IP can change (if you not manage reservation) and it is not good for a server. So most of the time on production network the IP configuration is set to static and managed manually.


And it is at this moment of the story that IP Pool is born. The difference with DHCP server is that when IP Pool delivers the IP configuration to a Guest OS, the network settings are static. This is why when you create a virtual machine in VMM you can specify if you want a dynamic IP or a static IP from IP Pool on network configuration as below.

There is no lease in the IP Pool instead of DHCP. When an IP is picked up in IP Pool, this last is allocated to a VM or a vNIC. So the network configuration on guest OS (or the vNIC) is the same until you change it manually. Unfortunately IP Pool can be selected at the VM creation only if you use a VM template. If you don’t use VM templates you have to set manually the IP configuration inside the Guest OS.

I will show you with some screenshot about how to create an IP Pool and the behavior of network configuration with IP Pool. To present that I will create an IP Pool with these settings:

  • IP range: 192.168.1.150 – 192.168.1.160
  • Netmask: 255.255.255.0
  • Gateway: 192.168.1.254
  • DNS: 192.168.1.100
  • DNS Suffix: fabrikam.com
  • WINS: No Way J

Two Virtual Machines will be created to show you the behavior of the Guest OS and the VMM network configuration:

  • One VM called VMDYM01 will be created with dynamic option;
  • One VM called VMIPP01 will be created from a VM template with IP Pool configuration.

Create and configure an IP Pool

First of all, I create an IP Pool called VM_Pool on my VM subnet 192.168.1.0/24 with above settings:

 

Now that my IP Pool is created, I can use it for my VMs.

From dynamic configuration to IP Pool (VMDYM01)

So my VMDYM01 has been created without VM template and so with dynamic IP configuration. As you can see below, the IP address of this VM doesn’t belong to my IP Pool.

Now I set manually the IP configuration inside the guest OS. I use an IP address belonging to the IP Pool:

After refreshing the VM in Virtual Machine Manager, I come back to connection details of the related virtual network interface:

Now it says that the IP address come from IP Pool “VM_Pool”. You can view which IP address from IP Pool is associated with VM (or vNIC) with the below PowerShell commands:

$IPPool = Get-SCStaticIPAddressPool –name "VM_Pool"
Get-SCIPAddress –StaticIPAddressPool $IPPool

Now what happens if I change the network configuration on the Guest OS?

So I refresh the VM and I check the connection details in VMM:

Now I re-run the PowerShell commands to view the behavior in IP Pool:

$IPPool = Get-SCStaticIPAddressPool –name "VM_Pool"
Get-SCIPAddress –StaticIPAddressPool $IPPool

So VMM has unallocated and released the unused IP address and has allocated the new one. Pretty impressive. I think to open a Facebook fan page about IP Pools.

About VM created from a template (VMIPP01)

For massive deployment, IP Pool can be used in VM template. In this way when the VM is created and ready, the IP configuration is already configured to static with IP Pool settings. So I have a VM template and as you can see below, I have set the virtual network card to static IP (from an IP Pool):

I deploy a VM from this template. When it is the Review the virtual machine settings screen you can specify an IP address belonging to the IP Pool or let it blank: in this case an IP available will be automatically allocated. I choose to let VMM manage this:

So when the VM is created, I go to verify the connection details:

Ok so IP Pool is used, this is a good start. Next I switch on the VM to verify the IP configuration on Guest OS:

The network configuration is set automatically at the VM creation. Pretty good no ?

I verify also the IP allocation in IP Pool:

$IPPool = Get-SCStaticIPAddressPool –name "VM_Pool"
Get-SCIPAddress –StaticIPAddressPool $IPPool

So all it’s good J.

IP Address Management (IPAM)

As you have seen previously I use PowerShell commands to obtain information about IP address delivered by IP Pool. When you have thousands of IP addresses it can be difficult to find information except for PowerShell guys. With IP Address Management you can manage graphically the IP Pool component. This feature is available since Windows Server 2012 R2. So I have installed an IPAM server and I have configured the IPAM connector from Virtual Machine Manager. I obtain this information:

For guys who don’t like the PowerShell command line, it can be an alternative to manage network component of VMM.

The post IP Pool in Virtual Machine Manager 2012R2 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/ip-pool-virtual-machine-manager-2012r2/feed/ 6 1527