In: Electrical Engineering
a. In an IPv4 environment, if a host on a LAN is about to send an IP packet to another host on the same LAN, how does it know the MAC address of the interface card of the destination host? What is the protocol which is used to obtain the MAC address?
b. If a host is moved to another LAN, connected to a different router, will its MAC address be the same? Explain why.
Answer :- a.) ARP protocol is used in IPv4 to get the MAC address(Medium Access Control address) of a LAN. Each LAN has its own MAC address and this is same as the physical address or the ethernet address. MAC address is composed of 48 bit or six hexadecimal digits, separated by colons or dashes.
MAC addresses are only used and needed on a LAN segment. Your host only has to know the MAC address of the default router, which must be on the same LAN. It gets that by knowing the IP address and then from doing an ARP (Address Resolution Protocol) broadcast and remembering the answer in ARP cache. From that point, all packets out are sent to the MAC address of the router.
b.) Yes, if host has moved to different LAN connected to different router then the MAC address changes. MAC address is unique to network device(ethernet, router etc.) wanting to utilize TCPIP network or LAN or WLAN service. It is "burnt into" the device by manufacturer of the device or Card.