In: Computer Science
Computer A is sending a packet to Computer B, and the network topology says it must go through Switch A, then a router, the Switch B, and then the packet reaches switch B. I'm trying to describe this process of sending the packet with OSI model. My book says switches are layer 2 and routers are layer 3. If the packet is traveling down the OSI model from application to physical, how does it go through the router before the switch. Please explain with emphasis on how the OSI model comes into play. Thank you!
The OSI model is a communication model with seven layers that are: Physical layer, data link layer, network layer, transport layer, session layer. the presentation layer, and application layer.
Now the physical layer contains the cables, the data link layer contains the switches and the network layer contains the packets that are used for communication. So, as the situation says to send packet from computer a to computer B, now first it will go through the physical layer through the cables and then to switches i the data link layer, Now on the receiver sides the packets are received at network layer so here comes the router use as the router routes the packet to destination, then it goes to switches on receiver side and finally to the physical layer.
So, as you asked it goes through the router first as the router routes the packet in the network layer and then it goes to the data link layer.
------------------------------------------------------Please upvote-----------------------------------------------------------------------------------