Solve the problem that the Virtual Machine of VMware 7 cannot ping the host with a wireless Nic

Source: Internet
Author: User

I use VMware v7.1.2 build-301548.

Host win7 accesses the Internet through WiFi. VMware is installed with a Linux system. The VMware network access mode is bridge. The host can ping the virtual machine, but the virtual machine cannot ping the host.
However, if the host is pinged to the virtual machine, the virtual machine can ping the host, but it will not work again later. There are three solutions:

1. When I first searched online, some netizens said it was a wireless problem. I switched to wired Internet, which solved the problem.

2. This is a problem with vm7. If you reinstall VM v8.0.1 build-528992, this problem will not occur. Really depressing. It turned out to be a bug in vm7.

3. Another solution.

Recently, I read "Computer Network" and finally learned the cause of this problem: An error occurred when the VM attempted to convert the host's IP address to a MAC address, therefore, there is no MAC address for the host in the ARP cache ing table. Solution: bind a static MAC address to the host.

[Root @ localhost test1] # Ping 192.168.1.102
Ping 192.168.1.102 (192.168.1.102) 56 (84) bytes of data.
From 192.168.1.104 icmp_seq = 2 destination host unreachable
From 192.168.1.104 icmp_seq = 3 destination host unreachable
From 192.168.1.104 icmp_seq = 4 destination host unreachable
^ C
# View ARP cache tables
[Root @ localhost test1] # ARP-
? (192.168.1.102) at <incomplete> On eth0

We can see that "incomplete" is displayed when viewing the ARP cache table. This is generally because the Linux system tries to request the host

An error occurred while converting the IP address 192.168.1.102 to the physical address.

Then, I ping the VM in the host.
C: \ Users \ Administrator> Ping 192.168.1.104

Pinging 192.168.1.104 with 32 bytes of data:
Reply from 192.168.1.104: byte = 32 time <1 ms TTL = 64
Reply from 192.168.1.104: byte = 32 time <1 ms TTL = 64

Return to the VM.
[Root @ localhost test1] # ARP-
? (192.168.1.102) at 48: 5D: 60: e4: 86: AE [ether] On eth0
? (192.168.1.1) at D8: 5D: 4C: 1E: BB: A0 [ether] On eth0

# Now we can see that the ARP cache table of the virtual machine contains the MAC address of the host, so we can ping the host. But after a while, ARP

The cache ing table item is invalid, So ping the host again will fail.
[Root @ localhost test1] # ARP-
? (192.168.1.102) at <incomplete> On eth0
? (192.168.1.1) at D8: 5D: 4C: 1E: BB: A0 [ether] On eth0

Solution: Check the MAC address of the host in the host.
C: \ Users \ Administrator> ipconfig/all
Adapter
Physical address ......: 48-5d-60-e4-86-ae
You can also ping the virtual machine on the host and view the ARP cache table on the virtual machine.
[Root @ localhost test1] # ARP-
? (192.168.1.102) at 48: 5D: 60: e4: 86: AE [ether] On eth0
# Obtain the MAC address of the host
# Then, manually specify the corresponding IP address and MAC address in the ARP table in the virtual machine. The type is static ). Static ARP cache Division

Not manually cleared, otherwise it will not be lost.
[Root @ localhost test1] # ARP-s 192.168.1.102 48: 5D: 60: e4: 86: AE
[Root @ localhost test1] # ARP-
? (192.168.1.102) at 48: 5D: 60: e4: 86: AE [ether] perm on eth0
? (192.168.1.1) at D8: 5D: 4C: 1E: BB: A0 [ether] On eth0

# Ping the host at this time
[Root @ localhost test1] # Ping 192.168.1.102
Ping 192.168.1.102 (192.168.1.102) 56 (84) bytes of data.
64 bytes from 192.168.1.102: icmp_req = 1 TTL = 64 time = 0.377 MS
64 bytes from 192.168.1.102: icmp_req = 2 TTL = 64 time = 0.307 MS

# No matter static or dynamic ARP cache, it will be lost after the computer is restarted. Therefore, you can add it to the/etc/rc. Local file in Linux.

After this command is entered, the Host IP address and its MAC address will be bound to the host at startup.

Reference: Guest can't ping host

 

ARP (Address Resolution Protocol) is the Address Resolution Protocol, which enables you to know the physical address through the IP address. In the TCP/IP network

In the network environment, each host is assigned a 32-bit IP address, which is a logical location that identifies the host on the Internet.

Address. To transmit packets over the physical network, you must know the physical address of the target host of the Peer party. In this way, IP addresses are transformed into things.

Address translation problems. Taking the Ethernet environment as an example, to correctly send packets to the target host, the 32-bit

The IP address is converted into a 48-bit ethernet address. In this case, a group of services on the interconnect layer need to convert IP addresses to corresponding physical addresses.

The Protocol is the ARP protocol.

The Ethernet Protocol specifies that a host in the same LAN must know

MAC address. In the TCP/IP protocol stack, the network layer and transport layer only care about the IP address of the target host. This causes IP addresses to be used in Ethernet.

When the protocol is used, the Ethernet protocol of the data link layer is connected to the data provided by the upper-layer IP protocol and only contains the IP address of the target host. So we need

One way is to obtain the MAC address of the target host based on its IP address. This is what the ARP protocol is about to do. So-called Address Resolution

(Address Resolution) is the process in which the host converts the target IP address to the target MAC address before sending the frame.
In addition, when the sending host and the target host are not in the same LAN, even if they know the MAC address of the target host, they cannot directly

Communication, which must be forwarded by a route. Therefore, what the sending host obtains through the ARP protocol is not the real MAC address of the target host.

The MAC address of a port that can access a router outside the LAN. Then, the host is sent to the destination host.

Any frame will be sent to the vro and sent out through it. This situation is called ARP proxy ).

 

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.