vmware description of two virtual network cards

 

After installing the virtual machine, there will be two more network cards in "Network Neighborhood", namely - VMware Network Adapter VMnet1 and VMware Network Adapter VMnet8

 

These two network cards are simulated by vmware, which is equivalent to two more physical network cards on the machine, plus the local network card, there are three network cards in total. These three network cards are in three different network segments, so the three network cards cannot access each other.

 

Case :

In order to enable the virtual machine to access the Internet, I set the IP address 192.168.0.234 for VMware Network Adapter VMnet8, which is in the same network segment as the local network card 192.168.0.58, and then configure the IP address of the network card in the virtual machine operating system, which is the same as that of VMware Network. Adapter VMnet8 is exactly the same.

 

Phenomenon:

This machine can ping 192.168.0.234, but I can't connect remotely using putty (SSHD has been opened), find my colleague to access 192.168.0.234, he can access and can use putty to connect

 

analyze:

The two network cards, VMware Network Adapter VMnet1 and VMware Network Adapter VMnet8, and the local network card are not in the same network segment by default, so they cannot access each other .

 

Now set the network segment of VMware Network Adapter VMnet8 to be the same as the network segment of the local network card. At this time, the routing table will look for the local network card VMware Network Adapter VMnet8 instead of the network card configured by the virtual machine (although the same as the VMware Network Adapter). The VMnet8 IP address is exactly the same), which is equivalent to a local loopback. Therefore, I can ping 192.168.0.234 locally, but I use putty to connect to 192.168.0.234. I actually found the local VMware Network Adapter VMnet8 network card, but my local machine does not have SSHD, so I cannot use putty to connect myself.

 

We can view the routing table using route print

If you visit 192.168.0.234 on the local machine, the router will point to the local machine and will not go to the virtual machine

enter route print
255.255.255.255 255.255.255.255 on link 127.0.0.1 306
255.255.255.255 255.255.255.255 on link 192.168.0.58 276
255.255.255.255 255.255.255.255 on link 172.16.232.1 276
255.255.255.255 255.255.255.255 on link 192.168.0.234 276

 

Why can my colleagues around me have access? This is because his 192.168.0.234 route points to my machine virtual machine, so it can be accessed.

That is to say, the two identical IP addresses 192.168.0.234 point to two different machines.

 

Solution:

Method 1: Disable VMware Network Adapter VMnet8

Method 2: Automatically assign the IP address of VMware Network Adapter VMnet8

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327017120&siteId=291194637