In this video, I explain how local traffic uses MAC addresses to reach the correct location.
在这个视频中,我解释了本地流量如何使用MAC地址到达正确的位置。
看完视频后,在TCP/IP指南中回顾一下这些主题:
地址解析的概念和问题
The Need For Address ResolutionAddress Resolution Through Direct MappingDynamic Address ResolutionDynamic Address Resolution Caching and Efficiency Issues地址解析的需要地址解析通过直接映射动态地址解析动态地址解析缓存和效率问题
TCP/IP地址解析协议(ARP)
ARP Overview, Standards and HistoryARP Address Specification and General OperationARP Message FormatARP CachingProxy ARPARP概述、标准和历史ARP地址规范及一般操作ARP消息格式ARP缓存代理地址转换协议
>> After determining that the traffic is local,the source needs the MAC address of the destination.
>>确定流量为本地后,源需要目标的MAC地址。
The source puts the actual traffic on hold and sendsout a broadcast message using a protocol known as ARP, address resolution protocol.
该源将实际流量暂停,并使用名为ARP的地址解析协议发送广播消息。
ARP is meant to resolve a known IP address to the MAC address that it is bound to in software.
ARP是用来将一个已知的IP地址解析为它在软件中绑定到的MAC地址。
The message in the ARP request explains that host A 10.10.1.1 is lookingfor them MAC address of 10.10.1.2.
ARP请求中的消息解释说,主机A 10.10.1.1正在寻找10.10.1.2的MAC地址。
All devices on the network not only see this ARP request but they read it as well.
网络上的所有设备不仅能看到这个ARP请求,还能读取它。
Every device but the actual destination says that's not for me and discards it.
除了目的地以外的所有设备都说不适合我,然后就扔掉了。
Host B 10.10.1.2 sends an ARP reply back to host A 10.10.1.1.
主机B 10.10.1.2向主机A 10.10.1.1发送ARP应答。
The ARP reply is unicast, which means it only goes to 10.10.1.1and is not broadcasted to everyone on the network.
ARP的回复是单播,即只播到10.10.1.1,不向网络上的每个人播放。
In the ARP request, the source listed its MAC address so the destination didn't needto broadcast to find out the sources MAC address.
在ARP请求中,源列出了它的MAC地址,因此目的地不需要广播就可以找到源的MAC地址。
Broadcast on networks are bad.
在网络上广播是不好的。
Hosts have to interrupt what they're doing and parse through the broadcastand most cases realize that it's not even meant for them.
主机不得不中断他们正在做的事情,并解析广播,大多数情况下意识到这甚至不是为他们准备的。
It's like a professor e-mailing a 500 page PDF to the class with the subject line read thisand the name of a single student who it was meant for appearing on page 499.
这就像一位教授给全班同学发了一封500页的PDF邮件,邮件的主题是阅读这篇文章,还有一位学生的名字,而这篇文章原本应该出现在499页上。
Unfortunately, in the world of IPv4, there is no other way to do this.
不幸的是,在IPv4的世界中,没有其他方法可以做到这一点。
After the ARP reply comes back to host A with host B's MAC address,host A can now fill-in the destination's MAC address and send the traffic.
当ARP应答通过主机B的MAC地址返回到主机A后,主机A现在可以填写目的地的MAC地址并发送流量。
The source and destination MAC addresses are two of the fields foundin the layer 2 frame while the sourceand destination IP addresses are a couple of the fields in the IP packet.
源和目标MAC地址是在第2层帧中找到的两个字段,而源和目标IP地址是IP包中的两个字段。
转载于:https://www.cnblogs.com/sec875/articles/10344643.html
相关资源:JAVA上百实例源码以及开源项目