There is a machine in the LAN. Only some of the machines in the same network segment can be pinged or the gateway cannot be pinged. This is a strange phenomenon. I tried to modify the IP address and restart the network service, cannot solve the problem.
Check whether the gateway blocks the MAC address of the machine. Therefore, modify the MAC address of the machine as follows:
Ifconfig eth0 down
Ifconfig eth0 HW ether 00: 1A: A0: 38: E0: 31
Ifconfig eth0 up
If you do not disable the NIC first, the following error occurs: siocsifhwaddr: the device or resource is busy.
Because the SSH remote login is used, the machine does not have a keyboard and display. If the NIC is disabled, the connection will be disconnected. Therefore, the chmac. Sh script is written.
#! /Bin/sh
Ifconfig eth0 down
Ifconfig eth0 HW ether 00: 1A: A0: 38: E0: 31
Ifconfig eth0 up
# Chmod U + x chmac. Sh
# Nohup./chmac. Sh> a.txt 2> & 1 & // use the nohupruntime to prevent connections from being disconnected. After the shellshutdown is closed, the command can be executed without restrictions, and the output information is printed to a.txt.
You can use ifconfig to check and find that the MAC address has been successfully modified, and the gateway can ping the host. Due to the test, the machine sends a large amount of data, so the gateway is blocked by the Administrator, within the same CIDR Block, machines connected to the same vswitch can still be accessed, but those not on the same vswitch cannot be accessed, packets are blocked when they are routed.