当前位置:网站首页>ARP表是什么
ARP表是什么
2022-06-10 05:42:00 【黄佳俊、】
ARP表
提起ARP表必然先想起ARP(address resolution protocol)协议,地址解析协议。
在实际应用中,我们经常遇到这样的问题:已知一个机器的IP地址,但在实际网络的链路上传送数据帧时,最终还是必须使用该网络的硬件地址,需要知道其MAC地址。如果两个都需要去记忆或输入,大大增加了其繁琐程度。地址解析协议ARP就是用来解决这样的问题的。
由于IP协议使用了ARP协议,因此通常把ARP协议划归到网络层。但ARP协议的用途是为了从网络层使用IP地址,解析出在链路层使用的硬件地址。
每一台主机都设有一个ARP高速缓存,里面有本局域网上的各种主机和路由器的IP地址到硬件地址的映射表,表里面的内容由ARP协议进行动态更新。表内的数据会老化,达到老化时间会自动删除,在此通信时,由ARP协议重新添加。
通信过程
有PC0,PC1两台主机
使用思科的仿真模拟器能直观的看出通信过程

PC0向PC1发送一个ping报文,向PC0输入1.1.1.3 然后开始发送,PC0先查询本地APR表查询1.1.1.3对应MAC地址,但并没查到,这种情况PC0在本局域网上广播发送一个ARP请求分组。ARP请求分组的主要内容是:
我的IP地址是1.1.1.2,硬件地址是xx-xx-xx-xx-xx-xx。我想知道IP地址为1.1.1.3的主机的硬件地址。
在本局域网上的所有主机上运行的ARP进程都会收到此ARP请求分组。PC1的IP地址与ARP请求分组中要查询的IP地址一致,就收下ARP请求分组,并向PC0发送ARP响应分组,同时在这个ARP响应分组中写入自己的硬件地址。其余主机ip地址都与ARP请求要查询的ip地址不一致,不做任何回应。
响应内容为:
我的ip地址是1.1.1.3,我的硬件地址是xx-xx-xx-xx-xx-xx
虽然ARP请求分组是广播发送的,但ARP响应分组是普通的单播,即从一个原地址发送到一个目的地址。
接下来PC0就可以使用刚获取的PC1MAC地址,进行icmp数据发送。
边栏推荐
- Software stuff
- Flink 系例 之 CountWindow
- N-gram language model
- Idea plug-in recommendation: file tree enhancement, displaying class comments
- Transformer XL model details
- Model lightweight pruning distillation quantification series yolov5 lossless pruning (with source code)
- Model Lightweight - cutting distillation Series yolov5 nonestructive Cutting (attached source)
- Struct in golang
- Flink 系例 之 SessionWindow
- idea 远程调试代码
猜你喜欢

CANape CAN工程的创建

Jifeng lighting | the spotlight without secondary light spot is perfect. The hill is perfect

Win10 installation process

MTK 平台sensor arch 介绍-kernel

IDC released China Cloud native market analysis. Ant group has become one of the most comprehensive manufacturers

Simple and interesting Snake growth game -- greedy snake

AI summit ICLR 2022 | wpipe ant group large scale DNN training pipeline parallel technology

Raspberry pie 4B compiling kernel module
![[homeassistant drive servo]](/img/88/17005f6cbe7d9eb26a6aba07fa7c57.png)
[homeassistant drive servo]

《模型轻量化-剪枝蒸馏量化系列》YOLOv5无损剪枝(附源码)
随机推荐
Bubble Sort Bubble_ sort
The process of data division with R language's catools package, random forest model construction with randomforest package, and visualization of the trained random forest model with plot function (the
Display常用英文缩写
深证通mr-消息中间件简单使用
stack_quick_sort
《模型輕量化-剪枝蒸餾量化系列》YOLOv5無損剪枝(附源碼)
MKS h3615ns DC motor drive instruction manual
Harbor cannot log in with the correct password
npm命令大全
Flex:1 unequal division
MTK 平台sensor arch 介绍-kernel
With the advent of the digital wave, how to achieve agile business delivery and sustainable technology governance? Uncover the ant bizstack
Model Lightweight - cutting distillation Series yolov5 nonestructive Cutting (attached source)
Recursive function Hanoi Tower
matlab中不同随机数的生成
Idea plug-in recommendation: file tree enhancement, displaying class comments
Improper use of BigDecimal caused P0 accident!
感谢羽忆童鞋的大白兔奶糖
CANape CAN工程的创建
敏捷项目一页纸测试计划通用模板