, ,

I recently had a run in with the Microsoft Loopback Adapter. The loopback adapter sets up a local DHCP server. Now you might ask, why do I need a local DHCP server for my standalone machine? Well, with the increasing use of Virtual Machines you can create a complete virtual network hosted by a single workstation. Your only limitations are the amount of memory and hard disk space you can assign to them.

Now, if you are attached to a router that has a built in DHCP server your host workstation and virtual servers will automatically be assigned an IP Address. This is wonderful as long as you are connected to the router. What happens if your workstation is your laptop and you need to access your virtual machines while disconnected from your router.

Well this is where the loopback adapter arrives to save the day! Now, as I recently found out there are some things to keep in mind when using the loopback adapter. In my recent situation I was attempting to be able to access my virtual machines while connected or disconnected from my router and also be able to connect to my VPN. I started to experience issues with different combinations. When I connected to the VPN from my host I could no longer connect to my virtual machine. Also, if I disconnected from the VPN on the host, connected to my virtual machine and attempted to the VPN from the virtual machine the system would crash as soon as tried to ping one of the VPN servers.

After some research I discovered that the loopback adapter’s DHCP Server is hardwired to use 192.168.0.* IP Address range. Once I discovered this it became clear what the problem was. My VPN network was setup on the 192.168.0.* IP Address range and I had a conflict.

I searched for quite a while to find out how you change the default IP Address range on the loopback adapter without any luck. It looks like you can not configure this setting even thought the Microsoft MSDN documentation states you can use any IP Address from the range of non-routable IP Addresses.

To correct the issue and get everything up and running I had to change the DHCP IP Address range of my VPN to a IP Address range other than 192.168.0.*. Once this was done I had to reconfigure all the static IP Addresses of the associated servers, update the firewall rules and so on. Once this was compete I was able to connect to the VPN from both my host and virtual machine without issue.

The moral of the story is that the loopback adapter will use the 192.168.0.* range and all the other networks you are going to connect to must be using alternate ranges.

Microsoft Loopback Adapter References
Install Microsoft Loopback Adapter on the host operating system
Using Microsoft Loopback Adapter
Create a virtual network and configure it to use Microsoft Loopback Adapter
Connect one or more virtual machines to the virtual network that is configured to use Microsoft Loopback Adapter