0545. [LINUX] (arp) arp 사용
[root@linuxtest ~]# arp -a
? (10.20.12.73) at 00:60:e0:4d:7b:5b [ether] on eth0
? (10.20.12.171) at bc:5f:f4:a1:64:6d [ether] on eth0
[root@linuxtest ~]#
[root@linuxtest ~]# arp
Address HWtype HWaddress Flags Mask Iface
10.20.12.73 ether 00:60:e0:4d:7b:5b C eth0
10.20.12.171 ether bc:5f:f4:a1:64:6d C eth0
10.20.12.1 ether b0:a8:6e:96:b1:01 C eth0
10.20.12.237 ether 00:60:e0:4d:7b:5b C eth0
arp
-a : 캐시에 있는 모든 호스트를 나열한다
-s : 현재 캐시에 있는 MAC 주소의 값을 변경한다
-d : 현재 캐시에 있는 MAC 주소의 값을 지운다
-v : 동적인 모드로 보여준다
-i : 지정한 인터페이스 arp 를 보여준다
-n : 지정된 MAC 해당 IP를 보여준다