Home > Article > Operation and Maintenance > How to implement virtual machine NAT mode to access the Internet
When using a vmware virtual machine to learn Linux, the common problem encountered is that the host machine cannot communicate normally and the virtual machine cannot access the Internet normally. Here is a detailed configuration for easy reference later
After installing vmware After installing the software, you must have a virtual network card VMnet8 to use NAT mode. Here we take win10 as an example
Go back to the virtual machine settings:
To use NAT mode, the vmnet8 network card here must be connected and used, and both gray ticks must be checked.
You only need to confirm whether NAT mode is enabled. , then the network configuration of linux is as follows:
[root@zabbix ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR =00:0C:29:7C:01:85
TYPE=Ethernet
UUID=2ec33123-5547-4b05-ac7c-c04c47963bc1
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
How to confirm that it is the correct gateway:
The ip information of vmnet8 of the win10 host:
The above is the detailed content of How to implement virtual machine NAT mode to access the Internet. For more information, please follow other related articles on the PHP Chinese website!