Set on the Linux VM virtual machine network card

Set options for card

- Bridging Set Bridged
 
if we select the virtual machine network settings for the bridge, then the virtual machine will use the real card with the current real computers to communicate. Benefit is that the configuration as simple as selecting the bridge, and the virtual machine network segment, set with real network in the same segment, then you can enable communication between the virtual machine and the real machine. Other machines on the same segment of the LAN, you can also communicate with the virtual machine. The downside is, the opportunity to occupy a virtual ip, if at home, a person with no problem, but if it is in schools and other places, there may be ip conflict. - NAT settings 
if the virtual machine network settings to select NAT settings, then the virtual machine to communicate through VM8 this fake card with your real machine. -Host Only set 
if the virtual machine network settings Host Only select Settings, then the virtual machine VM1 communicate through this fake card with your real machine. 
The difference with the bridge: a bridge using a real card, the virtual machine not only talk to your local machine to communicate, but also to communicate with different segments of the LAN ip machine. Virtual machine just like a real computer the same. If you select NAT and Host Only, then the virtual machine can only communicate with the machine, while the same segment of the LAN computer, there is no way to communicate. This benefits both that will not take up real ip. 
And the difference between Nat Host Only: Host Only the machine and is in communication only, but Nat other than the machine can communicate and, if the machine can communicate and the Internet, then the virtual machine and the Internet traffic may be .







(Absence of the virtual NIC) NIC settings on NAT

1, after installing centOs, click on the network, VMware related cards is not found, depressed, before the win10 have, for the machine, re-installed it, how gone?

No matter the time being, continue down!
2, we have to do NAT card provided, in NAT mode, the card is directly connected to the host virtual machine NAT device, then the virtual device from the virtual NAT DHCP server, connected together to the VMnet8 virtual switch, virtual machine networking. 

So, if we look at both NAT and DHCP services are running: this [computer] - "Right [Management] -" [Services and Applications] - "Click [service] -" appears in the list, look for the following:

3, open the virtual machine, open instance of power, menu bar, [editor] -> [Virtual Network Editor]

Here, the top, select VMnet8 [], [] VMnet Infomation we choose [NAT] option!

Then, we need [NAT Settings ...] settings:

[DHCP Setting ...] need to set up:

These two places, if necessary, make changes, no need, default. Originally, this has been checked by default two options:

The host virtual adapter is connected to this network! 
Use local DHCP server assigns an IP address to a virtual machine! 
Click [OK]!
4. Next, the virtual machine's network connection settings to NAT mode, click on the [VM] - "[Setting] -" [Network Adapter]

Click [NAT: Used to share the host's IP address], then click [OK]! save.
5. Finally, click into the black screen, edit the NIC configuration file, vi / etc / sysconfig / network-scripts / ifcfg-eth0

edit:

As content, save and exit!
This is just a configuration NAT mode, belongs to the dynamic set; and static settings, as follows:
= None BOOTPROTO 
the IPADDR = 192.168.18.158 
NETMASK = 255.255.255.0 
the GATEWAY = 192.168.18.2 
the DNS1 = 192.168.18.1 

specific value, the step [3] in accordance with the data set!
6. After setting, you must remember to restart the network settings, the command: service network restart

7, execute ifconfig command to check the configuration:

See the configuration data for eth0! 

IP Address: 192.168.18.128
8, test. Here, we first reset the Internet service, the command: /etc/init.d/network restart

Ping look at Baidu's address to see through the barrier, the command: ping www.baidu.com

pass! success! That, then, to install some services through yum when you can smoothly carried out!
9, test remote connections. IP Address: 192.168.18.128

connection succeeded! ! !
10, thus, can be connected to external networks, virtual machine and the host, and complete the connection, the end! ! !

Finally, a brief summary

Online said, VMware Network Adapter VMnet8 card is used to implement virtual hosts and virtual machines to communicate! However, I opened my network did not see the virtual NIC VMnet8, I do not know, whether it is because some settings win10 hide out, or what the reason, however, has achieved a remote connection! That, perhaps, is what needs to be set to show later, you need to take another look!
NAT mode configuration summary:
 
1, in the "Network Editor" [Virtual Network Editor], select VMnet8, set the parameters of the gateway and DHCP parameters Net. 
2, start the virtual machine, the "virtual machine" [VM], "Settings" [Setting], "Network Settings" [Network Adaptor], select NAT. 
3, into the black box, the card is set for instance, here, IP can be dynamic or static, but if where you are, automatically obtain network settings (IP often transform), can be set dynamically of. 
4. After configuration, reboot the network settings must remember! Finally, it is to test the external network connections and remote connection tools. 
5, determine the correct, you can set a snapshot, remember that your current configuration, to prevent accidents, allows you to quickly "Pulse" come back!
Published 59 original articles · won praise 2 · Views 5564

Guess you like

Origin blog.csdn.net/LDR1109/article/details/103881615