ARP Protocol
1. ARP (Address Resolution Protocol) is a protocol used to obtain the MAC address
needed for communication within the same network segment using an IP address.
2. The ARP protocol consists of 28 bytes.
- Hardware Type (2 bytes): The type of protocol used at Layer 2.
- Protocol Type (2 bytes): The address of IPv4.
- Hardware Address Length (1 byte): The length of the MAC address.
- Protocol Address Length (1 byte): The length of the IPv4 address.
- Opcode (2 bytes): Specifies whether it’s a request or reply (request is 0001, reply is 0002).
- Source Hardware Address (6 bytes): The MAC address of the source.
- Source Protocol Address (4 bytes): The IP address of the source.
- Destination Hardware Address (6 bytes): The MAC address of the destination.
- Destination Protocol Address (4 bytes): The IP address of the destination.
* Only in the Ethernet protocol is the destination information written first;
in all other protocols, the source information is written first *
Process of Transmitting a MAC Address via ARP Protocol:
1. Since the requesting device doesn't know the destination's MAC address,
it only writes the destination’s IP address and sets the MAC address to all zeros,
then proceeds with encapsulation.
2. The incapsulated data is sent via broadcasting through a switch
(the switch can only check Layer 2 protocols at this point).
3. Devices that do not match the IP address discard the request protocol.
4. The device that receives its own IP address recognizes that the request is intended for it and
becomes capable of replying.
5. The responding device, having identified the requesting device’s MAC address,
sends the reply ARP protocol directly to the requesting device without
needing to broadcast through the switch.
6. After exchanging data, the IP-MAC mapping address is registered in the ARP cache table.
7. Once registered in the ARP cache table, data transmission begins.
'Network' 카테고리의 다른 글
Network_ICMP 프로토콜, IPv4 조각화 (0) | 2024.12.29 |
---|---|
Network_IPv4 (1) | 2024.11.04 |
Network_IP (0) | 2024.09.28 |
Network_OSI Layer 2 (3) | 2024.09.09 |
Network_Packet Structure (3) | 2024.09.03 |