Home  >  Article  >  Which layer does the arp protocol belong to?

Which layer does the arp protocol belong to?

青灯夜游
青灯夜游Original
2019-02-27 14:10:5968276browse

The arp protocol belongs to the IP layer (network layer) in the TCP/IP model and the link layer in the OSI model. The arp protocol, the address resolution protocol, is a TCP/IP protocol that obtains a physical address based on an IP address. It can solve the mapping problem of IP address and MAC address of the host or router in the same LAN.

Which layer does the arp protocol belong to?

The arp protocol, also known as the address resolution protocol, is a TCP/IP protocol that obtains a physical address based on an IP address. It can solve the mapping problem of IP address and MAC address of the host or router in the same LAN.

The OSI model divides network work into seven layers. The IP address is on the third layer of the OSI model, and the MAC address is on the second layer. They do not interact directly with each other. When sending IP data packets through Ethernet, it is necessary to encapsulate the headers of the third layer (32-bit IP address) and the second layer (48-bit MAC address). However, since only the target IP address is known when sending, its MAC address is not known. , and cannot span the second and third layers, so the address resolution protocol needs to be used. Using the arp protocol, the target hardware address (MAC address) information can be parsed based on the IP address information in the network layer IP packet header to ensure smooth communication.

ARP spoofing (security risk)

#The arp protocol is based on mutual trust between hosts in the network. Hosts on the network You can send ARP reply messages autonomously. When other hosts receive the reply message, they will not check the authenticity of the message and record it in the local ARP cache. From this, the attacker can send a fake ARP reply message to a certain host. text, so that the information sent cannot reach the expected host or reaches the wrong host, which constitutes an ARP spoofing.

ARP spoofing can cause the target computer to fail to communicate with the gateway, and can also cause communication to be redirected. All data will pass through the attacker's machine, so there is a huge security risk.

How to defend?

● Don’t build the network security trust relationship based on IP or MAC (RARP also has the problem of spoofing). The ideal relationship should be based on IP MAC.

● Set up a static MAC-->IP correspondence table, and do not let the host refresh the set translation table.

● Unless necessary, stop using ARP and save ARP as a permanent entry in the corresponding table.

● Use ARP server. Use this server to look up its own ARP translation table to respond to other machines' ARP broadcasts. Make sure this ARP server is not hacked.

● Use "proxy" to proxy IP transmission.

●Use hardware to shield the host. Set up the routing to ensure that the IP address can reach the legal path (statically configure routing ARP entries). Note that using switching hubs and bridges cannot prevent ARP spoofing.

● The administrator periodically obtains a RARP request from the response IP packet, and then checks the authenticity of the ARP response.

● The administrator polls regularly to check the ARP cache on the host.

●Use a firewall to continuously monitor the network. Note that when SNMP is used, ARP spoofing may cause trap packets to be lost. [6]

●If you are infected with ARP virus, you can solve it by clearing the ARP cache, specifying ARP correspondence, adding routing information, and using anti-virus software.

The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !

The above is the detailed content of Which layer does the arp protocol belong to?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn