Let the mod ping the virtual machine

Let the mod ping the virtual machine

1. Turn off the firewall of the pc
2. Set the ip of the pc and the ip of the virtual machine to be in the same network segment

The first step: virtual machine configuration
a. Connect the bridge mode of the virtual machine to the Ethernet used
insert image description here
insert image description here

2. Let the virtual machine choose bridge mode
insert image description here
3. Enter the virtual machine

Set the ip of the virtual machine to the same network segment as the computer
insert image description here
or command to set the ip of the virtual machine
ifconfig ens33 192.168.139.130 netmask 255.255.255.0 up

If the gateway is found to be incorrect,
first delete the gateway
route del default gw 192.168.139.1
and then add the gateway
route del default gw 192.168.139.1 netmask 255.255.255.0 dev ens33
insert image description here

Step 2: Set the computer ip
insert image description here

virtual machine ping computer
insert image description here

computer ping virtual machine
insert image description here

Guess you like

Origin blog.csdn.net/weixin_41903639/article/details/126527335