PDA

View Full Version : transport vs. session layer


jes
05-21-2010, 03:08 AM
I think that I understand most of the OSI layers but I don't really understand the difference between the session and transport layers. My Train Signal program says that the session layer is the manager of the two-way communication and that it handles the maintenance creation and tear down of communications between two hosts and then he says that the transport layer is to establish an end-to-end connection between two systems. Isn't that the same thing with different words?

Paul Komski
05-21-2010, 05:18 AM
One can argue about how distinct any of the "layers" actually are but transport and sessions are distinctly different.

http://lecturer.eepis-its.edu/~sragen/Images/Osi-model.png

Up to the transport layer all the "physical bits and packets" are assembled ready for data delivery. The session layer is the first to really handle the data as "usable data" but is required because more than one thing is likely to be going on simultaneously. Thus "sessions" are organised that keep the processes distinct.

Microsoft's own take on the 7 layers (http://support.microsoft.com/kb/103884) is not a bad one.

jes
05-21-2010, 11:35 AM
I see, but what of this quote:
My Train Signal program says that the session layer is the manager of the two-way communication and that it handles the maintenance creation and tear down of communications between two hosts and then he says that the transport layer is to establish an end-to-end connection between two systems.

jlreich
05-21-2010, 12:19 PM
They both have to do with end-to-end connections, difference is that the transport layer handles the error checking and making sure all the sequences are correct and other things having to do with reliability. The session layer handles all the stuff in between, such as security, handshaking, logging on, etc.

It may help to understand that each layer from top to bottom adds its own data encapsulating the previous layer. The pertinent layer cares nothing for the data it encapsulates other than doing its own job, which is to pass on the data to the next layer so it can do its thing.

On the other end the process is reversed, from bottom to top, once the data is received by each layer and it has served its function it removes its data and passes it on to the next layer.

Hope that helps.

jes
05-21-2010, 01:56 PM
Then my Train Signal program worded it poorly when it said that the transport layer "establishes" the two-way link. Bad Cris Bryant, bad!

Does the session layer on the local side work with the session layer on the remote side to establish the link and then pass the ball back to the transport layer to worry about reliability?

Variable
05-21-2010, 05:08 PM
Think of a duet - two people singing the same song. The Session is the song. The Transport is the language. That should help you answer your questions.

jes
05-24-2010, 01:27 PM
I was thinking about this. If the transport layer establishes the link and the session layer manages it, in moving down the model wouldn't the session layer have to be skipped for the transport layer to do it's stuff and then the process passed back up to the session layer for management?

Variable
05-24-2010, 02:49 PM
Yes, it could. In fact, the Network layer may handle the "session" part. You have to keep in mind the OSI model is just a tool to help you understand layering. Reality doesn't always map like the model and you cannot lump all communication into the same format. Maybe there is a authentication protocol the Session layer adds to, maybe the connection is going to be established so that one side talks and then the other. Maybe the Session will need to be restarted if it fails. Maybe something needs to handle the start and ending of a certain connection.

Look at the TCP/IP model. You'll see the session layer is part of the application layer. That is because (depending on the application) this layer may or may not get involved much - in any given network communication. All traffic is not equal.

Paul Komski
05-24-2010, 08:22 PM
I've always thought the OSI model to be somewhat contrived but it is always used as the model for transmitting data across a network.

My own way of conceptualizing these layers is to consider data transmission not across a network but within a PC say, for example, simply copying files from one folder to another or of displaying some text file in some editor or other. All such manoeuvres use bits of data stored on a drive. The transport equivalent would be the buses and channels and hardware used to get the data from A to B along with all error checking and so forth.

Now one could copy file AA to BB and at the same time copy file CC to DD and these would be two distinct sessions but using identical hardware. A third session might oversee the loading of a text file into notepad.

I don't know whether this is a good analogy or not but it seems logical to me. There is a similar but more precise explanation at http://www.teach-ict.com/as_a2/topics/osi_and_standards/osi/session_layer.htm

Once network transmission gets involved there are a couple more layers that are needed to organise and check the processes and protocols and packets for more distant transmission and reception by distant hardware.

Edited and Added:
I couldn't help quoting Charles when I saw "The most common mistake is attempting to try to “make everything fit” into the layered structure of the OSI model (http://www.tcpipguide.com/free/t_HowToUseTheOSIReferenceModel.htm)" as written in his TCP/IP Guide.

yawningdog
06-18-2010, 11:24 AM
Try and remember that the OSI model was not developed with the TCP/IP stack in mind. The OSI model was in fact developed for the OSI protocol stack which never really took off because it sucked. However, the model is still used in terms of TCP/IP because it illustrates a few key concepts.

I personally think it's a waste of time to study the OSI model except that it's going to show up on just about every certification test you'll ever take. For example, UDP is a sessionless protocol, so the session layer of a UDP packet is empty even though in theory it is still there. And ICMP utilizes a session layer in a much more limited sense than TCP does.

If you want to pass a test, study the OSI model and make sure you know what all the layers do. But if you want to know how networking really works in the TCP/IP framework, study the TCP/IP model. (It's only four layers.)

jlreich
06-18-2010, 05:31 PM
I personally think it's a waste of time to study the OSI model except that it's going to show up on just about every certification test you'll ever take.
That's about it. It's almost as bad as learning IP classes when it really doesn't apply to anything. But you need to know it in order to pass many cert exams.