search
HomeOperation and MaintenanceWindows Operation and MaintenanceDetailed explanation of the workflow of ARP address resolution protocol

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     静态        
……

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
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

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools