Vmware does not see the home network. Networking in VMware Workstation and VMware Server

There are several ways to configure a guest machine's network:
1) Bridged networking
2) Network address translation (NAT)
3) Host-only networking
4) Custom networking

In our case we will configure guest car like Custom networking. FreeBSD 7.0 is installed on the guest machine.

And so, we launch VMware Workstation. Let's go to network properties Edit > Virtual Network Editor (In older versions Virtual programs Network Settings). Select the Host Virtual Adapters tab.

We remove all network adapters by selecting the adapter and clicking the Remove button. After all adapters have been removed, click the Apply button.


In the next step, click the Add button and add a new virtual network adapter. By default, the network adapter is created with the virtual network VMnet1.
Please note that the adapter must be Enabled. Click the Apply button.


Select the Host Virtual Networking Mapping tab. Click the > button and select Subnet. In the IP Address field we fill in: 192.168.0.0. In the Subnet Mask field: 255.255.255.0. Click Apply.


Go to the Network Neighborhood properties of the main system on which VMware is installed (in my case, Windows).
Configuring the network interface for VMware Network Adapter VMnet1:
IP: Free IP on your network (example 192.168.0.1)
Mask: Your network mask (example 255.255.255.0)

Now we need to give our virtual machine access to the Internet. You can allow our virtual machine’s IP address to use the Internet on the main server of the network, or you can pass all Internet traffic through an already existing interface connected to the Internet; our interface is the Windows interface.

We will access the Internet using the second method, go to the settings of our physical network card, which is connected to the Internet or to local network.
In the Advanced tab, check the box to allow other users to use the Internet connection. In Connecting your home network, select the VMnet1 adapter.
Perhaps after this step you will need to reconfigure the ip and mask for VMnet1 in network environment

We start our guest Axis and configure the network interface (for example via sysinstall)
Host: server
Domain: ru
IPv4 Gateway: 192.168.0.1 (address of our VMware Network Adapter VMnet1)
IPv4 Address: 192.168.0.2
Name Server: 192.168.168.1 (address of your DNS server)
Netmask: 255.255.255.0

Restart the network interface with the commands: cd /etc
./netstart
Let's look at /etc/resolv.conf. It should contain a record of DNS server type: domain ru
nameserver 192.168.168.1

Networking in VMware Workstation and VMware Server.

Article:

The use of desktop virtualization platforms, both on home computers and in the production environment of enterprises, in lately is becoming especially popular. Many users use virtual machines for training, running software written for a different operating system than the installed operating system, and creating portable user environments that are untethered from specific hardware. In an enterprise environment, virtual machines allow you to securely test software on a variety of guest operating system configurations, using specialized virtualization platform tools that increase the efficiency of the development and testing process. In addition, one of the most important advantages of virtual machines is the ability to combine them into virtual networks, which allows you to simulate behavior on one computer distributed systems, consisting of both end-user applications and various types of servers, in a heterogeneous environment. Flexibility of virtual machines in terms of resources allocated to them and ample opportunities Maintenance and Performance Optimization makes it easy to manage many different virtual machine configurations and create optimized, hardware-independent applications packaged within virtual machines. These components, consisting of virtual machines, can then be networked in various ways to simulate different systems.

VMware products are currently market leaders in terms of organizing such models for testing. In June 2007, VMware Workstation 6 received a magazine award Visual Studio magazine how best solution in the Development Tools category. This was largely due to the availability of a large number of tools that can significantly increase the speed of development and testing, simplify the procedure for deploying applications and setting up network interaction between them. The desktop virtualization platform VMware Workstation has become so popular that Microsoft has decided to take a not entirely fair step regarding the licensing policy for operating system virtualization Windows family Vista: Some editions cannot be virtualized. This situation could not suit VMware, which began the fight for the free use of operating systems on virtualization platforms. In addition, VMware is betting big on VMware Fusion, which provides the tightest integration between Mac OS and Windows Vista(codenamed Unity) and demonstrating truly fantastic results: the user works as if “in two worlds”.

The sixth version of VMware Workstation introduces many new features and capabilities, including networking. The most significant improvement is the ability to create up to ten virtual network adapters for a virtual machine.

Principles of organizing networks between virtual machines

Virtual machines on the VMware platform allow users to create various combinations virtual systems operating on various principles of network interaction. basis VMware networks are the following components:

  • virtual switches
  • virtual network interfaces (Virtual Ethernet Adapters)
  • virtual bridge
  • built-in DHCP server
  • broadcast device network addresses(NAT, Network Address Translation)

The fundamental element of networking in VMware Workstation and VMware Server is the virtual switch. It enables virtual machine networking in a manner similar to physical device: The virtual switch has ports to which virtual network interfaces of virtual machines can be bound, as well as other components virtual infrastructure within the host. Multiple virtual machines connected to the same virtual switch belong to the same subnet. A virtual bridge is a mechanism by which a computer's physical network adapter is bound to virtual network interfaces. VMware's built-in DHCP server allows virtual machines automatically obtain an IP address in its subnet, and a virtual NAT device provides network address translation when virtual machines communicate with an external network.

3 types of network interaction between virtual machines

VMware Workstation and VMware Server products provide users with the ability to assign one of three basic networking types to a virtual machine for each of the virtual network adapters:

  • Bridged
  • Host-only

Each of these types of networking can be used to various options use of virtual machines and it is necessary to carefully select the type of network interaction of the virtual machine for more effective use of it in conjunction with other components of the network infrastructure.

This type of network interaction allows you to bind the virtual machine's network adapter to the physical network interface of the computer, which makes it possible to share network card resources between the host and virtual system. A virtual machine with this type of network interaction will behave in relation to the external network of the host system as an independent computer. You can assign such a machine its own IP address on your home or organizational network, or it will receive it from an external DHCP server. For the created virtual machine, this type of network interaction is assigned by default, since this is the simplest way to organize network interaction between the virtual machine, the host and the external network. The structure of Bridged Networking is given below.


The guest's virtual network adapter is connected to a virtual switch, VMnet0, which also has a virtual bridge that communicates directly with the physical network adapter.

In order to assign the Bridged network communication type to a virtual machine, you need to go to the “VM” menu, then “Settings”, on the “Hardware” tab, select the virtual Ethernet network card and set the Network Connection group switch to the Bridged position.

This type of network interaction is optimal for software testing purposes, when you need to organize a virtual network within the host, and virtual machines do not need access to an external network. In the virtual subnet there is a DHCP server connected to the virtual switch VMnet1 and assigning IP addresses from the specified range to virtual machines (by default 192.168.179.128 - 192.168.179.254). The structure of Host-Only Networking is given below:


Guest virtual network adapters connect to the VMnet1 switch and communicate on the 192.168.179.0/24 subnet. A virtual network interface is also created on the host system, connected to VMnet1, which allows you to interact with virtual machines.

In order to assign a Host-Only network connection type to a virtual machine, you need to go to the “VM” menu, then “Settings”, on the “Hardware” tab, select the virtual Ethernet network card and set the Network Connection group switch to the Host-Only position.

This type of networking is very similar to Host-Only, with one exception: an IP address translation (NAT) device is connected to the VMnet8 virtual switch. A DHCP server is also connected to this switch, which distributes addresses from a given range to virtual machines (by default 192.168.89.128 - 192.168.89.254) and, directly, the virtual machines themselves. A NAT device allows IP address translation, which allows virtual machines to initiate connections to an external network without providing a mechanism for accessing the virtual machines from outside. The structure of NAT Networking is given below:


In the host operating system, as well as for Host-Only Networking, a virtual network interface is created for the VMnet 8 switch, allowing the host to communicate with virtual machines.

This model of network interaction is optimal from a security point of view (since it is impossible to initiate a connection to a virtual machine from the outside), but it significantly reduces network performance (sometimes by up to 20-30 percent). A NAT connection can be used, for example, safe work to the Internet from a virtual machine.

In order to assign a NAT network communication type to a virtual machine, you need to go to the “VM” menu, then “Settings”, on the “Hardware” tab, select the virtual Ethernet network card and set the Network Connection group switch to NAT.

