How OSI reference model works?

mbreslin1954

Distinguished
Nov 27, 2010
136
0
18,660
Layer 1 is the physical media, the electrical signals required to pass data through a medium, such as Ethernet. Layer 2 is the logical protocol to passing packets or data across the physical media. Again, in Ethernet, layer 2 specifies the structure of the Ethernet packets, such as destination address, source address, checksum or CRC at the end. Layer 3, in the case of Internet, is the IP layer, or Internet Protocol. It's job is routing and it is the first layer that is aware of multiple networks.

Layer 4 is TCP, or Transmission Control Protocol, and manages "pipes" between nodes in the network. For instance, two computers could open a TCP pipe between themselves and multiple applications could share that same pipe (e.g., FTP). I don't believe the modern Internet does much with layers 5-6. Pretty much everything is layer 7 (the application layer) on top of layer 4 (TCP). But it's been 25 years since I've worked with the OSI model so I could be mistaken.

Think of each layer as adding an envelope to the process. For instance, layer 3 (IP or routing), takes the layer 4 information and treats it as data, puts the routing information on it (layer 3 addressing info), then hands it down to layer two. Layer 2 treats everything so far as data and puts layer 2 addressing information on the packet (source, destination, CRC), then hands it off to the physical layer (2), which then lays the electrical signals on the wire. At the receiving end, layer 2 takes the Ethernet packet from the wire, strips off the layer 2 addressing info and hands it on to layer 3. If the message is at the end node (instead of an intermediate router), then layer 3 strips off its addressing/routing information and hands the data packet to layer 4, which then strips off its addressing information and hands it on to the application layer (FTP, web browser, whatever).


takes the Ethernet packet from layer 2, which layer 3 treats as data, and adds routing information to it in order to get it to the network where the destination node resides. Layer 4 treats everything up to that point, through layer 3, as data, and opens up a connection to another node at the layer 4 level and hands the data off to the other end. So each layer treats the lower layer