60 likes | 219 Views
Address Resolution Protocol. John Law Richard Stockton College of New Jersey. Address Resolution Protocol. Used in a computer network to map 48 bit layer 2 (Ethernet) address to a layer 3 (IP) address. 0. 8. 16. 31. Hardware type = 1. ProtocolType = 0x0800. HLEN = 48. PLEN = 32.
E N D
Address Resolution Protocol John Law Richard Stockton College of New Jersey
Address Resolution Protocol • Used in a computer network to map 48 bit layer 2 (Ethernet) address to a layer 3 (IP) address. 0 8 16 31 Hardware type = 1 ProtocolType = 0x0800 HLEN = 48 PLEN = 32 Operation SourceHardwareAddr (bytes 0 –3) SourceHardwareAddr (bytes 4 – 5) SourceProtocolAddr (bytes 0 – 1) SourceProtocolAddr (bytes 2 – 3) TargetHardwareAddr (bytes 0 – 1) TargetHardwareAddr (bytes 2 – 5) TargetProtocolAddr (bytes 0 – 3)
ARP – ADDRESS RESOLUTION PROTOCOL The originating host machine generates an ARP with a MAC source address of itself and a MAC broadcast address (FF-FF-FF-FF-FF-FF) as the destination address. The IP source address is the machine and the destination IP address is the correct destination. Hello everyone, I am 172.31.1.10. Who is 172.31.1.12? ARP 172.31.1.10 172.31.1.11 172.31.1.12
ARP – ADDRESS RESOLUTION PROTOCOL The switch sees that the destination is a broadcast so it duplicates the frame and sends it out all ports (except the originating port). The switch also “learns” the MAC of the source machine and records it in a table along with the port that the address is associated with. ARP ARP 172.31.1.10 172.31.1.11 172.31.1.12
ARP – ADDRESS RESOLUTION PROTOCOL Every machine processes the frame and passes it to its IP stack. The machine Who is 172.31.1.12 responds back with an arp reply. The source MAC is itself and the destination MAC is the other machine. The ARP Reply includes the IP of 172.31.1.12. The switch knows the MAC of the 172.31.1.10 machine and now learns the MAC of the 172.31.1.12 machine. ARP Reply 172.31.1.10 172.31.1.11 172.31.1.12
Now both machines know how to reach each other, with the help of the switch and data can flow between them freely without the need for additional ARP requests. Frames use the proper source and destination MAC for each piece of data. Data 172.31.1.10 172.31.1.11 172.31.1.12