Each virtual machine can have multiple virtual network adapters connected to different virtual switches that implement different types of network communication. On the VMware Server 1.0 platform, up to four virtual network adapters can be created for one virtual machine, on the VMware Workstation 6 platform - up to ten. To add a virtual network adapter to a virtual machine, go to the “VM” menu, select “Settings”, then on the “Hardware” tab, click the “Add” button and select “Ethernet Adapter” in the Add Virtual Devices Wizard. After this, in the wizard, assign the type of network interaction for this adapter and click “Finish”.

Setting up a virtual network using Virtual Network Editor

The Virtual Network Editor application is included with VMware Workstation and VMware Server and is a powerful virtual network management tool. In order to use it, you need to run the vmnetcfg.exe program from the folder with Workstation or Server, or select Virtual Network Settings from the Edit menu.


The first tab of the virtual network editor shows the available virtual networks, their description, the subnet they form, and whether a DHCP server is enabled for it. By going to the “Automatic Bridging” tab we will see the following picture:


Here we can let the VMware platform itself select the appropriate physical network adapter to bind to the virtual bridge (if network cards several), and also add to the list physical adapters for which you do not need to create a bridge. If you have one network card, it is recommended to leave everything as is. Next we can go to the “Host Virtual Network Mapping” tab.


Here we can bind host network interfaces (both physical and virtual) to VMnet virtual switches. By default, virtual network interfaces VMnet1 and VMnet8 are bound to switches for Host-Only and NAT, respectively. Physical interface bound to switch VMNet0. For each of the switches, we can assign a subnet by assigning an address and a subnet mask:

We can also bind a DHCP server to a virtual switch, for which there is a binding to one of the host network interfaces. This functionality duplicates the DHCP tab and will be described later. Let's now consider creating your own subnet based on an unoccupied VMnet2 switch, which begins with the “Host Virtual Adapters” tab.


Here we see virtual host adapters for Host-Only and NAT network communication, their corresponding virtual switches and device statuses. We can disable or enable virtual devices, and also delete them completely. Let’s add our virtual adapter to create a subnet of virtual machines by clicking on the “Add” button. Add the VMnet2 adapter and click the “Apply” button. As a result, we have another virtual network interface on the host and a subnet with an automatically assigned address like 192.168.x.0/24. On the “Host Virtual Network Mapping” tab, we can make sure that the created adapter is bound to the VMnet2 switch, and view or change its subnet. Next, let's move on to the next tab, where we can attach a DHCP server to various virtual switches.


Here we see that the DHCP server is running for virtual switches VMnet1 and VMnet8. We can also add the switch to the list of DHCP server clients by clicking the “Add” button, and it does not matter whether any host network interface is associated with it or not. At the bottom you can also see the status of the service that supports DHCP ( vmnetdhcp.exe), and we can stop, start or restart it.

Add the VMnet2 switch using the “Add” button and click “Apply”. DHCP is now assigned to our subnet, and we can edit its properties by clicking on the “Properties” button:

Here, in addition to the range of IP addresses assigned to virtual machines, we can configure the duration of IP address leases by DHCP clients (default and maximum). Thus, by attaching a DHCP server to the switch and creating a virtual host network adapter bound to it, we created our own Host-Only subnet.

As mentioned above, Host-Only network communication differs from NAT in the absence of only one NAT device. This device, which translates virtual machine IP addresses, can be associated with only one virtual switch and host virtual network interface. By default, the VMnet8 switch and the virtual network adapter associated with it are used as the basis for network communication via NAT. On last tab“NAT” you can change the parameters of this network interaction:


In order to assign a NAT device to our VMnet2 network, select it from the combo and click “Apply”. After this, our virtual subnet on the VMnet2 switch becomes protected from outside penetration, and virtual machines using a NAT device can initiate outgoing connections to the external network, which will be processed by the VMware NAT server. The address translation service is implemented by the vmnat.exe process. From this tab it can also be installed, launched and restarted. For NAT server settings, click the “Edit” button.

Here you can configure the IP address of the gateway used by the NAT device, timeout UDP protocol(User Datagram Protocol) in minutes (how long the UDP protocol binding to the NAT network lasts) and Config port – the port through which you can obtain information about the status of the NAT device.

The “Active FTP” checkbox allows or denies opening an incoming connection from an external FTP server in Active Mode. If the checkbox is not checked, single-channel Passive Mode will be used. The “DNS” (DNS, Domain Name System) button allows you to manage the settings for DNS forwarding (redirecting requests to DNS). This feature can only be configured for Windows hosts. The OUI (Organizationally Unique Identifier) ​​checkbox should be checked only if you have changed the first part of the virtual machine's MAC address, which identifies the network card manufacturer (by default, VMware assigns its own OUI to all machines), and you want to allow these machines to use a NAT device .

NetBIOS protocol parameters include the NBNS (NetBIOS Name Service) name processor timeout, the number of retries for NBNS requests, and the NBDS (NetBIOS Datagram Service) timeout.

Building networks from virtual machines with multiple network adapters

As mentioned earlier, each virtual machine can have multiple virtual network adapters associated with different types of network communication and switches. By adding new network interfaces to the virtual machine with various types networking, you can deploy a true virtual infrastructure within a host system for testing complex distributed systems and for training purposes. For example, the structure of a virtual network on a host could be like this:


As can be seen from the figure, there are no problems in modeling on one physical computer complex complex systems, in which various types of servers operate, firewalls and client computers. All this can be done using the Virtual Network Editor utility. In addition, VMware Workstation, which is focused on the development and testing process, provides another tool for creating virtual networks between virtual machines, with advanced capabilities - Virtual Machine Teaming.

Virtual Machine Teaming on VMware Workstation

VMware defines the category of its Workstation product as Development and Test for a reason. The VMware Workstation platform provides a wealth of tools needed by developers and software quality engineers in software development companies. One of the most effective features of the product is the creation of “teams” of virtual machines, united by virtual network segments for testing complex systems. Essentially, Virtual Machine Teaming implements the same capabilities as the Virtual Network Editor, but allows you to more easily create virtual networks by binding virtual machine adapters to different virtual network segments. For example, we need to test the following system: on one of the hosts there is a Web server that has 2 network interfaces - one for accessing it through a thin client from the user’s machine, the other for connecting to the database server, where the client sends requests through the Web server. The structure of such a system is presented below:


Let's create three virtual machines, in accordance with the structure of the model, and add another virtual network adapter for the virtual Web server. After that, in the “File” menu of VMware Workstation, select New->Team. We further indicate where the virtual machine team files will be located, then select the “Yes” option when asked “Add Virtual Machines to the team now”. Next, go to the add virtual machines window:


Here we can add virtual machines using the “Add” button. Add the required machines, click “Next” and answer “Yes” to the question “Add LAN segments to the team now” to go to the window for adding network segments.


Here we add 2 network segments for the simulated system using the “Add” button and click “Next”. Then we go to the most interesting page - the page for binding virtual network adapters to network segments.


Here we can assign virtual network adapter bindings to the virtual network segments we need by simply checking the boxes for the corresponding network interfaces in the segment columns. In accordance with the structure of the model, we assign LAN segment 1 for the database server and Web server and LAN segment 2 for the Web server and client. Thus, after clicking on the “Finish” button, we will receive a command from virtual machines that meets the requirements of the simulated system.

Once the team is created, we can launch all the team's virtual machines with one click and immediately begin testing the system. It should be noted that virtual machines added to a team cannot be used independently, but only within it.

Some aspects of VMware networking

When a virtual machine starts, VMware Workstation and VMware Server automatically assign MAC addresses to virtual network adapters. The automatic address assignment system is such that virtual machines on the same host are guaranteed not to have the same MAC addresses. Therefore, if you use only one copy of the VMware platform on the organization's network, such a system ensures that there are no conflicts physical addresses. However, if virtualization platforms are running on several hosts on the network at once, a situation of duplication of MAC addresses may arise, which will lead to conflicts in the network and unavailability of virtual machines. To avoid this, you can manually assign MAC addresses to virtual machines by adding a line like this in a vmx file in a text editor:

Ethernet[n].address = 00:50:56:XX:YY:ZZ

Where n – serial number(starting from zero) the network interface of the virtual machine, and XX, YY and ZZ are the corresponding components of the MAC address.

In addition, when using a virtual infrastructure based on VMware Workstation or VMware Server in a production environment, it is worth remembering that VMnet virtual switches are actually concentrators (“hubs”), that is, they duplicate traffic on all ports of VMnet devices. This creates potential security issues because a network interface running in promiscuous mode in one of the virtual machines could be listening to traffic destined for other clients of the virtual hub.

Conclusion

The VMware Workstation and VMware Server platforms are powerful tools for organizing network interaction between several virtual machines running simultaneously within a host. None of the desktop virtualization platforms currently on the market have the same networking functionality as VMware Workstation. When testing software, the platform's ability to model complex distributed systems is invaluable. In addition, on the VMware server platform, you can create “virtual server parks” with your own internal and external network connections, these systems are decoupled from the hardware and are very flexible in terms of porting them to another platform. There are many possibilities hidden in setting up virtual networks, as well as various kinds of subtleties that allow you to configure virtual networks very, very flexibly and get the maximum effect from virtual machines.

Quite often there is a need to connect a virtual machine VMware Workstation to the Internet. This need arises when receiving updates directly from an Internet site, testing the operation of Internet browsers, and for many other reasons. In this article we will talk about the possibilities of connecting virtual machines VMware Workstation to the Internet. Depending on the network configuration, the following bridged, NAT or host-only connections can be used.

First, let us remind you that using the Virtual Network Editor utility it is possible to configure virtual networks VMware Workstation. This utility allows you to configure the network VMware Workstation and allows you to configure DHCP and NAT services. Bole detailed information You can learn how to use Virtual Network Editor by reading the article Network Settings VMware Workstation

Scenario 1. Access of VMware Workstation virtual machines to the Internet using a bridged connection.

Let's consider the first scenario for connecting virtual machines to the Internet using a bridged connection. Let's assume that there is a DHCP server on your local network (if it does not exist, then all the TCP/IP parameters of the virtual machine (IP address, mask, default gateway, DNS) can be set manually). We also assume that your network equipment does not block connections based on MAC address and your firewall allows any computer to connect to the Internet.

In this case, no additional settings there is no need to do this, if you chose a bridged connection for the virtual machine, everything should work.

The figure shows a bridged connection. As you can see, the physical machine (host) has its own unique IP address. Virtual machines receive their own IP addresses from the DHCP server. Thus, each virtual machine acts as an independent node on the local network.

U this method connection there are also disadvantages. In a situation where the addresses of computers with Internet access are hardcoded on the firewall, virtual machines VMware Workstation will not gain access. In this case, it is necessary to create for each virtual machine separate permission firewall access. Another limitation for the operation of a virtual machine on a network can be the settings of the network equipment; the settings may indicate a limitation of one MAC address per port. Since in a bridged connection each virtual machine has its own MAC address, network equipment can block the port due to the large number of MAC addresses on the port.

Scenario 2. Connecting VMware Workstation virtual machines to the Internet using NAT.

We looked at the first scenario for connecting virtual machines VMware Workstation to the Internet. As discussed above, there are certain limitations inherent in a bridged connection. To overcome these limitations, you can alternatively use a NAT connection. In a NAT connection, the IP address of the host (physical computer) is used by all virtual machines. In other words, if a guest virtual machine accesses local network resources, the request occurs on behalf of the host, using its IP and MAC address.

When using a NAT connection, there are two networks. One is a virtual network in which virtual machines are located and interact, and the second is a physical network to which a physical computer is connected. The DHCP service is used to assign IP addresses to virtual machines. DHCP configuration is carried out through the Virtual Network Editor utility VMware Workstation. In the DHCP service configuration, it is advisable to specify the DNS server of the higher Internet provider.

Please note that the physical computer is also connected to the virtual network using a virtual network adapter. When a virtual machine accesses resources of a local network or the Internet, packets from the virtual machine reach the default gateway (which is the IP address of the virtual adapter of the physical computer), network address translation is carried out on the physical computer and the packets enter the network using the IP and MAC address physical computer. After receiving data from an external network or the Internet, the reverse translation of network addresses occurs.

Scenario 3. Access of VMware Workstation virtual machines to the Internet using a host-only connection.

When talking about a host-only connection, it is always emphasized that it is created isolated from external networks virtual network. All virtual machines on this network can only communicate with each other and with operating system hosta But, even for host-only connections, it is possible to provide virtual machines VMware Workstation Internet access. This can be done using a proxy server, router, NAT, etc. on the host. On computers using Windows 2000, Windows XP or Windows Server 2003, together with a host-only connection, you can use Internet connection sharing, allowing virtual machines to use dial-up or another Internet connection.

Conclusion. VMware Workstation provides many options when configuring virtual networks - bridged, NAT and host-only. Depending on the use case, you need to choose specific network. If you want to connect a virtual machine to a local network or to the Internet, it is better to use the bridged or NAT option. The choice depends on your local network security configuration.

Note. Please note that your personal firewall may be blocking virtual machine connections. As an experiment, you can disable the firewall for a while and test the connection from the virtual machines.

Specialists in different areas IT quite often has to study various operating systems, test software written on them, study the interaction of computers over a network, and also configure server and client programs. As a rule, such tasks require more than one computer, but maintaining several computers at home is very difficult. Firstly, not everyone will agree to pay about $500 for a second, much less a third, computer. And, secondly, not everyone has the space to place them. What to do and how to get out of this situation? There is an answer! At your service VMWare Workstation! This article covers setting up VMWare Workstation, creation of virtual network adapters and networks of virtual machines.

VMWare Workstation- This software product, which allows you to create virtual computers. Those. you have the opportunity to place many logical ones on one physical computer. Plus, you can network them together. And most importantly, you will not harm your computer hardware and you will not have to think about how to partition the hard drive to install a second operating system on your computer. Now let's look at the capabilities of this program in more detail.

In this article we will configure VMWare Workstation 5.5.2 - build 29772. Windows XP SP1 is used as the main (host) operating system (i.e., the OS on which VMWare Workstation is installed).

The operating systems that can be installed on VMWare Workstation (they are called guests) can be Windows (from 3.1 to Vista), various types Linux, FreeBSD, Solaris, Novell NetWare, MS DOS, and installation of some 64-bit operating systems is also allowed.

For example, consider the installation Windows XP Media Center , FreeBSD 6.1 And SUSE Linux Enterprise Server, and then we will combine these systems into a single network. Our example uses a PC with Intel processor Pentium 4 2.0 GHz and 768 Mb of RAM.

VMWare Workstation creates its own virtual hardware for each virtual computer:

  • The processor is the same as on the real machine. The latest versions support dual-processor systems. If you have real computer 2 processors, then you can use 2 in the virtual one.
  • RAM - limited by the size of RAM on the actual computer. But it cannot exceed 1280 MB.
  • Supports both IDE and SCSI devices.
  • 3.5 inch floppy disks.
  • LPT and COM ports.
  • USB devices.
  • Sound card.
  • virtual Ethernet adapters.
  • keyboard and mouse.

So, let's start practicing. Installing VMWare Workstation is a no-brainer. During installation, CD-ROM autorun should be disabled. After installation is complete, enter the serial number (Help->Enter Serial Number...), which can be ordered on the manufacturer’s website http://www.vmware.com/. Moreover, after the expiration date, it can be ordered again, albeit for a different mailbox. Figure 1 shows VMWare Workstation after installation.

Figure 1. VMWare Workstation

Now let's look at ways of network interaction between virtual machines:

Bridged networking (bridge)- allows you to connect the network interface of the virtual machine to the local network. Those. another Ethernet interface will be visible from the local network, with its own IP address, and data will be transmitted through the real interface of the main machine. By default, the vmnet0 interface is used for this

Host-only networking- serves to combine the main and virtual machines into a single network. In this case, joining real network doesn't happen and this network visible only on the local computer.

NAT adapter (Network Address Translation adapter)- used to connect virtual machines to the Internet through the main machine. It is similar to a bridged connection, but differs in that new interfaces do not appear on the network. A NAT device translates packets so that all devices on the real network think they are talking to the real network adapter. In turn, the NAT device, based on a special table it creates, distinguishes which network the packets arriving at the real adapter belong to.

Virtual adapters operate on Class C private networks that start at 192.168.0.0 and end at 192.168.255.255. We will create the network shown in the following diagram.

Fig 2. Diagram of the created network

The NAT device will serve the VMnet8 network, with the address space 192.168.1.0. The VMnet1 (host-only) network will have an address space of 192.168.5.0. Now we need to create these networks. We go to VMWare Workstation, select Edit->Virtual Network Settings... The virtual network editor appears in front of us.

Fig 3. Virtual network editor

By default, the network VMnet1 and VMnet8 already exist, but we want to create networks with different addresses and change some settings. Therefore, go to the Host Virtual Adapters tab and delete both devices, then click Apply. Now we will create two new virtual network adapters. To do this, click the “Add” button on the Host Virtual Adapters tab. In the window that appears (Fig. 3), select VMnet1. In the same way we add VMnet8.

Figure 4. Adding a virtual network adapter

After that, go to the Host Virtual Network Mapping tab. A new device, NewDevice, has appeared opposite VMnet1. You should click the button with the arrow opposite this device and select Subnet in the menu that appears. In the window that appears, enter the IP address of our network - 192.168.5.0 (Fig. 5).

Fig 5. Setting the network address from virtual machines

For VMnet8 we do similar actions, setting the IP address to 192.168.1.0. After setting the addresses for both networks, click the “Apply” button. The following tables show the distribution of IP addresses for host-only networks and those using NAT.

Table 1. Distribution of IP addresses in host-only networks

Table 1. Distribution of IP addresses in host-only networks

Table 2. Distribution of addresses in networks using NAT

In created networks, we can assign IP addresses to virtual machines both statically and dynamically. To set the IP address dynamically, we will use the services of a DHCP service. Settings of this service carried out on the DHCP tab (Fig. 6).

Fig 6. Configuring DHCP service

On the NAT tab, you manage the NAT service for the VMnet8 network (Fig. 7).

Fig 7. Setting up NAT service

Now go to Windows Control Panel -> Network Connections. There should be two new network connections there (Figure 8).

Figure 8. Network connections for a network of virtual machines

Having looked at the properties of these connections, we make sure that the VMware Network Adapter for VMnet1 has an IP address of 192.168.5.1, and the VMware Virtual Ethernet Adapter for VMnet8 has an IP address of 192.168.1.1.

Having understood a little about the structure of networks, we will proceed to installing operating systems. Let's start with Windows XP Media Center. Select File->New->Virtual Machine... In the wizard that appears, click “Next”, leaving the configuration type unchanged - Typical. From the group of operating systems we select Microsoft Windows, in the version list select Microsoft Windows XP Professional.

Fig 9. Selecting an operating system for a virtual machine

In the next window, indicate the name and path where the virtual machine will be stored. In the “Network Type” dialog, select “Use host-only networking”. Then you are asked to specify the size of the hard drive. In our case, 3 GB is enough. If we check the Allocate all disk space now checkbox, then 3 GB for our system will be allocated immediately, but if this is not done, then the space on the physical hard drive will be taken up as the virtual hard drive fills up. After that, click “Finish”.

Now let's change some settings. To do this, in the created virtual machine, select Edit Virtual Machine Settings. virtual machine. Change the Memory parameter to 128 Mb. In the CD-ROM parameter, you can specify which CD-ROM to boot from, or you can use ISO images by specifying the location of the image file. This feature can be very convenient in some situations. And finally, set the network parameters Ethernet cards. In the Network connection list, select Custom and specify VMnet1 (Host-only).

Fig 10. Setting up a network card

After changing all the parameters, click “OK” and then start the virtual machine. After starting, click the mouse in the virtual computer window and press the “Esc” button in order to indicate from which location to download. In our case, you need to select CD-ROM Drive and press “Enter”. After which the process of installing the operating system begins as on regular computer. After installation is complete, you should install special drivers, for more quality work. When the virtual machine is running, select VM->Install VMware Tools, now in the virtual computer, go to the CD-ROM device and install.

In the same way, we install SUSE Linux Enterprise Server. We will allocate 128 Mb of RAM and connect the network card to the VMnet1 network.

FreeBSD will have the option and 128 Mb of RAM. We will use two network cards for this system: one (Ethernet) will “look” into the VMnet8 network, and the other (Ethernet 2) into VMnet1. Thus, FreeBSD will connect the two networks to each other. To add another network card to the system, click the “Add” button in the virtual machine properties editor. A wizard will launch in which you should specify the type of equipment to be added, in our case Ethernet, and then specify the network to which this virtual network adapter “looks.”

Figure 11. Adding a new virtual network adapter

After installing the operating systems, we can begin to network them. Let Windows XP Media Center obtain an IP address automatically from the DHCP service. Then we launch the virtual machine with Windows XP Media Center, go to Control Panel -> Network Connections. Select properties for the Loacal Area Connection. In the list of connection components, select Internet Protocol (TCP/IP) and click the “Properties” button and set the switch to “Obtain an IP address automatically.” Click “Advanced” and add a gateway with the address 192.168.5.2. Close all windows by clicking “OK”. We launch the console, enter ipconfig /all and look at the result (Fig. 12).

Fig 12. Result of executing the ipconfig /all command

Now it’s time to configure SUSE Linux Enterprise Server. Launch the YaST administration program. In the “Network Devices” section, select “Network Card”. In the “Overview of network card settings” window, select our card and click “Edit”. Enter the IP address 192.168.5.15, mask - 255.255.255.0. Click the “Routing” button and specify FreeBSD as the gateway, i.e. enter the address 192.168.5.2. Apply the entered settings.

We can check if the network cards are working and if they can see each other. To do this in the command Windows line XP Media Center enter ping 192.168.5.129, if a response comes, then the network card is working. We enter ping 192.168.5.15 and having received a response, we conclude that the network card of the Linux machine is also working and we can communicate with it. Just for fun, you can “ping” a Windows machine from Linux.

Figure 13. Pinging a Windows machine from Linux.

It's time to configure FreeBSD. Run the sysinstall program as root user. Select Configure -> Networking -> Interfaces. For interface lc0, which belongs to the VMnet8 network, set:

IPv4 Gateway: 192.168.1.2 (this is the IP address of the NAT device),

Name Server: 192.168.1.1 (we specify the main machine as a name server, otherwise problems may arise with loading sites when accessing them by name),

IPv4 Address: 192.168.1.4 (IP address of the network card),

Netmask: 255.255.255.0,

The Host and Domain fields will be filled in arbitrarily, because these names are not important to us now.

For interface lc1, belonging to the VMnet1 network, set:

IPv4 Address: 192.168.1.4,

Netmask: 255.255.255.0.

At this point, we consider the configuration of network cards complete.

Let's start pinging. In FreeBSD we enter:

ping 192.168.5.15 - the response should come from SUSE Linux Enterprise Server;

ping 192.168.5.129 - the response should come from Windows XP Media Center;

ping 192.168.1.2 - the response must come from the NAT device;

ping 192.168.1.1 - the response should come from Windows XP Pro (the main OS).

Having received responses from all virtual machines, we conclude that our network is functioning.

Now you need to resolve to your main network connection general access. And in the properties of this connection, on the “Network” tab, select the VMware Brige Protocol component, go to its properties, and enter 8 in the VMnet Number field.

By entering the address ya.ru in the browser in FreeBSD, we can observe a successful download home page Yandex website, if there is a connection to the Internet of the main computer.

Fig. 14. Accessing the Yandex website from FreeBSD on a VMWare Workstation virtual machine.

Having finished talking about setting up a network, we can’t help but mention another great feature of VMware Workstation - Snapshot(snapshot). This feature allows you to save the current state of the virtual machine and return to it if necessary. Why is this necessary? Let's say you want to experiment with installing software, but you don't know what the outcome might be. Then, before installation, you take a snapshot, then install the programs, and if a failure occurs or you are not satisfied with the installed software, then you select the snapshot you made and the system accepts initial state. The most important thing is that you don’t have to reinstall it, as often happens in real life.

To take a snapshot, select VM -> Snapshot -> Snapshot Manager. In the window that appears, click Take Snapshot... enter the name and description of the snapshot. It is better to take snapshots when the virtual machine is turned off, because the contents of the RAM will not be saved, thereby saving space on the hard drive.

Fig 15. Creating a snapshot in VMWare Workstation

The use of virtual computers provides truly enormous opportunities for testing and developing your own software, studying various operating systems and their network interaction. You no longer have to reboot your computer to use another operating system; you simply open VMware Workstation, select the desired OS and click the Start button.

Based on materials skdev.ru