The OSI layering model splits the set of functionalities required for computer to computer communication into seven logical layers, as shown in the diagram given below.
The bottom two layers, namely physical and data link layers are concerned mainly with hop to hop communication (i.e for carrying the data to the next hop neighbor), by packing units of data as frames and then transmitting them through wired/wireless media as bits. These layers are therefore media (wired/wireless) dependent.
The Network layer’s primary functionality is end-to-end routing of packets from the source computer to the destination computer, through the use of next hop routing strategy.
The next four layers namely transport, session, presentation and application are actually concerned with end-to-end host specific functionalities like application specific protocols, multiplexing/demultiplexing among different applications, packetizing, encoding, flow-control etc.
The exact functionalities of each of the seven layers and the unit of data in each of the layers is summarized in the diagram below:
The tables below give example protocols for each of the seven layers