Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

VMware virtual machine network settings-- three ways to explain in detail

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Network card settings of 1.Vmware

(1) Bridged (bridging)

In this way, the IP of the virtual machine can be set to be in the same network segment as the local machine. The virtual machine is equivalent to an independent machine in the network. Other machines in the network can access the virtual machine, and the virtual machine can also access other machines in the network. Of course, there is no problem with two-way access with the local system.

At this time, vmware is simulated as a function of a bridge. Only the vmnet1 network card is used, and vmnet8 can not be used.

(2) NAT (Network address Translation) mode

This method can also achieve two-way access between the local machine and the virtual machine. However, other machines in the network cannot access the virtual machine, and the virtual machine can access other machines in the network through the local NAT protocol.

Now that vmware is simulated as a router with DHCP function, vmnet8 will be used at this time.

(3) host-only mode

This method can only carry out the network communication between the virtual machine and the host, that is, other machines in the network cannot access the virtual machine, and the virtual machine can not access other machines.

two。 How to set up a network

After vmware is installed, two automatically generated network cards, vmnet1 and vmnet8, will be set up automatically. Generally speaking, these two settings should not be changed, just go directly to the virtual machine and modify the system network settings in the virtual machine.

(1) if you use the bridge method, you can set vmnet1 directly. The specific setting method for WIN7 is the same as that for XP systems, but there must be extra IP addresses, and the IP of the virtual machine must be in the same network segment as the host.

My native configuration is IP address: 222.198.135.219 mask is 255.255.255.0, gateway is 222.198.135.1, while my virtual machine configuration is eth0 IP address: 222.198.135.210 mask is 255.255.255.0, gateway is 222.198.135.1

The rest of the DNS configuration is exactly the same as the host configuration.

(2) if there is no extra IP address, you can only use NAT mode. There are three key points to set up:

First, make sure that the virtual network cards vmnet1 and vmnet8 on the virtual machine have the same network number

Second, set the network properties in the virtual system and set the gateway address to the address of vmnet1

Third, turn on the routing function of the main system to make it a router.

The specific setting method is as follows:

a. Select NAT mode in VM--Ethernet

b. Open Edit--Virtual Network Editor, determine DHCP enable, and check that the vmnet8 gateway in the NAT option is 192.168.105.2. This is the DNS in the virtual machine.

c. Then type ipconfig-all under the local command line, and you can see that the ip of the Vmnet8 automatically assigned by the system is 192.168.105.1

d. Open the network configuration under the virtual system, and enter 192.168.105.2 as the main DNS in the DNS, which is the gateway of the Vmnet8 you just saw.

e. Select the static setting IP in the device. I set it as follows:

Address: 192.168.105.10 (as long as it is in the same network segment as the ip of Vmnet8, do not repeat it with the gateway)

Subnet mask: 255.255.255.0

Default gateway: 192.168.105.2

This is it. Restart the network service # service network restart

Then ping the virtual machine locally, or ping the virtual machine locally

(3) using host-only method:

a. This machine shares the network with Vmnet1. Modify the IP of vmnet1 to: 192.168.0.1. Disable the firewall.

b. Open the network settings, vi / etc/sysconfig/network-scripts/ifcfg-eth0, in the virtual machine, and set eth0 as follows

Ip: 192.168.0.2 (or other address on this segment)

Netmask: 255.255.255.0

Default gateway: 192.168.0.1

Dns: 202.202.0.33

202.202.0.34

Dd deletes the whole line of HWADDR in command mode

Type # in front and comment out the BOOTPROTO=dhcp

Then save and exit.

The VMware virtual machine is set up.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report