I want to understand differences with hosts transmitting data to another host within a local LAN and hosts sending data to another host in a remote LAN. A book I was reading quoted this"
"...understand that routers, which work at Network layer, don't care about where a particular house is located. They're only concerned about where networks are located and the best way to reach them."
Another part says:
"...Each time a packet is sent between routers, the Data link layer uses hardware addressing. Each time a packet is sent between routers, it's framed with control information at the Data Link later. However, that information is stripped off at the receiving router & only the original packert is left completely intact. This framing of the packet continues for each hop until the packet is finally delivered to the correct receiving host."
Using the diagram above as reference, I have some questions in mind:
Is it correct to say that, when Alice wants to transmit data to Charlie, the process is as such:
- Alice's packet will contain Alice IP address (SOURCE), and Charlie's IP address (DESTINATION). This info is passed onto the data link layer.
- At the Data link layer, Alice MAC addresses (SOURCE) and Charlie's MAC address (DESTINATION) are added.
- The data will be transmitted to SWITCH A. SWITCH A checks the destination MAC address and since SWITCH A knows where Charlie is located, it passes the data to the respective interface that Charlie is connected to.
- Charlie will inspect the destination MAC address to see if its correct. If it's correct it will pass the data to the network layer
- At the network layer, the DATA LINK layer information is being stripped off and Charlie check the Destination IP address. If it's correct Charlie will accept the data.
Is that correct?
When Alice wants to send data to a host in a remote LAN, in this case, Bob,
Does Alice put the DESTINATION IP ADDRESS as the ROUTER A IP ADDRESS (Router A is the default gateway)? Because Alice does not know the IP Address of Bob, and only the remote router B knows it.
Is the destination MAC address the MAC address of BOB's Computer? or MAC address of the interface of switch A that Alice is connected to?
Does that mean that when the Data is transmit from Router A to Router B, the MAC Addresses in the data is ignored, and the router cares about the IP address, to know where to route the data to?
I hope my questions make sense. I'm trying to get my fundamental right before going to advance topic. Sorry if my English is bad.