Can someone please explain SSL/TLS belongs to which OSI layer. I have been looking through many sites and all of them have different options of Application, Presentation and Session.
Unfortunately, questions about protocols above OSI layer-4 are explicitly off-topic here. You could try to ask this question on Server Fault for a business network, or on Super User for a personal network.– Ron Maupin ♦May 8, 2018 at 0:52
Layer 1 is responsible for transferring bits across a wire -- SSL/TLS does not fit in this category.
Layer 2 is responsible for hop-to-hop delivery -- SSL/TLS does not fit into this category.
Layer 3 is responsible for end-to-end delivery -- SSL/TLS does not fit into this category.
Layer 4 is responsible for service-to-service delivery -- SSL/TLS does not fit into this category.
Which leaves the ambiguous trifecta of the application -- SSL/TLS is an application layer protocol (L5-L7).
Each application (FTP, TFTP, DNS, HTTP, Telnet, etc...) does L5-L7 differently -- so trying to distinguish between what exactly happens at L5 vs L6 vs L7 is less productive. Hence, often, Network Engineers simply refer to L5+ as the application and we leave it at that.
I think SSL is an interesting one which is not exactly obvious, judging from your own research. The most specific answer here (think certification exam) is available from recommendation X-200 from the ITU-T
ITU-T X-200 recommendation Open Systems Interconnection Basic Reference Model
By looking at the behaviors of SSL, we have encryption/decryption and also an exchange of traffic between two endpoints for compatibility and key calculation.
Layer 6 is for encryption/decryption, and Layer 5 includes managing a communication session in the form of back and forth transmissions between two nodes. The protocol using SSL would be something like HTTP which sits in Application layer, it is the thing SSL is encrypting/decrypting data for
Therefore, SSL is both layer 5 and 6 (but not 7).
Edit1 for more better words.
SSL was developed long after OSI was ratified and already replaced by TCP/IP. While one can "fit it" into the model, SSL wasn't developed with the model in mind. May 8, 2018 at 0:33
The OSI model has not been replaced, or supplanted. There are competing point of views, i agree. If you take a common Cisco cert exam, they still use it. All the TCP/IP model does is simplify the upper 3 layers since this isn't relevant to a router in most cases. May 8, 2018 at 0:48