I have to teach my sixth form about MAC Addresses and IP Addresses in a few weeks time and there are some areas I am unclear on which I am hoping some of you will be able to clarify for me. I have enough to get them through the syllabus, but I like to have more knowledge than the spec so that I can explain how things work in more meaningful way.
So as I understand it the following happens when a device on a LAN sends a packet/frame to a device on another separate LAN via the internet.
A packet is created at the sending end with the destination and sending IP
First question: Is the destination IP actually the IP of the gateway for the receiving device’s LAN
This is then turned into a frame which will go to the gateway for the LAN - this happens at the data link layer and the frame has a MAC sending and destination address added
First question: The destination MAC address - is this the final destination or the destination of the gateway?
The packet/frame is then sent onto the internet and routed (using the IP address) to the next hop towards the final destination
Second question: At each hop, does the data link layer change the destination MAC address in the frame to the MAC address of the next hop?
The packet/frame is routed to the destination address (which is the gateway )
Third question: Once the frame/packet reaches the gateway of the receiving LAN is the destination MAC address in the frame used by a switch to ensure it ends up at the correct device? This obviously assumes that the destination MAC address is not amended by the routers as the frame/packet traverses the internet - if it is amended then once the receiving gateway receives the frame/packet, how does it know where to send it?