[네트워크] arp명령어에 관한 질문..(레드헷리눅스8.0)

gyxor의 이미지

[root@localhost root]# host -l -v -t any joayo.net
Trying "joayo.net"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47355
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 2


;; QUESTION SECTION:
;joayo.net.                     IN      ANY

;; ANSWER SECTION:
joayo.net.              65075   IN      NS      domain.joayo.net.
joayo.net.              65075   IN      NS      joayo.net.
joayo.net.              150211  IN      A       211.234.93.135
joayo.net.              68823   IN      SOA     joayo.net. dumca.joayo.net. 514
10800 3600 432000 72000

;; AUTHORITY SECTION:
joayo.net.              65075   IN      NS      domain.joayo.net.
joayo.net.              65075   IN      NS      joayo.net.

;; ADDITIONAL SECTION:
domain.joayo.net.       150211  IN      A       211.234.93.136
joayo.net.              150211  IN      A       211.234.93.135

Received 180 bytes from 210.220.163.82#53 in 77 ms
[root@localhost root]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
211.204.80.150[사라짐]     ether   00:50:FC:58:D5:36   C                     eth0
211.204.80.1             ether   00:06:2A:C8:FC:54   C                     eth0
211.204.80.3             ether   00:40:F4:20:FF:BA   C                     eth0
211.204.80.156           ether   00:C0:03:01:03:B5   C                     eth0
[root@localhost root]#
[root@localhost root]#
[root@localhost root]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
211.204.80.1             ether   00:06:2A:C8:FC:54   C                     eth0
211.204.80.3             ether   00:40:F4:20:FF:BA   C                     eth0
211.204.80.156           ether   00:C0:03:01:03:B5   C                     eth0
[root@localhost root]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:29:7F:CF:27
          inet addr:211.204.80.20  Bcast:211.204.80.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:31828 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3069 errors:0 dropped:0 overruns:0 carrier:0
          collisions:219 txqueuelen:100
          RX bytes:4426676 (4.2 Mb)  TX bytes:508329 (496.4 Kb)
          Interrupt:9 Base address:0xaf00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:78 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5186 (5.0 Kb)  TX bytes:5186 (5.0 Kb)

[root@localhost root]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
211.204.80.1             ether   00:06:2A:C8:FC:54   C                     eth0
211.204.80.3             ether   00:40:F4:20:FF:BA   C                     eth0
211.204.80.156           ether   00:C0:03:01:03:B5   C                     eth0

[root@localhost root]# host -l -v -t any joayo.net
Trying "joayo.net"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57779
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;joayo.net.                     IN      ANY

;; ANSWER SECTION:
joayo.net.              138255  IN      NS      domain.joayo.net.
joayo.net.              138255  IN      NS      joayo.net.
joayo.net.              52479   IN      A       211.234.93.135
joayo.net.              57688   IN      SOA     joayo.net. dumca.joayo.net. 514
10800 3600 432000 72000
joayo.net.              57688   IN      MX      10 joayo.net.
joayo.net.              57688   IN      MX      20 dumca.joayo.net.

;; AUTHORITY SECTION:
joayo.net.              138255  IN      NS      domain.joayo.net.
joayo.net.              138255  IN      NS      joayo.net.

;; ADDITIONAL SECTION:
joayo.net.              52479   IN      A       211.234.93.135
dumca.joayo.net.        57688   IN      A       220.87.42.202

Received 212 bytes from 210.220.163.82#53 in 200 ms
[root@localhost root]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
211.204.80.1[변경됨]  ether   00:06:2A:C8:FC:54   C                     eth0
211.204.80.3[변경됨]  ether   00:40:F4:20:FF:BA   C                     eth0

위 내용을 보시면
arp 명령을 실행했을때.. 이더넷카드의 아이피주소와 멕어드레스값이 여러개가
나옵니다. 그런데 그 항목들이 계속 바뀝니다.
책에서보면.. arp명령은 아이피주소와 이더넷 고유주소를 기억하는 프로토콜
이라고 나옵니다.
이더넷카드에서 거쳐가게 되는 다른 이더넷 카드를 말하는것인가요?
현재 하나로통신유동아이피를 쓰고 있습니다.
위 내용에도 있지만 현재는 211.204.80.20 이었습니다.

[root@localhost root]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
211.204.80.150           ether   00:50:FC:58:D5:36   C                     eth0
211.204.80.1             ether   00:06:2A:C8:FC:54   C                     eth0
211.204.80.3             ether   00:40:F4:20:FF:BA   C                     eth0
211.204.80.156           ether   00:C0:03:01:03:B5   C                     eth0
[root@localhost root]#

첫째, 위 내용에서 각각의 아이피가 의미하는것이 무엇인지 모르겠습니다.
설명부탁드립니다.
둘째, arp를 할때마다 항목이 변경되는([사라짐],[변경됨]으로 표시한 부분)
이유가 무엇인지 궁금합니다.

두가지 답변부탁드립니다.

박영선의 이미지

원리를 생각해보면 간단합니다.

arp는 로컬네트웍에서 아이피를 기반으로 맥어드레스를 찾는 프로토콜이잖아요.

arp -a 했을때 나오는 아이피는 컴퓨터가 근래에 통신했던 컴퓨터들 아이피를 맥이랑 같이저장해놓은겁니다.

맥을 몰라 브로드캐스팅을 하니 불필요한 트래픽을 일으키기도 하고, 통신할때마다 맥 확인하기도 귀찮으니 캐시에다 저장을 하는거죠.

캐시 리프레시타임이 15분인가 20분인가하는데, 랜카드가 바뀌거나 아이피가 바뀌는등의 이유로 맥어드레스가 바뀌면 보유하고있는 캐시테이블이 변경되는거죠.

^^;;

codebank의 이미지

http://www.terms.co.kr/ARP.htm

첫번째 나오는 IP는 ARP캐쉬에 저장되어있는 주소를 나타내는것 같습니다.

IP가 사라지는 이유는 윗분도 말씀하셨듯이 IP가 바뀌었거나 컴퓨터가 꺼진 상태이겠죠.

------------------------------
좋은 하루 되세요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.