Протокол ARP | Курс "Компьютерные сети"
Introduction to ARP Protocol
Overview of ARP
- The lecture introduces the Address Resolution Protocol (ARP), which is essential for resolving IP addresses to MAC addresses in a network.
- It highlights that while we interact with computers using IP addresses or domain names, data transmission relies on technologies at lower levels, such as Ethernet switches that utilize MAC addresses.
Need for ARP
- A simple method to map IP addresses to MAC addresses is through a correspondence table; however, this approach fails in large networks.
- ARP automates the process of determining a computer's MAC address based on its known IP address through a request-response mechanism.
How ARP Works
Request and Response Mechanism
- When a computer needs to find the MAC address corresponding to an IP address, it sends an ARP request broadcasted to all devices in the network.
- The device with the matching IP responds with its MAC address, allowing the requester to use it for data transmission.
Structure of ARP Packet
- The format of an ARP packet includes fields for network type, protocol type, lengths of local and global addresses, operation code (request or response), and sender/receiver information.
- The operation code distinguishes between requests (1) and responses (2), while sender details help identify where replies should be sent.
Limitations of ARP
Subnet Restrictions
- Since ARP operates below the network layer, packets do not traverse routers; thus, it can only resolve MAC addresses within the same subnet.
- Broadcast traffic does not pass through routers; therefore, devices outside a subnet cannot receive or respond to an ARP request.
Caching and Table Management
Storing Resolved Addresses
- Once a MAC address is found via ARP, it is cached in an "ARP table" on the sender's machine to avoid repeated requests.
- The table consists of three fields: IP address, corresponding MAC address, and entry type (static or dynamic).
Types of Entries
- Static entries are manually added and remain until deleted; dynamic entries expire after some time to accommodate changes in network configurations.
Optimizations in ARP Usage
Voluntary Requests
- A voluntary or unsolicited ARP request allows a device to announce its new IP address quickly across the network.