본문 바로가기

Linux/자주쓰는 명령어 정리

[CentOs] arp명령어와 arping 명령어를 이용하여 MAC 주소 확인 하기

#arp 명령어를 이용하여 나와 근접해 있는 ip의 맥 주소를 확인 할 수 있다.


[root@ns ~]# arp -v

Address                  HWtype  HWaddress           Flags Mask            Iface

1xx.xx.74.1              ether   00:30:4f:b2:f0:9x  C                     eth0

Entries: 1      Skipped: 0      Found: 1



[root@ns ~]#

[root@ns ~]# 게이트웨이 주소로 arp -c ping 명령어를 이용하여 게이트웨이의 맥주소 확인


[root@ns ~]# arping -c 5 115.68.74.1

ARPING 115.68.74.1 from 115.68.74.210 eth0

Unicast reply from 115.68.74.1 [00:30:4F:B2:F0:9x]  2.342ms

Unicast reply from 115.68.74.1 [00:30:4F:B2:F0:9x]  1.967ms

Unicast reply from 115.68.74.1 [00:30:4F:B2:F0:9x]  2.249ms

Unicast reply from 115.68.74.1 [00:30:4F:B2:F0:9x]  1.966ms

Unicast reply from 115.68.74.1 [00:30:4F:B2:F0:9x]  1.937ms

Sent 5 probes (1 broadcast(s))