|
|
SIOCDARP(pub): No such file or directory
- b: v) N+ k1 D* K* L, t+ {# j! R: @今天想用tcpdump观察一下arp协议广播arp分组的细节。于是我查看man手册,想利用参数d清除arp记录。
) x, u7 l1 t8 t& |-d hostname, --delete hostname" ?+ p. V8 Q' Q$ G
Remove any entry for the specified host. This canbeusedif
) g }( d5 w# w" E1 {6 S% gthe indicated host is brought down, for example.- B$ r7 r6 F/ d* h6 [! P0 Y6 @3 O
1 Z8 U; F; _. t4 V
当前服务器的arp缓存
2 z4 `" D) J' k5 e8 V# t& G[root@CT6 ~]# arp! T% Y$ w) v3 }. ^) u- N) `; y
Address HWtype HWaddress Flags Mask Iface
_7 q2 M7 A" h' R; |9 E192.168.0.9 ether 10:bf:48:d6:a8:e8 C eth0, l1 u' I% K+ H
192.168.0.1 ether 7c:b5:9b:0c:2f:cb C eth0
' ^9 u9 S' K6 P, u0 f, z: b' y! r! I执行清除缓存:
6 Q: ^% g) `+ `) X[root@CT6 ~]# arp -d 192.168.0.9- j1 v- n1 [- I, K$ o
5 v( Y1 M3 U3 w; H- u7 Y2 d1 Q3 c
: {$ ]0 T: }. g4 O" {理解的d参数后面的hostname就是本机ip,但执行后报错。
- K4 c# G, d/ c ^( Q: _[root@CT6 ~]# arp -d 192.168.0.8$ o2 P- t$ ?% [' o6 Z
SIOCDARP(pub): No such file or directory
$ |6 L' x5 J* n
i% _5 [ W+ H D3 A# [" r# k" I于是,我又试着以arp缓存中的那条映射记录的ip作为hostname.
/ C/ P9 T$ D, j4 [. t- f1 _[root@CT6 ~]# arp -d 192.168.0.1
7 T, z$ t1 ~9 w8 a% X执行完毕后,没有任何显示。我觉得ok了。然后再次查看arp缓存。
9 a4 H E0 U% R- W6 ]2 I' u[root@CT6 ~]# arp -d 192.168.0.1
% q5 P( q& ^2 i5 M+ {1 m[root@CT6 ~]# arp
+ V2 _8 {% R ^3 w# [3 \, FAddress HWtype HWaddress Flags Mask Iface; N5 O- s, R3 ?! `* ^$ x
192.168.0.9 ether 10:bf:48:d6:a8:e8 C eth0% M- ^ j: r/ G4 m$ K- ?+ i
192.168.0.1 ether 7c:b5:9b:0c:2f:cb C eth0" Y2 q3 O8 U0 i. V0 b2 a" C6 d
0 y# I/ w% v6 m: E
* w- D [( I% |3 U; _$ q- |! D我不知道此时的"incomplete(不完整)"是什么意思。
0 E# L& Q y) e3 I3 I5 W
9 K) @1 O) z9 F0 E. G) x' v+ Y8 J
搜索论坛后,说是要拔掉网线再试着清除arp.$ ^9 D: B% {7 ~1 H- K
& d# F+ r u+ B: y
0 }$ g3 d9 o5 j% K |
|