Microsoft Hyper-v Address Range

  1. Traditionally, this isolation was enforced using VLANs with a segregated IP address range and 802.1q Tag or VLAN ID. But with HNV, isolation is enforced using either NVGRE or VXLAN encapsulation to create overlay networks with the possibility of overlapping IP subnets between customers or tenants.
  2. 'The Hyper-V Default Switch will randomly use one these IP address ranges based on the host system IP address: - Start IP: 192.168.0.0 – End IP: 192.168.255.255 Start IP: 172.17.0.0 – End IP: 172.31.255.255.

Let's look at how to add an IPv4 address range as a possible live migration network on the local Hyper-V host by using a subnet mask: 1. Open a PowerShell prompt and type the command shown in the following screenshot.

Hyper-v

In this post I’m going to talk about the MAC Address Pools in Hyper-V / VMM and the actual way they work.
It seems easy to setup and never look at it again but this can cause some serious issues.
There are many threads on technet forums about virtual machines changing MAC addresses and especially Linux virtual machines losing network connection.

Microsoft Hyper V Mac Address Range

Lets start at the beginning.
In the Hyper-V Manager you can set a specific range what addresses are allocated to the VM’s.
You can see/edit the range under the “Virtual Switch Manager”.

So every new VM gets a MAC address in this range specified on the Hyper-V host.
You can view the MAC of a VM under “Settings > Network Adapter > Advanced Features”

As you can see the allocated MAC is within the specified MAC range.
You could set your own MAC here, using the static MAC option.

But what happens when you have more than 1 host??

Hyper-V has an algorithm to deal with duplicate MAC addresses on a single host, but not across multiple hosts.
So, if you not take care it is possible to accidentally deploy hosts with duplicate MAC address pools.
Make sure you do not use the same range on different Hyper-V hosts!!

NOTE:
Once the MAC address pool is created when the Hyper-V role is installed, imaging the host will cause each Hyper-V server deployed using the image to have the same MAC address pool. Even if you sysprep the host before you image it, the registry values are not reset.

MAC Address Regeneration

When Live Migrating VM’s to a different host there’s no problem and the VM will keep the same MAC.
If there’s a different MAC range allocated on the new host the MAC changes when:
– VM is turned on from off state
– VM is restored from save state (Quick migration!)
– Antoher VM uses the same MAC.

Range

If you’ve set a static MAC, the MAC moves between hosts.

Linux

Microsoft Hyper-v Address RangeRange

Unlike Windows, Linux VM’s (Redhat, Centos, Ubuntu etc.) have the MAC address hardcoded in configuration files.
When the above situation occurs the VM will get a new MAC and loses network connectivity.
You will need to edit the network cfg’s and enter the new MAC to get the VM online.
Make sure you use static MAC addresses in this situation!

VMM – Virtual Machine Manager

In VMM a default MAC Address Pool is created with range 00-1D-D8-B7-1C-00 to 00-1D-D8-F4-1F-FF (3998720 addresses).

VM’s deployed with VMM can make use of this default pool when the NIC settings are set right.

Dynamic = Get your MAC from the Hyper-V host
Static = Get your MAC from the VMM MAC address pool

Microsoft Hyper-v Address Range Chart

Select static (also in templates and hardware profiles!) to make use of the default MAC Address Pool and overcome any MAC problems.
Once you allocated a MAC from the MAC pool the MAC stays static on all your Hyper-V hosts.
When you select “Static” and leave the value “00:00:00:00:00:00” it will allocate a MAC from the MAC pool for you, you dont have to make up one 😉

Microsoft Hyper-v Address Range Calculator

When deploying a virtual machine using the Hyper-V Manager on a host managed by SCVMM, the virtual machine will not use the SCVMM static MAC address pool, but will use the locally defined dynamic MAC address pool on the Hyper-V host when selecting “Dynamic”.
When selecting static here, you will need to make up a MAC.

Microsoft Hyper-v Address Range Finder

Read more: