Archive

Archive for the ‘Virtual PC 2007’ Category

Virtual PC Virtual Networking and Connecting to the Internet using NAT or Network Sharing

October 30, 2008 1 comment

I have run into a few issues trying to get Networking to work properly with Virtual hosts and Virtual PC 2007 SP1.  I can get them to talk within the Local Network (Using the Local only settings) or installing a Microsoft Loopback Adapter, but I need the Virtuals to be able to talk to each other and access the Net.  I have found a couple of good Microsoft whitepapers describing some of the nuances and work arounds to make it happen.  Hopefully if you read this, you’ll find it helpful.

 

Ed McKinzie

Scenario: Using a single network subnet

To set up a networking scenario in which multiple virtual machines use a single network subnet, you can use two solutions:

·         If the virtual machines do not need to communicate with the host computer, then use the Local only setting for the network adapters on each virtual machine.

·         If the virtual machines need to communicate with the host computer, then install a Microsoft Loopback Adapter on the host computer and select the Microsoft Loopback Adapter setting for the network adapters on each virtual machine.

 

Scenario: Connecting to the Internet

To set up a networking scenario in which one or more virtual machines connect to the external network or the Internet, you can use three solutions.

Use the host network adapter

Configuring the virtual machine network adapter to use the host network adapter is an easy way to connect a virtual machine to the external network. However, this solution might not work in all situations. If the host network adapter is a wireless network adapter, then the Virtual Machine Network Services driver will not be able to send out network packets with a different MAC address. For security reasons, the wireless networking standard does not allow a different MAC address.

Use the Shared networking (NAT) setting

As an alternative to using the host network adapter, you can configure the virtual machine network adapter to use the Shared networking (NAT) setting. This solution does not have the disadvantages associated with using the host network adapter. When you have a wireless network adapter on the host computer, you can connect your virtual machines to the Internet by configuring them to use Shared networking (NAT). This setting also works when you can have only one external IP address, such as when using a dial-up connection or a connection from a hotel room.

This solution also has a few disadvantages. When you use the Shared networking (NAT) setting, the virtual machine cannot connect to other virtual machines, nor can the host computer connect to the virtual machine. You cannot change the IP range that is used (192.168.131.1 to 192.168.131.253), and you must use dynamically assigned IP address on the network adapter on the virtual machine.

 

Use Internet Connection Sharing (ICS) on the host computer (This is what I use)

The third way to let virtual machines connect to the Internet is to use a Microsoft Loopback Adapter and enable ICS on the host network adapter. Unlike using Shared networking (NAT), using a Loopback Adapter and ICS on the host computer lets virtual machines connect to the host computer, other virtual machines, and the external network.

To set up Internet connectivity from virtual machines by using ICS on the host computer:

1.     On the host computer, install the Microsoft Loopback Adapter according to the instructions provided earlier in this section.

2.     Open the Network Connections window.

3.     In the Network Connections window, right-click the network adapter that is connected to the external network, and then click Properties.

4.     In the Local Area Connection Properties dialog box, on the Advanced tab, select the Internet Connection Sharing check box.

5.     If you have more than two network adapters, then in the Home networking connection list, select the Loopback Adapter.

6.     Click OK to close the Local Area Connection Properties dialog box.

           ICS will set the IP address of the Loopback Adapter to 192.168.0.1.

7.     Close the Network Connections window.

8.     In the Virtual PC Settings dialog box for the virtual machine, configure the network adapter to use the Microsoft Loopback Adapter setting.

cmd-ipaddres

You cannot change the IP range that ICS uses.

Note: You can then change the IP addresses of your Virtual Servers to any 192.168.0.X IP address, using either a Ethernet or Wireless Network Card.  The Virtuals can also talk to one another, which is ideal for test environments. 

 

 

Categories: Virtual PC 2007