arp地址解析协议工作原理
Address Resolution Protocol (ARP) is auxiliary protocol used by Internet Protocol (IP). ARP is defined with RFC826 and gained main stream over computer networks. ARP is used to resolve IP address with MAC or hardware address of the network interface. As we know MAC address is used to identify nodes in a local network.
地址解析协议(ARP)是Internet协议(IP)使用的辅助协议。 ARP由RFC826定义,并通过计算机网络获得了主流。 ARP用于解析带有MAC的IP地址或网络接口的硬件地址。 众所周知,MAC地址用于标识局域网中的节点。
ARP如何工作 (How ARP Works)
ARP resolution works very simple way. The source creates requests to get MAC address of the destination system. And the request is replied by the destination system by providing its IP address. In the following example we will examine a request for IP address 192.168.155.2 and reply from this IP address.
ARP解析的工作方式非常简单。 源创建请求以获取目标系统的MAC地址。 然后,目标系统通过提供其IP地址来答复请求。 在以下示例中,我们将检查对IP地址192.168.155.2的请求,并从该IP地址进行回复。
We will use following command in a Ubuntu linux box to print ARP packets in a verbose manner.
我们将在Ubuntu Linux框中使用以下命令以详细方式打印ARP数据包。
$ sudo tcpdump arp -XXX
We can see following conversation.
我们可以看到以下对话。
ARP, Request who-has 192.168.115.254 tell ubuntu
ARP, Reply 192.168.115.254 is-at 00:50:56:ea:83:e2
协议解析类型 (Protocol Resolution Types)
As ARP is a simple protocol there is very little Protocol Resolution Types. We have all ready examined two of them.
由于ARP是一个简单的协议,因此协议解析类型很少。 我们已经准备好检查其中的两个。
- ARP Request ARP请求
- ARP ResponseARP响应
- RARP RequestRARP请求
- RARP ResponseRARP响应
We will detailed the RARP in the following parts.
我们将在以下部分中详细介绍RARP。
免费ARP (Gratuitous ARP)
ARP protocol can be used for different purposes. One of them is to defend and own selected IP address. A node can check its previous IP address with a gratious ARP request. This will create an ARP request for its own IP address.
ARP协议可用于不同目的。 其中之一是捍卫并拥有所选的IP地址。 节点可以通过免费的ARP请求检查其先前的IP地址。 这将为其自己的IP地址创建一个ARP请求。
代理ARP (Proxy ARP)
Proxy ARP is used to relay ARP packets to the other segments of the network. Normally ARP will be broadcasted to the current network segment but this may limit ARP request in some network topology where L2 segmentation exist. We can configure gateway or similar devices to relay ARP and act like a Proxy to the other part or segment of the network. Proxy ARP is considered a security issue because of the original node do not answer the ARP request.
代理ARP用于将ARP数据包中继到网络的其他网段。 通常,ARP将广播到当前网段,但这可能会限制存在L2分段的某些网络拓扑中的ARP请求。 我们可以将网关或类似设备配置为中继ARP,并充当网络另一部分或网段的代理。 代理ARP被认为是安全问题,因为原始节点不回答ARP请求。
反向ARP或RARP (Reverse ARP or RARP)
In a normal scenario ARP is used to resolve MAC address by using IP address. But in some cases we may need to resolve IP address from MAC address. This can be accomplished by using Reverse ARP a.k.a. RARP. As stated previously there is Request and Response which is the same of the ARP protocol .
在正常情况下,ARP用于通过IP地址解析MAC地址。 但是在某些情况下,我们可能需要从MAC地址解析IP地址。 这可以通过使用反向ARP或RARP来完成。 如前所述,请求和响应与ARP协议相同。
- RARP Request RARP请求
- RARP ResponseRARP响应
翻译自: https://www.poftut.com/what-is-address-resolution-protocol-arp-and-how-it-works/
arp地址解析协议工作原理