ARP, which means Address Resolution Protocol, is needed in LAN and WAN structures. It helps find the hardware address linked to an IP address. This hardware address is the MAC info for the Ethernet port. It works in the link layer, which is essential.
This protocol helps devices in a local IP network talk to each other. It does this quickly by using specific MAC addresses assigned to devices. But it ensures that data is sent correctly to where it needs to go in the network.
What is the Role of ARP Protocol in Local Network Communication?
In simple terms, ARP is a way to send data in Ethernet networks. This protocol ensures that IP data frames are sent only to the intended destination PCs.
It mainly works with the IP protocol because IPv4 has a limited length. So, IPv4 cannot store the physical addresses of devices.
In this case, the ARP protocol is like a helper. It stores and manages hardware address information for local networks. For example, it jumps into action in four different situations. It helps two PCs communicate better.
- First, when two PCs are on the same network, the ARP protocol steps in. It helps one PC send a message to the other easily.
- Second, things get more complicated if two PCs are on different networks. They need assistance to reach another PC through a gateway/router.
- Third, when a router wants to send a message to a PC in the same local network, it helps ensure the message goes through smoothly.
- The fourth situation occurs when a router sends a message to a PC on the same network. It is involved here as well, guiding the packet to its destination.
ARP Protocol History
Today, ARP helps devices chat smoothly on local networks. ARP has advanced quickly as the Internet has grown and become essential to how networks work.
This protocol came about thanks to computer scientists at Stanford University. In the 1980s, they were working on a way to help PCs locate and talk to each other on IP networks.
To sum it up, its main job is to link the IP addresses given to devices with their actual hardware MAC addresses.
After these advancements, David C. Plummer released the official document of the ARP protocol in 1982, known as RFC 826. The first version outlined the workings of the protocol and the process of creating frames.
When ARP first began, people mainly used it for local network communication. But as needs changed, it found its way into different situations. That’s why various types of it, like the ones below, came into play:
- Proxy ARP
- Gratuitous ARP
- Reverse ARP (RARP)
- Inverse ARP
As these types appeared, network administrators became more concerned about security. It adapted to IPv6, making data more secure. However, in IPv6 networks, it was replaced by the Neighbor Discovery Protocol (NDP).
ARP Features
It has some basic features because it helps devices on a network communicate:
- Address Resolution
In a network, every device has its own MAC address. When machines talk to each other, it helps match the IP address with the MAC (Media Access Control) address. This way, it diligently ensures the data goes precisely where it should.
- Broadcast Communication
ARP uses a broadcast message on the local network to find the MAC address connected to an IP address. When a device with the correct IP address hears this broadcast, it sends a Reply message. This Reply message lets two devices talk to each other.
- Learning and Caching
The Address Resolution Protocol (ARP) saves the info it collects in a cache or table. This helps cut down on network traffic. This means that it doesn’t always have to keep searching for the same device with the same IP address. So, it doesn’t have to keep sending broadcast messages, which would otherwise make the network crowded.
- Compatible Protocol
ARP finds all the devices on the network by itself and notices when things change. This makes it suitable for networks that get updates because it keeps everything running continuously.
- Processing Independence
This protocol keeps working all the time, even if some devices on the network are not connected. It does this independently and makes a network map to ensure smooth communication.
- IPv4 and IPv6 Support
It initially supported only the IPv4 protocol. However, as technology advanced and needs grew, it changed to work with IPv6, too, and they called it NDP (Neighbor Discovery Protocol) to fit the new requirements.
What is the ARP Table?
The Address Resolution Protocol keeps a table that stores the IP and MAC addresses of all devices on a network. The table quickly sends data on the net and tells us about devices. So it can move data smoothly and learn about the network devices simultaneously.
Before a PC sends data to another place, it looks at the table. So, it is good at matching IP and MAC addresses. Because of this, data routing is accurate and dependable.
When a PC gets a new IP, it broadcasts widely. This ensures messages reach the right recipient. Thus, it finds the desired IP for a successful connection.
Later, the computer replies with the matching IP address. It sends its physical address. PC A adds it to the ARP table. However, PC A may remove entries occasionally due to network changes.
For instance, if a NIC card breaks and needs replacement, entries might be lost if the IP changes.
How Does the ARP Protocol Work?
This protocol checks IP in the local network and matches MAC. If the same network, it controls the ARP cache for info.
If IP has a physical address, it’s in the table. However, if there is no address, it sends a Request to the network.
The Request, which the sender starts, goes to everyone. So, the protocol marks the recipient as FF:FF:FF:FF:FF:FF, which means all.
Afterward, each computer checks the broadcast message for a matching IP. If it matches, it sends a reply with the same IP.
In this process, the PC in another network sends a Request. It asks a router or gateway for help. So, when a computer needs help to talk to others far away, it asks for a special helper called a router or gateway.
It gets the data packet and finds the address. After that, it sends the data to the computer. It looks at the IP info to get the correct data. So, the router or gateway helps the computer send messages to the right place. If the computer is close to another subnet, it works well. Communication happens quickly, and everything is okay.
If the PC you’re trying to talk to is far away in a different LAN, ARP uses a routing table to find the way to send the data. Otherwise, it keeps sending the data repeatedly until it reaches the right place or until the TTL (Time to Live) runs out.
ARP’s job is to connect MAC addresses, and it can do that by itself on MS Windows, Linux, or macOS PCs, no matter which one you’re using.
What are the ARP Types?
The Address Resolution Protocol comes in different types for different situations:
- Classic ARP (IPv4)
This type is the most common in IPv4 networks. As we discussed, it’s about matching IP addresses with MAC addresses.
- Proxy ARP
It is a type that helps PCs in different subnets talk to each other. It lets one device act like another device’s IP and MAC address. Also, it uses a server to help requests find computers in two separate networks.
- Gratuitous ARP
This unique setup lets a device quickly tell others when it changes its IP address. Instead of waiting for other devices’ responses, it allows them to know about their new address.
- InARP (Inverse ARP)
Particular types of networks, like ATMs, use a method called InARP. This protocol determines the addresses of ATM devices and matches them to their IP addresses.
- RARP (Reverse ARP)
RARP does the opposite of address resolution protocol. It finds MAC addresses and matches them to IP addresses. However, there are more commonly used methods in modern setups.
- NDP (Neighbor Discovery Protocol)
It’s a new way, like an upgrade from ARP, but for IPv6 networks. It does similar things but with some differences in how it sends messages. For instance, ARP broadcasts messages, while NDP uses multicast and anycast messages.
Uses of Address Resolution Protocol
If we want to talk about when ARP is helpful, it’s a big help for system and network folks. The best places to use it include:
- Networking
Its main job is helping devices talk in a network. Devices use IP and MAC addresses. Thus, it ensures devices reach each other in the LAN. So, it’s like a special helper that lets all the devices in a group talk to each other easily.
- IPv4 and IPv6 Communication
It excels in making devices communicate in IPv4 and IPv6 networks. It expertly helps devices talk in networks using these systems.
- LAN and WLAN Communication
They function effectively in wired and wireless structures. This includes Wi-Fi setups as well.
- Network Security
They make things safer by handling requests, including tackling ARP Spoofing attacks.
- Network Debugging
They can use it to discover and resolve LAN issues proactively. For instance, when devices can’t communicate, check the table for clues.
Address Resolution Protocol Analysis on the Same Network
If we look at how ARP works, device A in the same network wants to send a message to B. First, it checks its table. Suppose it can’t find a physical address connected to the IP address in the table. In that case, A sends a message to everyone on the network to see B.
When computer B sees its IP address in the message, it writes down the MAC address of computer A.
So, the information in the Ethernet and ARP frames for PC A will be like this:
As a result, the Ethernet and frame of computer A will be as follows.
Address Table Analysis over Remote Network
When ping from A on LAN1 to C on LAN2, A first checks its table. If A doesn’t find a record in its table, it sends a broadcast to the entire network. However, since the target, C, is in a remote network, the destination address in A’s frame will be 192.168.1.1.
The Switch0 sends this broadcast to the router in LAN1 because it doesn’t know the IP of the Router’s FastEthernet port. After resolving the address, the Router in LAN1 sends the broadcast to the Router in LAN2.
As a result, the Router in LAN1 sends broadcasts to the directly connected networks. Additionally, it learns the physical address of computer C and records it in the MAC table.
Address Resolution Table of PC A and Routers in Analysis
In conclusion, the ARP table of computer A will look like this:
C:\>arp -a
Internet Address Physical Address Type
192.168.1.1 000c.cf93.8401 dynamic
C:\>
The table of computer C will look like this:
C:\>arp -a
Internet Address Physical Address Type
192.168.1.1 000c.8532.0801 dynamic
192.168.2.1 000c.8532.0801 dynamic
C:\>
The table of the Router in LAN1 will look like this:
Router#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.1.1 - 000C.CF93.8401 ARPA GigabitEthernet0/0
Internet 192.168.1.2 32 00E0.B0C1.3206 ARPA GigabitEthernet0/0
Internet 192.168.1.3 1 00D0.BC36.B360 ARPA GigabitEthernet0/0
Router#
A router on LAN2 will have these entries:
Router#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.2.1 - 000C.8532.0801 ARPA GigabitEthernet0/0
Internet 192.168.2.2 33 000C.85C4.7705 ARPA GigabitEthernet0/0
Router#
You can better understand how this protocol works by using the Cisco Packet Tracer program. Additionally, you can open the command prompts for computers A, B, and C and examine the table using the ‘arp -a’ command. If you want to restart the test, you should use the ‘arp -d’ command to clear the tables of these PCs.
You can use the ‘show arp’ command to view the records of the Routers in LAN1 and LAN2. If you want to delete these records from the router, execute the ‘clear arp-cache’ command.
In this example, the Ethernet and frames of computer A will look like this:
Packet Structure
The Address Resolution Protocol makes devices talk to each other using packets. But it has different ways of doing it, and you can see them in the table below:
Reply: 2
Frequently Asked Questions About ARP (FAQ)
- What is the address resolution protocol format?
Packets of this protocol have a header with these parts:
- Destination MAC Address
- Destination IP Address
- Source MAC Address
- Source IP Address
- Transaction Type (For example, Request or response)
- What is an example of resolution?
- What is the ARP protocol, and how it works?
- What are the four types of ARP?
It has the following four types:
- Request: Asks for the MAC corresponding to an IP address of a device.
- Reply: Responds with the MAC corresponding to an IP address of a machine.
- RARP: Asks for the IP address corresponding to the MAC address of a device.
- InARP: Asks for the IP addresses of connections in an ATM network.
- What is the difference between TCP and ARP?
The key distinctions between them are:
- TCP manages data transmission and control, while the other converts IP to MAC addresses.
- The Transmission Control Protocol operates at the transport layer. In contrast, the other works at the network layer.
- TCP helps data flow for better contact. The other handles device physical addresses in the network.