linux - Configure IP address (NAT mode) under VM virtual machine

1. Look at your own ip, open cmd, then type ipconfig in a small black box inside. Find VMware Network Adapter VMnet8, do not close this window first. Do next


2. look at this machine all network connections, find VMware Network Adapter VMnet8. This is a virtual machine and associated ip connection NAT mode. DETAILED DESCRIPTION FIG open:



3. Right - Attribute --internet Protocol Version 4 (TCP / IPv4) This, then double-click. If you have not been set, then it should be empty. As such, first stood.



4. Open the first step the little black box, fill into the ip, dns gateway like to use. Then determine



5. Open the virtual machine settings (right - set), find the network adapter, select NAT mode. Figure


6. Menu bar - edit - Virtual Network Editor. Before then carried out according to our network connection VMware Network Adapter VMnet8 set. Figure concrete.




7. Configure the network card eth0 linux (if you are a linux version 7 or higher, maybe no eth0, may look at thislinux - centos7 change the name of the NIC eth0 )

vi /etc/sysconfig/network-scripts/ifcfg-eth0

I looked at the set, draw arrows are to be changed, how much concrete change, that is, before the configuration of those


8. Set DNS, using the command linux

we /etc/resolv.conf

Plus such a passage. nameserver 192.168.239.2 (dns previously set)




9. Restart Network Configuration

 service network restart

10. Review linux network address

ifconfig

11. then use their own computers, ping, can pass on the right, as



Guess you like

Origin blog.csdn.net/qqyb2000/article/details/80537032