기본 콘텐츠로 건너뛰기

12월, 2009의 게시물 표시

네트워크 상의 IP 주소로 MAC 주소를 추출하는 방법

Subject :  How can I get a list of MAC to IP addresses on the network? An easy way to get a list of MAC to IP addresses on the local subnet is to ping every host on the subnet and then check you ARP cache, however pinging every individual node would take ages and the entries only stay in the ARP cache for 2 minutes. 로컬 서브넷 상의 IP 주소에 대한 MAC 주소 목록을 획득하는 쉬운 방법은 서브넷 상의 모든 호스트에게 Ping 을 하고 ARP(Address Resolution Protocol) 캐쉬를 확인하는 것이다.  그러나, 모든 개별 노드에 Ping 하는 것은 많은 시간이 걸릴 것이고 2분동안만 ARP 캐쉬에 체재하면서 들어갈 수 있다. (참고) ARP 캐쉬는 Linux 의 경우 20분, Windows Server 의 경우 2분이 기본적인 Life Time  이다. 그 이후에는 그 데이타가 지워진다. An alternative is to ping the broadcast mask of your subnet which will ping every host on the local subnet (you can't ping the entire network as you only communicate directly with nodes on the same subnet, all other requests are via the gateway so you would just get a ARP entry for the gateway). 로컬 서브넷상의 모든 호스트를 Ping 하게 될 사용자의 서브넷 브로드캐스트 마스크를 Ping 하는 것이 또 다른 방법이다.(동일 서브넷 상의 노드와 직접적으로