[命令] Linux 命令 arp (ARP 缓存表的管理)

内容一:ARP 缓存表的作用

在本地局域网络中,各个设备的网卡都有自己的 ARP 缓存表,用于记录局域网中各个设备 IP 地址和 MAC 地址的对应关系。

内容二:从本地 ARP 缓存表中清除某个 IP 地址的 ARP 缓存

# arp -d 192.168.0.1

(补充:这里以从本地 ARP 缓存表清楚 IP 地址 192.168.0.1 的 ARP 缓存为例)

内容三:获得 ARP 缓存

# ping 192.168.0.1


补充:
1) 这里以获取 192.168.0.1 的 ARP 缓存为例。
2) 当本地尝试连接 IP 地址 192.168.0.1 时,首先发生 ARP 报文询问 IP 地址 192.168.0.1 的 MAC 地址获得 ARP 缓存。如果此缓存长期没有被使用则会自动删除。如果记录 ARP 缓存过多,那旧的 ARP 缓存会被有限删除

[DEBUG] Linux resolve df command is stuck

Error phenomenon:

Input df command and the command is stuck
Can not us cd / command to access /(root) directory
Can not us ls / command to display /(root) directory

Analysis:

There may be some network storage disconnected

Solution:

Step One: Use mount command to check if there is any disconnected network storage here

# mount

(Add: At this moment, we can see at least one remote storage mount to local directory. If we cd to this directory, system command prompt will output target is busy)

Step Two: Use unmount command to unmount this disconnected network storage

# umount -f <nfs storage which is stuck>

Or:

# umount -l <nfs storage which is stuck>

Or:

# umount -f -l <nfs storage which is stuck>