|
|
SIOCDARP(pub): No such file or directory4 V! v9 v9 E0 [
今天想用tcpdump观察一下arp协议广播arp分组的细节。于是我查看man手册,想利用参数d清除arp记录。
8 Z ] H! |% z6 `0 e0 Q-d hostname, --delete hostname W+ L, k+ [2 E& R
Remove any entry for the specified host. This canbeusedif% K. Y0 U; q U4 P; M; z. ]$ v( z
the indicated host is brought down, for example./ J# F- l" y( P/ ?) c, C
, x7 |5 P$ {4 }# B
当前服务器的arp缓存 R8 }# O2 o j4 M& o
[root@CT6 ~]# arp- R) } X( ?6 U8 m6 S
Address HWtype HWaddress Flags Mask Iface
1 w6 C" q9 `5 I192.168.0.9 ether 10:bf:48:d6:a8:e8 C eth0
|3 R6 |' m' E192.168.0.1 ether 7c:b5:9b:0c:2f:cb C eth0
4 a& @ V. C& R! a; t* d! T5 Y执行清除缓存:: |! b% [3 i. r# E7 K/ _+ D
[root@CT6 ~]# arp -d 192.168.0.9 H J J, L8 A4 S8 r
) O+ [, d0 i; b9 E% W
' s" S, }6 q9 u. P* ~4 s, ~
理解的d参数后面的hostname就是本机ip,但执行后报错。
1 L: c* S: ~7 F) t[root@CT6 ~]# arp -d 192.168.0.8* X5 Z7 m* f$ s4 o6 K
SIOCDARP(pub): No such file or directory
7 G8 f1 |2 H. Z/ b9 D/ f$ L# f+ w% g' ~" z4 C
于是,我又试着以arp缓存中的那条映射记录的ip作为hostname.8 G. n( a; S0 `/ |( [
[root@CT6 ~]# arp -d 192.168.0.10 K# @& J/ R: I2 Y1 H
执行完毕后,没有任何显示。我觉得ok了。然后再次查看arp缓存。
7 @9 f) v3 R( ?" s9 F[root@CT6 ~]# arp -d 192.168.0.1
5 j/ T: B; E. e M& s[root@CT6 ~]# arp% n M+ H- S7 a' |, ]
Address HWtype HWaddress Flags Mask Iface
( d2 z2 h/ G+ N4 S0 r192.168.0.9 ether 10:bf:48:d6:a8:e8 C eth0/ E, [: a/ U# A) \1 `: E+ F
192.168.0.1 ether 7c:b5:9b:0c:2f:cb C eth00 l, y6 g4 _5 u
& ~, f$ ]/ {! Q% S( R. q: ?, }
2 Z9 ?4 |" x5 q我不知道此时的"incomplete(不完整)"是什么意思。
; _: s) I( ~1 u
9 Z$ z; ]+ h& a
1 w5 W8 ]2 m' D6 {6 l' Q9 k搜索论坛后,说是要拔掉网线再试着清除arp.
' \. t! f2 |. @$ R% \( @
7 r8 r3 o. P H) @+ ~. G
Q7 L3 ~, m) a: y7 o* Q |
|