I am a big fan of the IPv6 os we will use Unique local addresses in this isolated environment.

IPv6 Unique local address

IPv6 address is just a hexadecimal number and in the isolated environment we are able to use anything. But we will use a correct approach and we will use the Unique local addresses that are equivalent of the IPv4 Private network (equivalent of the private IP addresses in the private IP address space).

Prefix

A lot of people are doing a mistake and they are trying to set fc00. If you check RFC 4193 you will find that L bit should be set to 1 because 0 is not defined (I suppose it will never be defined). So we will use the correct prefix: fd

Of course it does not matter in our isolated testing environment but I like to do things correctly.

Global ID

I decided not to use zeros because it is possible that I would be in collision with something else so I guessed own value: 123456

Subnet ID

I am setting the first subnet: 0

Interface ID

My gateway (edge firewall) that currently do not exist will be 0. Domain Controllers have to have a nice numbers because those DCs will also be our DNS servers and sometime we will have to set them manually to our VMs so DCs and DNSs will be 1 and 2 to easy remember.

Off topic

Due so large range of the IPv6 address space you can do something crazy. It is possible to implement automatic assigmemnt of the static IP addresses. This is not something that you want to see in the production environment but for testing purposes of the another test lab that I implemented I created a small script that is targeted in answer file of the sysprepped virtual machine. I created a sysprep VM and then I just cloned it (export and import several times using PowerShell script) and started. After waiting for the first start I was able to sign in (logon) to the OS with my domain account (VM was added to the domain by the script). All VMs got a static IPv6 address using following PowerShell script.

Generate random IPv6

You can simple generate Interface ID using my following script:

# Copyright (c) Rudolf Vesely

$ipAddress = @()

for ($i = 1; $i -le 4; $i++)
{
    $ipAddress += [Convert]::ToString($(Get-Random -Minimum 0 -Maximum 0xffff), 16)
}

$ipAddress -join ':'

Clone VM without using Virtual Machine Manager

To clone VM without using System Center Virtual Machine Manager you can use my another script that I published on the Microsoft TechNet Gallery.

« Previous Next »

Part of the series

  1. Building Microsoft System Center Cloud - Outline