ARP协议原理及网络层地址流程.pdfVIP

  • 0
  • 0
  • 约4.32千字
  • 约 9页
  • 2025-10-17 发布于北京
  • 举报

ARP协议:AddressResolutionProtocol,地址解析协议

•在以太网环境中,假设主机A要发送数据包给主机B,其中包含了四个地址:

○源MAC:主机A的MAC,已知

○目MAC:主机B的MAC,未知,如何获取?

○源IP:主机A的IP,已知

○目IP:主机B的IP,已知

•因此需要ARP来帮助解析出目标IP所对应的目标MAC

•ARP的工作流程:

1.以广播形式发送给该网络内所有主机

2.只有拥有目标IP的主机才会进行回应

3.收到回应后,主机会把相应记录保存在ARP缓存中

4.查看ARP缓存:arp-a

5.清空ARP缓存:arp-d

ARPprotocol:AddressResolutionProtocol,addressresolutionprotocol

InanEthernetenvironment,assumethathostAwantstosendadatapackettohostB,whichcontainsfour

addresses:•

SourceMAC:HostAsMAC,known○

DestinationMAC:HostBsMAC,unknown,

howtoobtainit?○SourceIP:HostAsIP,

known○DestinationIP:HostBsIP,

known○

Therefore,ARPisneededtohelpresolvethetargetMAC•corresponding

tothetargetIP.

ARPworkflow:•

Senttoallhostsinthenetworkintheform

ofbroadcast1.OnlythehostwiththetargetIP

willrespond2.Afterreceivingtheresponse,the

hostwillsavethecorrespondingrecordinthe

ARPcache3.ChecktheARPcache:arp-a4.

CleartheARPcache:arp-d5.

PartitionCiscoCoursewarePage1

ICMP协议:InternetControlMessageProtocol,因特网控制消息协议

•用于可达性测试

•使用ping命令调用

•Type=8代表请求

•Type=0代表回应

•命令:pingip/参数:

○-t:持续,直到按ctrl+c终止

○-l数字:修改数据大小

•结果:

○成功:

文档评论(0)

1亿VIP精品文档

相关文档