Transport Layer of the OSI Model

The Transport layer has three main responsibilities in terms of the exchange of data between systems. These include:

  • Data segmentation.
  • Establishment of end-to-end connections between hosts.
  • Using flow-control mechanisms to ensure that data is sent at rates that the receiver can handle.

Data Segmentation

At any given point in time there may be many applications passing data down to the Transport layer. Data segmentation is the process by which the Transport layer uniquely handles all data passed to and from different upper-level applications. This is usually implemented in the form of source and destination port numbers that are defined within a particular application. For example, if a user is browsing the web and checking email at the same time, each program would be passing data and waiting for a reply on a unique port number. The Transport layer ensures that data is passed to the correct application.

Session Layer of the OSI Model

The Session layer is responsible for the creation, management, and termination of sessions between systems. A session is best described as a type of managed connection between systems for the purpose of a specific type of communication. For example, a session might be created for the purpose of user authentication, or to initiate a file transfer.

The Session layer is also responsible for coordinating how the communication between systems takes place, which is known as dialog control. In some sessions, only a single system is allowed to communicate at any point in time, referred to as half-duplex. The Session layer would be responsible for determining whose turn it is in these situations, and for how long each system is allowed to communicate. In other cases, both systems can communicate at once, which is also known as full duplex. If the communication stream were somehow interrupted, the Session layer would be responsible for recognizing this and re-establishing the session.

Examples of Session layer protocols:

  • Network File System (NFS): Unix file system access
  • Structured Query Language (SQL): Local or remote database queries
  • Remote Procedure Call (RPC): Client-server communication mechanism
  • AppleTalk Session Protocol (ASP): AppleTalk client-server communication mechanism
  • X Windows: Remote desktop sessions

Tip: Remember that the protocol data unit (PDU) of the Application, Presentation, and Session layers is “data”.

Presentation Layer of the OSI Model

The Presentation layer is primarily responsible for data representation and formatting, ensuring that data can be viewed correctly. These formats are sometimes referred to as the “data syntax” of the applications in use. For example, different systems may use different schemes to represent data. While one system might use ASCII or EBCIDC, another might use UNICODE. Since these schemes contain different character possibilities, it is the responsibility of the Presentation layer to make sure they are displayed in the correct or common format between the client and the server. Further to this, the Presentation layer is also where data compression and encryption are generally considered to take place.

Examples of common Presentation layer formats:

  • ASCII, EBCIDC, UNICODE, RTF: Text encoding formats
  • MPEG, AVI, QuickTime: Video encoding formats
  • JPEG, PNG, TIFF: Graphics formats
  • MIDI: Sound format

Application Layer of the OSI Model

The Application layer is the top layer of the OSI model, and is considered to be the place where the user interacts with the network. This interaction usually occurs by running a program, such as a web browser or a spreadsheet application. This layer doesn’t really worry about the network. Instead, it simply knows how to make a request for something (this is the data), and then what to do with the reply (the data that was requested). In the case of a user browsing a website, the client application (the web browser) makes an HTTP request that will be understood by the receiving application at the other end (the web server). This is sometimes referred to as program-to-program communication. The lower layers of the model concern themselves with how this data is actually encapsulated and transmitted.

Examples of common Application layer programs and services:

  • Word Processor: Creating documents, possibly to be saved to a network server.
  • Web Browser (HTTP): Access to internet web services
  • Email Client (SMTP, POP3, IMAP): Sending and receiving email
  • Telnet: Remote terminal session
  • File Transfer (FTP): File transfer

Tip: Take the time to familiarize yourself with the various protocols and applications that exist at the different OSI layers.

Protocol Data Units

You are probably already familiar with the term ‘packet’. It is often used to generically describe data that will be passed between systems over a network. As data flows down the layers of the OSI model, the various layers encapsulate it, usually by adding header (and possibly trailer) information. At each layer where this happens, the term used to describe the data is different, and it should be properly referred to by its Protocol Data Unit (PDU) name. The reference below outlines the names used to describe Protocol Data Units at different OSI layers.

Application = Data

Presentation = Data

Session = Data

Transport = Segment

Network = Packet

Data Link = Frame

Physical = Bits

Notice that once passed to the Transport layer, data is properly referred to by its protocol data unit (PDU) name, a “segment”.

Network Peer Layer Communications

A critical concept to understand when looking at network communication models is the idea of peer layer communication. Peer layer communication is a way of defining how the different layers in the OSI model interact with one another when systems communicate. On a single system, each layer has one or two neighbouring layers – the layer above it, and the layer below it. For example, the Network layer will interact with both the layer above (Transport) and the layer below (Data Link). When preparing to send data over the network, the Network layer receives the data from the Transport layer, makes some additions, and then passes it down to the Data Link layer where it is formatted further.

When we extend the model over the network to include another system, you’ll need to consider what I call horizontal peering. In network communication models, any given layer communicates only with that same layer on another system. So, when the Data Link layer adds some information to the data prior to passing it over the network, this added information will be of use only to the Data Link layer (its peer) on the receiving system. Similarly, the information added by the sender at the Transport layer will only be of use to the Transport layer on the receiving system.

Figure 1-2: Peer layer communication

This concept may seem a little confusing at first, but think of it like this. Ultimately, a packet is going to be created that will be sent over the network and received by another system. It starts with data created at the Application layer, and layers add information (the whole process being referred to as encapsulation) as the data travels down the OSI model. The packet is then transmitted across the network. Once it arrives at the receiving system, parts that were added are now stripped away in reverse order at each layer. Remember that each layer on the sending system provides information that is used by the same layer on receiving system. If it all seems a little theoretical at the moment, do not worry – we’ll ultimately apply this to how a real TCP/IP packet is created.