 Hello and welcome friends to a lecture on address resolution protocol these are the learning outcomes by the end of the session student will be able to first explain operation of ARP and second explain each field of ARP packet format before starting this topic you may pause the video and recall terminologies like IP address hardware address I hope you have recalled the terminologies we will start off with address mapping delivery of a packet to a host or to a router requires two levels of addressing two levels of addressing includes logical addressing and physical addressing why do we need these two level of addressing first internet is made up of combination of different physical networks the devices like router and host are identified at network layer by their logical addresses and at physical layer these devices are addressed by their physical addresses so when a packet starts its journey from source to the destination it has to pass through different physical networks we need to be able to map a logical address to its corresponding physical address and vice versa why we should be able to map these addresses because suppose we have a packet which is at a network layer so it may pass through different physical networks before reaching its destination different kind of physical networks are there like ethernet and apple top or local top which is developed by apple on the same line we can say a packet traveling through the ethernet network may have may encounter the two different protocols at network layer the two different protocol may be first is IP and second may be IPX so the mapping between the logical address to the physical address can be done using static mapping and dynamic mapping in static mapping a table is created and the table is stored on each machine on the network but this has some limitations because whenever a mobile computer moves from or moves in or moves out of a network its hardware address changes whenever the machines network interface card is changed its IP hardware address changes static mapping table must be updated periodically this could affect the network performance the another mapping style is dynamic mapping in dynamic mapping whenever a machine or source machine we can say has a destination machines IP address in that scenario the source machine will use a services offered by ARP ARP is nothing but a protocol used to find the physical addresses from the logical addresses in dynamic mapping two protocols are used to map the logical addresses to physical addresses the first protocol is address resolution protocol which maps logical addresses to physical addresses and the second protocol is reverse address resolution protocol which maps physical addresses to logical addresses in this diagram figure number one you can see the position of ARP in TCP IP protocol soon ARP in TCP IP protocol soon accepts the logical addresses from a internet protocol and map those logical addresses to corresponding physical addresses once ARP map those addresses that mapping or that physical address is passed on to the data link layer okay we will see now how the address is mapped that is how the physical address is mapped to a logical address suppose system a wants to find out the hardware address or physical address of system b system a knows the logical address of system b which is 141.23.56.23 in this scene system a will generate the ARP request in ARP request IP address of system a physical address of system a and IP address of system b is included as the physical address of system b is not known that request message or packet will be broadcasted on a network once that message is broadcasted on the network every machine on the network will receive and process that request packet but only system b which is a target destination or intended destination will response with a reply packet in reply packet the IP address of system b and physical address of system b is included the reply packet is a unicast message because the system b already knows the system is IP address and physical address now we will see the packet format of address resolution protocol the first field in a packet format is hardware type this field is a 16-bit field which defines the type of physical network for Ethernet network this field contains value 1 the second field is protocol type this is also 16-bit field this field defines the type of protocol used if the protocol used is IPv4 it will contain a value which will be different from IPv6 the third field is hardware length this field is a 8-bit field this field defines the length of hardware addresses the next field is protocol length this field defines the length of logical addresses for IPv4 this field contains a value of 32 the next field is operation code this field is a 16-bit field this field indicates whether the packet is a request packet or reply packet if the packet is a request packet then this field contains value 1 and if the reply is to be sent that time this field contains value 2 the next field senders hardware address this field is a variable length field this field contains the source hardware address the next field is sender IP address this field contains the source IP address the target hardware address next field is target hardware address this field contains the target physical address but this field is only present in the reply packet the last is target IP address last field is target IP address this field contains the IP address of a target machine once the ARP maps logical addresses to corresponding physical addresses then the packet from network layer is passed on to a data link layer where it is encapsulated in a frame in figure 4 you can see that how the ARP request message or reply message is encapsulated in a frame the type field this type field indicates the data contained in this data field is ARP request or reply packet these are the references thank you