Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

OSI LAYER : Routing & Hardware addressing


  • Please log in to reply
2 replies to this topic

#1 AcesLight

AcesLight

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:04:00 AM

Posted 23 June 2015 - 08:12 AM

Not sure if this is the right place to ask. But I hope I get some enlightenment from you guys.

 

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."

 

bmtXc.jpg

 

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.
 



BC AdBot (Login to Remove)

 


#2 CaveDweller2

CaveDweller2

  • Members
  • 2,629 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:04:00 PM

Posted 23 June 2015 - 09:05 AM

The first scenario is correct. Provided the switch knows where Charlie is.

 

The second one - As you come down the OSI model, Layers 7 - 3, that information doesn't change. The only thing that changes is the MAC addresses. Altho Layer 1 can also change, wireless, copper, or fiber but what physical path it uses to gets there isn't really your question. So the source and destination IP addresses do not change.

 

Alice's PC would put it's MAC as the source and RouterA's(RA's) MAC address as the destination. Because it knows that to send the data that is it's default gateway. RA would receive it, look at Layer 2 see it's their MAC but when it got to Layer 3 would realize it's not for him, but knows to get to that IP it sends it out his Serial Interface. So the source MAC is his Serial interface's MAC and the destination MAC is RouterB's(RB's) serial interface. RB looks at the MAC sees it's her's so looks at Layer 3, sees that's not their address but knows to get there it should go out her ethernet interface. So she changes the source and destination MAC addresses, to her own and the Bob's PC respectively.

 

Make sense? So the tl;dr is: Layer 3 and above nothing changes. Layer 2 changes at each hop(router).


Edited by CaveDweller2, 23 June 2015 - 09:08 AM.

Hope this helps thumbup.gif

Associate in Applied Science - Network Systems Management - Trident Technical College


#3 AcesLight

AcesLight
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:04:00 AM

Posted 23 June 2015 - 11:11 AM

The first scenario is correct. Provided the switch knows where Charlie is.

 

The second one - As you come down the OSI model, Layers 7 - 3, that information doesn't change. The only thing that changes is the MAC addresses. Altho Layer 1 can also change, wireless, copper, or fiber but what physical path it uses to gets there isn't really your question. So the source and destination IP addresses do not change.

 

Alice's PC would put it's MAC as the source and RouterA's(RA's) MAC address as the destination. Because it knows that to send the data that is it's default gateway. RA would receive it, look at Layer 2 see it's their MAC but when it got to Layer 3 would realize it's not for him, but knows to get to that IP it sends it out his Serial Interface. So the source MAC is his Serial interface's MAC and the destination MAC is RouterB's(RB's) serial interface. RB looks at the MAC sees it's her's so looks at Layer 3, sees that's not their address but knows to get there it should go out her ethernet interface. So she changes the source and destination MAC addresses, to her own and the Bob's PC respectively.

 

Make sense? So the tl;dr is: Layer 3 and above nothing changes. Layer 2 changes at each hop(router).

 

Yes sir. Thanks alot for your help, i appreciate it. I still got a whole lot to learn..


Edited by AcesLight, 23 June 2015 - 11:11 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users