Home Operation and Maintenance Windows Operation and Maintenance Detailed explanation of the workflow of ARP address resolution protocol

Detailed explanation of the workflow of ARP address resolution protocol

Dec 11, 2020 pm 07:30 PM
arp

We know that if two hosts want to communicate with each other, they both need to have an IP address, and they also need to know the IP address of the other party. So can we communicate with an IP address? Not yet, you still need the other party's MAC address to communicate. The MAC address and IP address are indispensable. Let's look at how to find out the other party's MAC address once we know the IP address of the other party's host.

Each host has its own arp cache list, which stores the mapping relationship between the IP addresses and Mac addresses of other hosts in the LAN. You can enter `arp -a in the command window to view the arp cache of this host.

arp -a
接口: 192.168.110.145 --- 0x13
  Internet 地址         物理地址              类型
  192.168.110.1         30-0d-9e-61-27-3a     动态        
  192.168.110.255       ff-ff-ff-ff-ff-ff     静态        
……
Copy after login

When host A on the LAN (IP is 192.168.1.11) wants to communicate with host B on the same LAN, after knowing the IP address of host B (192.168.1.13), it will check its own arp cache , see if there is the MAC address of host B. If so, you can communicate with host B. If not, the ARP address resolution protocol must be used to obtain the MAC address of host B. Let's take a look at the workflow of arp:

(1) Host A sends a broadcast packet within the LAN. The message content is similar to: "I am 192.168.1.11, and the mac address is a0:a4:ce:42: 29:56, I want to know the MAC address of 192.168.1.13".

(2) All hosts running the arp program on this LAN can receive the broadcast message.

(3) The IP of host B matches, the request is accepted, and the mapping relationship between the IP and MAC address of host A is recorded in the remembered arp cache. Then send a unicast packet to host A with content similar to: "I am 192.168.1.13, and my MAC address is f1:21:fa:c2:d2:ad".

(4) Host A receives the unicast message from B and records the relationship between host B’s IP address and MAC address in its own arp cache.

Note that because the LAN host changes dynamically, the ARP cache has a survival time and will be automatically deleted when it expires.

You may have questions. What you are talking about is only the situation of hosts in the LAN. What if they are on different network segments? In fact, it is still obtained through ARP, but multiple ARP requests are required.

The above is the detailed content of Detailed explanation of the workflow of ARP address resolution protocol. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1669
14
PHP Tutorial
1273
29
C# Tutorial
1256
24