In the virtual machine Vmware, Ubuntu is configured with dual NICs. in Vmware, Ubuntu is configured with two NICs, one for accessing the Internet (Host-Only mode ), A fixed IP address is used to communicate with the host machine and other virtual machines-SSH and FTP (NAT mode) Specific configuration: 1. In Windows, prepare: a. Enable the TCP/IP forwarding function of Windows. In the registry, locate and click the following items: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ IPEnableRouter value changed to 1 www.2cto.com B. In the network adapter, right-click Properties → share → Select Internet share, select VMware Network Adapter VMnet1 (Host-Only NIC generated by VMware by default) in the drop-down box. In this case, Windows will prompt that the IP address of VMnet1 will be fixed to 192.168.137.1 (different machines may be different) C. Set the IP address of the VMware Network Adapter VMnet8 (NAT Nic generated by VMware by default), for example, 192.168.2.1 2 and Vmware: menu → Edit → Virtual NetWork Editor → VMnet1 check Connect a host... and Use local DHCP service... 3. Ubuntu settings: Open the sudo gedit/etc/network/interfaces file and add the following content: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.137.8 gateway 192.168.137.1 netmask 255.255.255.0 network 192.168.137.0 broadcast 192.168.1 37.255 www.2cto.com auto eth1 iface eth1 inet static address 192.168.2.8 gateway 192.168.2.1 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 where lo is a local loop, eth0 is Host-Only, eth1 is NAT, and then restart the network: sudo/etc/init. d/networking restart last set DNS: sudo gedit/etc/resolv. add the conf file: nameserver 192.168.137.1 search localdomain and then you can access the Internet. The two NICs can be pinged to each other, and the NAT Nic can be pinged to other virtual machines. Refer to blog: http://www.bkjia.com/os/201211/165390.html