Explanation of Ping requirements and solutions between Vmware virtual machine operating system and local operating system

Vmware virtual machine operating system and local operating system ping explanation

In a virtualized environment, such as VMware, ping testing between a virtual machine (VM) and the local operating system is a common task. Ping tests can be used to check whether a virtual machine is able to communicate with the local operating system or other network devices. The following is an explanation of the requirements and solutions for pinging the VMware virtual machine and the local operating system.

experience:

Step One: Troubleshoot the Firewall

Enter the control panel
, search for firewall –
Please add image description
enter and click
as shown in the figure below to enable the firewall – set inbound connections to allow – OK. The same operation is required for both the computer and the local computer. ! Do each operation once
Please add image description



Please add image description

Step 2: Solve the virtual machine.
Click Edit in VMware and
click to enter the virtual network editor.
Please add image description
After entering, click NET mode.
Click the lower right corner
Please add image description
to change the settings. After you can modify the settings,
check all the corresponding ones on the left side of DHCP.
Set the corresponding subnet IP to The subnet mask
of 192.168.xxx.0
is:
255.255.255.0 .
Click Apply
Please add image description
and then click NAT Settings in the picture above.
After entering the settings window, modify the gateway address to:
192.168.xxx.2
Click OK
Please add image description
. Click DHCP Settings and
modify it according to your needs.
Click OK on the start address IP and end address IP.
Please add image description
After confirmation, the virtual machine is set up.
Note that the premise of the above settings is:
Please add image description

Step 3: Solve the IP


Go to the following page through Control Panel – Network and Internet – Network Sharing Center – Change Adapter.
Please add image description
Click on the Vmnet virtual network card.
Right-click the mouse and select Properties.
Please add image description
Click on IPV4
and click on Properties
Please add image description
. Click on Use the following IP address.
Set the IP address of the same network segment
. Note: Virtual machine and local machine It must be in the agreed network segment.
Please add image description
Modify the local Ethernet in the same way,
as shown in the figure below.
Please add image description
After completion, set the sharing attribute of the Ethernet to
share with the virtual machine network card,
as shown in the figure below.
Please add image description

Next, similarly, set
the network card properties of the operating system in the virtual machine
as shown below:
Please add image description
Please add image description

Step 4: Add IP


If the host cannot be accessed or the connection times out when pinging , please use the following command
to add the IP address .
Use the command in CMD to add a route:
"route add the host ip to be accessed and your local default gateway -p",
that is Realize the situation of not filling in the default gateway of the machine and connecting to the external network to be used

route add 172.16.69.3 172.16.33.254 -p
route add 要访问的主机ip 你本机默认的网关 -p

Step 5: Prevent accidents

After completing the above steps, in order to prevent accidents,
please restart the virtual machine network card,
as shown below
. Click Disable first, and then enable
Please add image description
it again. If you have configured everything according to the above requirements, and PING fails after a while, you can still solve the problem by restarting the virtual machine network card.

Step Six: Problem Solving

If one day you restart your computer and find that ping fails again,
don’t panic, you just need to do what I said. The premise
is that you have completed all the above operations. You
could ping before, but now you can’t ping.
First, let’s re -share the local host. Network:
Cancel sharing first, exit, then re-enter to enable sharing.
Insert image description here

Finally, restart the virtual machine network card and local machine network card according to step five, and
everything will be solved!

Require:

  1. Correct network settings :
    • In VMware, make sure the virtual machine's network settings are correct. VMware supports multiple network modes such as bridge mode, NAT mode and host-only mode. You need to choose the mode that suits your network needs.
  2. IP address allocation :
    • Make sure both the virtual machine and the local operating system have the correct IP addresses. Virtual machines can use a static IP or automatically obtain an IP address via DHCP.
  3. Network connection status :
    • Both the virtual machine and the local operating system must be connected to the network. Make sure the virtual machine is running and the network adapter is enabled.
  4. Firewall rules :
    • Check the local operating system and virtual machine firewall rules. Make sure to allow ping requests through the firewall. You can do this by adding rules in your firewall settings.

Solution:

  1. Check network settings :
    • First, make sure the virtual machine's network settings are correct. In VMware, select Virtual Machine > Settings > Hardware > Network Adapters and check the network adapter settings. Make sure the adapter is connected to the correct network.
  2. Check the IP address :
    • Make sure both the virtual machine and the local operating system have the correct IP addresses. You can check the IP address using command line tools such as ipconfig or ifconfig in both the virtual machine and the local operating system.
  3. Network connection status :
    • Make sure the virtual machine is running. Start the virtual machine in VMware and ensure that the virtual machine's network adapter is enabled. If the virtual machine is in a suspended state, resume it.
  4. Firewall rules :
    • Check the firewall rules of the local operating system and virtual machine to ensure that Ping requests are allowed to pass. You can add inbound rules in your local operating system's firewall settings to allow ping requests through. In a virtual machine, you may also consider disabling the firewall for testing, but be careful to only do this during testing.
  5. Virtual network configuration :
    • If VMware's NAT mode is used, ensure that the NAT network is configured correctly. Sometimes, it is necessary to manually configure VMware's NAT rules to allow Ping requests to pass.
  6. Check the physical network :
    • If all of the above steps do not resolve the issue, check the physical network devices such as routers, switches, and firewalls to make sure they are configured correctly and allow the virtual machine to communicate with the local operating system.

Finally, once you complete these steps, you should be able to successfully ping test between the VMware virtual machine and the local operating system. If the problem persists, then you may need to further check your network configuration to resolve the issue. When dealing with network issues, double check every step and make sure all settings and rules are configured correctly to ensure smooth network communication.

I'm a general, I've always been there. !

Guess you like

Origin blog.csdn.net/letterljhx/article/details/132624138