Virtual PC stand-alone virtual network settings

  

The author's work and study locations are connected to the network, but it is very inconvenient to frequently rush between multiple computers when debugging the program. If you want to take your work home, you lack a network operating environment. After a period of exploration, I found that Virtual PC virtual machine software can solve the above problem: it can "build" a LAN with multiple nodes on a stand-alone platform for network development.

■ Virtual PC Network Features

Virtual PC supports networking, it has two working modes:

Sharing mode When working in this mode, the host is equivalent to a proxy The server gives the virtual machine an IP address (known as the intranet IP) in a dynamic allocation mode (DHCP). The virtual machine accesses the external network through the shared host IP address (external network IP). The working principle is the same as the LAN access technology commonly used in Internet cafes.

This mode is easy to use and requires almost no configuration changes. However, Virtual PC does not have a separate external network IP, which brings a big disadvantage: the external network (including the host) cannot directly access the virtual machine. If you only use the Internet on Virtual PC, you can consider this mode, so as to avoid hackers, viruses and other damage to the host. However, because the host cannot access Virtual PC, it is obviously impossible to implement a single-unit network.

Virtual Switching This mode requires the host to have a valid IP address first. If it is a stand-alone, the easiest way is to install a network card and use static IP allocation. In addition, due to software limitations, the host must install the Windows 2000/XP operating system to use the virtual switching mode.

When running in this mode, Virtual PC is equivalent to a bridge, connected between the host and Virtual PC, thus forming a virtual local area network (Figure). Virtual PC has a separate IP address and supports protocols such as network neighbors and TCP/IP. Tasks that previously relied on the network to complete can now be done on a single machine. For example, network database programming, we can use the host as a database server, install Visual C++, Visual Basic or Power Builder tools on the Virtual PC for client development.

If the host is connected to an external network, Virtual PC can also be accessed as a separate node from the external network.

■Networking steps for virtual switching mode

Suppose the host operating system is Windows 2000 Professional, using static IP allocation, IP address 202.197.3.116, subnet mask 255.255.255.0; Install Windows 95 on Virtual PC.

First modify the network properties of Virtual PC in Virtual PC: Click the "Property Settings" button, select "Network" in the pop-up dialog box, and change the attribute to "Virtual Conversion Network - Local, Host and external".

Next, modify the configuration of the operating system on Virtual PC and start Virtual PC. At this time, the user is equivalent to using a computer with Windows 95 installed. Go to the control panel and open the network settings:

Allow file sharing so that data can be exchanged between the host and the Virtual PC through the network neighbor;

Windows 95 does not have the TCP/IP protocol installed by default. So add it by hand. Set the TCP/IP protocol to use static IP allocation, IP address 202.197.3.117, subnet mask 255.255.255.0. Domain name services and gateways are not required and can be set according to the actual situation.

So far, a LAN with two computers has been set up: one is a real computer, using Windows 2000, IP address 202.197.3.116; one is a virtual computer, using Windows 95, IP address 202.197. 3.117. We can use the Ping command to test to verify that the network is normal. If the host is connected to an external network, you can also ping between Virtual PC and external network nodes.

If you want to add another Virtual PC to the LAN, just copy the hard disk image file of the installed operating system, and then use the "PC Setup Wizard" to create a Virtual PC. When setting up the Virtual PC hard disk, Select Use an existing hard disk image file and enter the path to the newly copied image file. But don't forget to modify the network computer name and IP address of Windows 95 on the new Virtual PC.

■ Notes

In the above, it is assumed that the host uses a static IP allocation method. If you use dynamic IP allocation (DHCP), then Virtual PC should be set to the same way;

When networking on a stand-alone platform, it is best to use a cheap 10M network card. Because on Windows 2000/XP, if you use a 100M network card and it is not connected to the physical network, the network card will be in the "disconnected" state, and the set IP address will become the "return address" 127.0.0.1, the address Cannot be used for network transmission. The solution is to connect the NIC to a hub.

■ Small

This article focuses on how to set up a LAN on a single machine. For detailed usage of Virtual PC, please refer to the software help documentation. In fact, its use is far more than that. For example, Virtual PC can be used as a computer teaching tool for beginners to operate on it without worrying about damage to the host system.

Copyright © Windows knowledge All Rights Reserved