作者leslieha (哈)
看板Network
标题[问题] ARP
时间Sun Mar 18 11:32:55 2007
问题一
请问一下
ARP
是让主机可由已知的 protocol address (IP address)询问
来得到 hardware address (MAC address)
如果在一台 end host 与 switch 间架一个 bridge
把 ARP 全都 filter 掉
那 end host 有其它办法可以得到 hardware address 吗?
问题二
看了一下 RFC826
http://www.faqs.org/rfcs/rfc826.html
在处理 ARP 的封包时的 algorithm 如下
?Do I have the hardware type in ar$hrd?
Yes: (almost definitely)
[optionally check the hardware length ar$hln]
?Do I speak the protocol in ar$pro?
Yes:
[optionally check the protocol length ar$pln]
Merge_flag := false
If the pair <protocol type, sender protocol address> is
already in my translation table, update the sender
hardware address field of the entry with the new
information in the packet and set Merge_flag to true.
?Am I the target protocol address?
Yes:
If Merge_flag is false, add the triplet <protocol type,
sender protocol address, sender hardware address> to
the translation table.
?Is the opcode ares_op$REQUEST? (NOW look at the opcode!!)
Yes:
Swap hardware and protocol fields, putting the local
hardware and protocol addresses in the sender fields.
Set the ar$op field to ares_op$REPLY
Send the packet to the (new) target hardware address on
the same hardware on which the request was received.
按上面标颜色的部份
应该会先 add sender information 至 ARP table内
才会去判断该封包的 opcode
试了一下发现
在 ARP table 没有该 sender 的记录情况下
收到 ARP reply 却不会新增 sender 的记录
是因为 ARP reply 在更前面就处理结束了吗?
还是 RFC826 有被其它 RFC 所更新? (因为我并没有找到)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.129.36.80