当前位置:网站首页>Ethernet ARP Protocol
Ethernet ARP Protocol
2022-06-24 23:34:00 【qq_ forty-five million four hundred and five thousand six hundr】
ARP Introduce
In Ethernet , One host communicates with another host , You must know the destination host MAC Address ( Physical address ), And purpose MAC The address is obtained by ARP The agreement is completed .
ARP(Address Resolution Protocol), Address resolution protocol , It's based on IP Address ( Logical address ) obtain MAC A kind of address TCP/IP agreement .
MAC The address in the network represents the address of the network card ID, Each network card requires and has only one MAC Address . In getting to the goal MAC After the address , Aim MAC Address updated to ARP Cache table There will be an expiration date , After the expiration, you need to re pass ARP Agreement to obtain .
ARP Mapping means that IP Address and MAC Address mapping , It is divided into static mapping and dynamic mapping .
Static mapping refers to manually creating a ARP surface , hold IP Address and MAC Address Association . After manual binding , The source host before communicating , You can directly from ARP Find... Directly in the table IP Address corresponding MAC Address , But there are certain limitations to this , because MAC The address may change , To avoid these problems , It must be maintained and updated regularly ARP surface , This kind of is troublesome and will affect the network performance .
Dynamic mapping refers to using the protocol to obtain the corresponding physical address , The word dynamic is used because the process is automatic , General application users or system administrators do not have to care about . There have been designed to implement dynamic mapping protocols ARP and RARP( Reverse Address Resolution Protocol ) Two kinds of ,ARP hold IP Address mapping to physical address ,RARP Map the physical address to IP Address .. among RARP There are few application scenarios , There is no expansion here . Here is a detailed introduction ARP
ARP Protocol is introduced
ARP The agreement is divided into ARP Request and ARP The reply , The source host initiates the query for MAC The message of address is called ARP request , The destination host responds to the source host and sends a message containing the local message MAC The message of address is called ARP The reply .
When the host needs to find the physical address of another host in the network , It can send a ARP Request message , This message contains the sender's MAC Address and IP Address and recipient's address IP Address . Because the sender doesn't know the physical address of the receiver , So this query grouping will be carried out in the network layer radio broadcast , namely ARP The physical address of the receiver sent at the time of request is the broadcast address , use 48'hff_ff_ff_ff_ff_ff Express .
Because of sending ARP The message sent by the requesting host in the network , Purpose MAC The address is the broadcast address , Therefore, all network devices will accept this message , And the purpose in the message IP With your own IP Contrast , If different, ignore , If it is the same, send a ARP Reply message .
ARP Reply message Unicast form adopted , utilize ARP The requestor in the request IP Address and MAC Address , Send back ARP Request sender , tell ARP Requestor's own MAC Address .
ARP The requestor received ARP After the answer , Analyze the information in the message MAC Address , Aim MAC Address and purpose IP Address updated to ARP The cache table . When again with the host A When communication , Can be directly from ARP Cache table , Instead of relaunching ARP Request message .ARP The entries in the cache table have expiration time ( It's usually 20 minute ), After expiration , Need to be re launched ARP Request for purpose MAC Address .
ARP Packet format

Hardware type (Hardware type): Type of hardware address ,1 Represents the Ethernet address .
Protocol type (Protocol type): The type of protocol address to map ,ARP The upper layer of the agreement is IP agreement , Therefore, the protocol type is IP agreement , Its value is 0x0800.
Hardware address length (Hardware size): Hardware address (MAC Address ) The length of , In bytes . For Ethernet IP Address of the ARP To ask or answer , The value is 6.
Protocol address length (Protocol size):IP The length of the address , In bytes . For Ethernet IP Address of the ARP To ask or answer , The value is 4.
OP(Opcode): opcode , Used to indicate that the packet is ARP Request or ARP The reply .1 Express ARP request ,2 Express ARP The reply .
Source MAC Address : The hardware address of the sender .
Source IP Address : The protocol of the sender (IP) Address .
Purpose MAC Address : The hardware address of the receiving end , stay ARP The receiving end is unknown when requesting MAC Address , Therefore, this field is the broadcast address , namely 48’hff_ff_ff_ff_ff_ff.
Purpose IP Address : The protocol of the receiving end (IP) Address

Because the Ethernet frame data segment is the least 46 bytes , and ARP The total packet length is 28 byte , So in ARP The data segment needs to be filled with 18 Bytes of data , To meet the requirements of Ethernet transmission format . This filling process is called Padding( fill ), The filled data can be any value , But it's usually 0.
( notes : Reference punctual atom FPGA course , For learning records only )
边栏推荐
- Hyperledger Fabric 2. X dynamic update smart contract
- [JS] - [array, stack, queue, linked list basics] - Notes
- Morris遍曆
- go 语言指针,值引用和指针引用
- 7-9 treasure hunt route
- 7-7 solving mode problems
- How to resolve the 35 year old crisis? Sharing of 20 years' technical experience of chief architect of Huawei cloud database
- Pseudo original intelligent rewriting API Baidu - good collection
- Harmonyos accessing database instances (3) -- use ORM bee to test how good harmonyos is
- STM32CubeIDE SWV功能使用方法
猜你喜欢

年薪百万,7年测试经验:守在一个还算不错的赛道,慢慢积累,等风来

#22Map介绍与API

7-7 digital triangle

安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX

JS listens for page or element scroll events, scrolling to the bottom or top

当初吃土建起来的“中台”,现在为啥不香了?
![[JS] - [array, stack, queue, linked list basics] - Notes](/img/c6/a1bd3b8ef6476d7d549abcb442949a.png)
[JS] - [array, stack, queue, linked list basics] - Notes

都2022年了,你还不了解什么是性能测试?

InnoDB, the storage engine of MySQL Architecture Principle_ Redo log and binlog

Adding, deleting, querying and modifying MySQL tables
随机推荐
R language uses the aggregate function of epidisplay package to split numerical variables into different subsets based on factor variables, calculate the summary statistics of each subset, and customi
R语言使用MatchIt包进行倾向性匹配分析、使用match.data函数构建匹配后的样本集合、对匹配后的样本的不同分组对应的目标变量的均值进行Welch双样本t检验分析、双独立样本t检验
Helix distance of point
golang convert map to json string
【UVM入门 ===> Episode_8 】~ Sequence 和 Sequencer、Sequence 层次化
安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX
还在用 SimpleDateFormat 做时间格式化?小心项目崩掉
年薪百万,7年测试经验:守在一个还算不错的赛道,慢慢积累,等风来
Redis source code analysis skip list
376. Tâches mécaniques
The R language uses the matchit package for propensity matching analysis and match The data function constructs the matched sample set, and judges the balance of all covariates in the sample after the
No main manifest attribute in jar
Super detailed cookie addition, deletion, modification and query
【js】-【數組、棧、隊列、鏈錶基礎】-筆記
7-9 寻宝路线
Spark's wide dependence and narrow dependence yyds dry goods inventory
7-8 circular scheduling problem
File contains vulnerability issues
7-5 最大子矩阵和问题
throttle-debounce.js:一个小型的防抖节流函数库