1. Problem background
Two hosts in the same LAN cannot ping each other's IP;
or machine A can ping machine B, but machine B cannot ping machine A.
2. Reason Analysis
1) Check whether the IP configurations of the two machines are in the same network segment, whether the subnet masks and gateways are the same;
2) Check whether the firewalls of the two machines are enabled.
PS: Check the firewall status of the machine
1) Linux machine
Use the command to check, the command is as follows:
systemctl status firewalld
To enable the firewall, the command is as follows:
systemctl start firewalld
Close the firewall, the command is as follows:
systemctl stop firewalld
To enable the firewall, the command is as follows:
systemctl enable firewalld
Disable the firewall, the command is as follows:
systemctl disable firewalld
2) Windows machine
Win + R, enter control
Go to “Control Panel –> System and Security –> Windows Defender Firewall –> Custom Settings” to view and modify the firewall status.