Host and linux in Vmware use host-only and bridge communication

Source: Internet
Author: User
Host-only and bridge communication between host machines and linux in Vmware: my host is called a host machine in this article, in vmware, linux is called linux. in this article, the host-only mode is used to ping linux, but in host-only mode, linux does not... host-only and bridge communication between host machines and linux in Vmware: my host is called a host machine in this article, in vmware, linux is called linux. in this article, the host-only mode is used to ping linux, but in host-only mode, linux does not ping the host... I am very depressed (my local connection has already been shared, but it still doesn't work !) So I can only use the bridge mode to connect the host to linux. host-only: 1. first, confirm that the Nic in the VM is connected, and select the host-only mode: 2. view the IP address allocation in the host-only mode of the Virtual machine: vmware8.0, which is enabled like this: Edit --> Virtual Network Editor. The following figure is displayed: 3. as you can see, my local situation is: from 192.168.2133, and then the assigned IP address is: 192.168.20..1 ~ 192.168.213.254 in my network card, the IP address of VMware Virtual Ethernet Adapter for VMnet1 is set to 192.168.20..1 subnet mask: 255.255.255.0 and others are not required. forget to tell everyone that the host IP address is: 192.168.1.100 now start linux with vi edit:/etc/sysconfig/network-scripts/ifcfg-eth0 (// followed by a comment, do not add this) DEVICE = eth0 // DEVICE name, do not modify BOOTPROTO = static BROADCAST = 192.168.213.255 // BROADCAST address, generally, the last IPIPADDR = 192.168.213.5 NETMASK = 255.255.255.0NETWORK = 192.168.255..1 // VMware ipvua in the host L The IP address of Ethernet Adapter for VMnet1 is the same as that of ONBOOT = yes TYPE = Ethernet5. run the command in linux: ifconfig eth0 downifconfig eth0 upservice network restart6. as of now, it has been OK! Open cmd on the host machine and ping 192.168.213.5 to ping the host machine. but I don't know why linux cannot ping the host machine !!! In view of this problem, we can connect the two through the bridge mode, which is very convenient. of course, this requires a LAN environment. In addition, bridgebridge: 1. first, confirm that the Nic in the VM is connected and select the bridge mode: 2. host IP: 192.168.1.100 now start linux with vi edit:/etc/sysconfig/network-scripts/ifcfg-eth0 (// The following is a comment, please do not add this) DEVICE = eth0 BOOTPROTO = static BROADCAST = 192.168.1.255 IPADDR = 192.168.1.115 NETMASK = 255.255.255.0NETWORK = 192.168.1.1 ONBOOT = yes TYPE = Ethernet3. run the command in linux: ifconfig eth0 down
Ifconfig eth0 up
Service network restart6. as of now, OK! Open the cmd of the host machine and ping 192.168.1.115. In addition, linux can also ping the host machine to ping 192.168.1.100.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.