Analysis of the problem that the IP ping between two hosts in the LAN cannot communicate

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.

insert image description here


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

insert image description here


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
insert image description here

Go to “Control Panel –> System and Security –> Windows Defender Firewall –> Custom Settings” to view and modify the firewall status.
insert image description here

Guess you like

Origin blog.csdn.net/aikudexiaohai/article/details/129306761