戰地連結︰ Home My Flickr NBA.com About

2009年5月17日星期日

Create Private Network for VPCs with Microsoft Loopback Adaptor

Overview

If you want to add your VPCs into a network so that they (and your host machine) can access other via TCP/IP, what will you do? You can assign your physical network adaptor to VPCs so that they will be on the same network as your host machine, but first you need a DHCP server, and all your VPCs will be exposed to external.

Indeed you can use "Microsoft Loopback Adaptor" to add a virtual network adaptor to your host computer. Then you can assign the Loopback Adaptor to your VPCs to form a Private Virtual Network, so that each VPC can communicate with each other and host machine, but not accessible by external computers.

Reference

Install Microsoft Loopback Adapter

Using Microsoft Loopback Adapter

Virtual PC IP Routing: enabling VPC NAT & loopback connector at the same time

Step

To Install Microsoft Loopback Adaptor

Adding Microsoft Loopback Adaptor is like adding a new hardware in Windows. This part is copied from Reference 1.

  1. In the host operating system, right-click My Computer, and then select Properties. Depending on the style of the start menu, My Computer may be located in the Start menu.
  2. In the System Properties dialog box, on the Hardware tab, click Add Hardware Wizard.
  3. In the Add Hardware dialog box, click Next.
  4. When the Is the hardware connected? dialog box appears, click Yes, I have already connected the hardware, and then click Next.
  5. In the Installed hardware list, click Add a new hardware device, and then click Next.
  6. In the What do you want the wizard to do? list, click Install the hardware that I manually select from a list (Advanced), and then click Next.
  7. In the Common hardware types list, click Network adapters, and then click Next.
  8. In the Manufacturer list, click Microsoft.
  9. In the Network Adapter list, click Microsoft Loopback Adapter, and then click Next twice.
  10. If a message about driver signing appears, click Continue Anyway.
  11. In the Completing the Add Hardware Wizard dialog box, click Finish, and then click OK.

To assign Loopback Adaptor and corresponding IP to each VPC

After you installed the Loopback Adaptor, you should see a new network connection in "Network Connections" screen of the host computer. Right-click on the Loopback Adapator network connection and select "Properties". In the "Microsoft Loopback Adapter Properties" dialog box, verify that the "Virtual Machine Network services" check box is selected. Now the VPCs can be assigned this adaptor in VIrtual PC settings.

  1. Start Virtual PC 2007.
  2. Right-click on your target VPC and click "Settings".
  3. In the "Settings" dialog box, select "Networking" in the "Settings" list, then select "Microsoft Loopback Adaptor" for the network adaptor. (I would suggest assigning the second network adaptor to Loopback Adaptor as we want to reserve the first one for "Shared networking NAT")
  4. For assigning IP, just treat it like other physical network and set the appropriate IP and netmask. Leave the Default gatway blank for the Virtual network

Configure firewall and test the network

At this point each VPCs should be able to "see" and ping others and the host. However the firewall settings on them may block the connection. You can disable windows firewall for the Loopback Adaptor to solve this problem:

  1. On your host computer, go to "Windows Firewall"
  2. Select "Advanced"
  3. Uncheck the network connection (in this case, the "VPC Virtual Network") that you don't want firewall to monitor.
  4. Click "OK".
  5. Repeat 1~4 on every VPCs.

blog170520091

沒有留言: