Skip to main content

The OSI Model's Seven Layers

APPLICATION LAYER
The OSI model defines the application layer as being the user interface. The OSI application layer is responsible for displaying data and images to the user in a human-recognizable format and to interface with the presentation layer below it.

Examples of applications that utilize the network are:
  • Telnet
  • FTP
  • Instant Message software (AIM, MSN, ICQ, Yahoo)
  • Microsoft Windows File Shares
  • Web Browsers (Internet Explorer, Firefox, Google Chrome, Safari)
  • Network games of Doom, Quake, Unreal (first-person 3D shooter video games)
  • IRC (mIRC)
PRESENTATION LAYER
The presentation layer handles the conversion of data between a Standards-based or platform independent formats to a format understood by the local machine. This allows for data to be transported between devices and still be understood.

The presentation layer performs the following functions:
  • Communication with the application layer above.
  • Translation of data conforming to cross-platform standards into formats understood by the local machine.
  • Communication with the session layer below.
  • Examples of Presentation Layer Functions
  • Conversion of a Sun .RAS raster graphic to JPG.
  • Conversion of ASCII to IBM EBCDIC
  • Conversion of .PICT on a MAC to .jpg
  • Conversion of .wav to .mp3
SESSION LAYER
The session layer tracks connections, also called sessions. The session layer should keep track of multiple file downloads requested by a particular FTP application, or multiple telnet connections from a single terminal client, or web page retrievals from a web server.

With TCP/IP this functionality is handled by application software addressing a connection to a remote machine and using a different local port number for each connection.

The session layer performs the following functions:
  • Communication with the Presentation layer above.
  • Organize and manage one or more connections per application, between hosts.
  • Communication with the Transport layer below.
Example,
Sessions are used to keep track of individual connections to remote servers. Your web browser is an excellent example of the use of sessions.

Your web browser (an application layer object) opens a web page. That page contains text, graphics, Flash objects and perhaps animation. The graphics, the Flash object and the animation are all stored as separate files on the web server. To access them, a separate download must be started. Your web browser opens a separate session to the web server to download each of the individual files. The session layer keeps track of which packets and data belong to which file and keeps track of where they go (in this case, to your web browser).

In most modern Internet applications, the session, presentation and application layers are usually rolled together inside the application itself, thus, your web browser performs all functions of the session, presentation and application layers.

TRANSPORT LAYER
If networking software performs reliable data transfer functions, then the detection of errors, and re-transmission of data to recover those errors or lost data will occur in software managing this layer. The transport layer may use a variety of techniques such as a Cyclic Redundancy Check, windowing and acknowledgements. If data is lost or damaged it is the transport layer's responsibility to recover from that error.
  • Communicate with the Session layer above.
  • Reassemble transport Protocol Data Units into data streams
  • Reliable protocols operating at this layer will
  • Detect errors and lost data
  • Recover lost data
  • Manage re-transmission of data.
  • Segmentation of data streams into transport Protocol Data Units.
  • Communicate with the Network layer below.
Examples of transport layer protocols include:
  • Transmission Control Protocol (Reliable)
  • User Datagram Protocol (Unreliable)
NETWORK LAYER
It is the network layer's job to figure out the network topology, handle routing and to prepare data for transmission. The network layer is concerned with the following primary functions:
  • Communication with the Transport layer above.
  • Encapsulation of Transport data into Network layer Protocol Data Units.
  • Management of connectivity and routing between hosts or networks.
  • Communication with the data link layer below.
Examples of network layer protocols include:
  • Internet Protocol
  • Internet Control Message Protocol (ICMP or "ping")
  • Internet Gateway Management Protocol (IGMP)
  • IPX/SPX
DATA LINK LAYER
The data link Layer is the second layer of the OSI model. The data link layer performs various functions depending upon the hardware protocol used, but has four primary functions:
  1. COMMUNICATION with the Network layer above.
  2. SEGMENTATION of upper layer datagrams (also called packets) into frames in sizes that can be handled by the communications hardware.
  3. BIT ORDERING. The data link layer organizes the pattern of data bits into frames before transmission. The frame formatting issues such as stop and start bits, bit order, parity and other functions are handled here. Management of big-endian / little-endian issues are also managed at this layer.
  4. COMMUNICATION with the Physical layer below
This layer provides reliable transit of data across a physical link. The data link layer is concerned with physical addressing, network topology, physical link management, error notification, ordered delivery of frames, and flow control.

It should be noted that in most modern network interface adaptors, the Physical and Datalink functions are performed by the network interface adaptor.

Example,
Ethernet Network Adaptors uses a Media Access Control (MAC) address, which is a physical address that (somewhat) uniquely identifies a network card to the physical network. The Ethernet Adaptor's primary job at the data link layer is to transmit Ethernet frames onto the wire. It places its own MAC address in the frame, followed by the destination MAC address to which it wishes to communicate, sets various other values in the Ethernet frame (protocol type etc.) and then transmits on the wire. The CSMA/CD protocol that Ethernet uses to control access to the common network bus could be said to occur at the data link layer of the OSI model or could also be called a data link function.

PHYSICAL LAYER
The OSI Model's layer 1, the Physical Layer, outlines the characteristics of the physical medium between networked devices--cabling, wiring, fiber strands and the air. Transmission and receipt of data from the physical medium (copper wire, fiber, radio frequencies, barbed wire, string etc.) is managed at this layer.

The Physical Layer receives data from the data link Layer, and transmits it to the wire. The physical layer controls the electrical and mechanical functions related to the transmission and receipt of a communications signal. It also manages the encoding and decoding of data contained within the modulated signal.

Note that for two devices to communicate, they must be connected to the same type of physical medium (wiring). 802.3 Ethernet to 802.3 Ethernet, FDDI to FDDI, serial to serial etc. Two end stations using different protocols can only communicate through a multi-protocol bridge or a router.

The physical layer is responsible for:
  1. Communication with the data link layer above it.
  2. Fragmentation of data into frames
  3. Reassembly of frames into data link Protocol Data Units.
  4. Transmission to the physical media
  5. Receiving from the physical media
  6. It should be noted that in most modern network interface adaptors, the physical and data link functions are performed by the adaptor.
Example Physical Protocols
  • CSMA/CD - Carrier Sense Multiple Access / Collision Detect
  • CSMA/CA - Carrier Sense Multiple Access / Collision Avoid
  • FDMA - Frequency Division Multiple Access
  • MSK - Minimum Shift Keying
  • GFMSK - Gaussian-Fitered Minimum Shift Keying
  • TDMA - Time Division Multiple Access
  • CDMA - Code Division Multiple Access
  • B8ZS - Binary 8 Zero Substitution
  • 2B1Q - 2 Binary 1 Quaternary
  • PCM - Pulse Code Modulation
  • QAM - Quadrature Amplitude Modulation
  • PSK - Phase Shift Keying
  • SONET - Synchronous Optical NETworking

Comments

Popular posts from this blog

.NET Core: Session Wrapper Design Pattern For ASP.NET Core

Here, we'll learn about Session Wrapper design pattern to ease the access of Session. We'll make our access of session "Typed". Also, we may apply any validation or constraint in this wrapper class. Step 1 - Create a Session Manager class   In this example, we are going to store two items in Session (i.e. ID & LoginName). We are injecting IHttpContextAccessor so that we can access the Session variable.  We are creating properties which are actually accessing Session variable and returning the data or writing the data to Session. We have added one helping property "IsLoggedIn" which is using other properties to make a decision. We may have more such helping/wrapper properties. using Microsoft.AspNetCore.Http; public class SessionManager       {           private readonly ISession _session;           private const String ID_KEY = "_ID";           private const String LOGIN_KEY = "_LoginName";           publ

Facade Design Pattern

Facade Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Motivation Structuring a system into subsystems helps reduce complexity. A common design goal is to minimize the communication and dependencies between subsystems. One way to achieve this goal is to introduce a  facade  object that provides a single, simplified interface to the more general facilities of a subsystem. Consider for example a programming environment that gives applications access to its compiler subsystem. This subsystem contains classes such as Scanner, Parser, ProgramNode, BytecodeStream, and ProgramNodeBuilder that implement the compiler. Some specialized applications might need to access these classes directly. But most clients of a compiler generally don't care about details like parsing and code generation; they merely want to compile some code. For them, the powerful but low-level

Tabla - An Indian classical instrument for Rythm

Tabla Indian music has fascinated the West for many years. The tabla in particular has attracted the attention of a number of American and European percussionists. It has been used in popular music as early as the 60's and is heard in the popular media even today. However, many percussionists shy away from this instrument. The reasons for not "getting into it" are varied. Sometimes it is the lack of instruments; sometimes lack of teachers; sometimes it is the belief that tabla is just too difficult. These are legitimate concerns but they are not insurmountable obstacles. This article will address the concerns of a musician just wishing to get started in tabla. We will discuss the theory of Indian music, how to purchase tabla, the basic technique, and compositional theory. All of this information should make the job of getting started much easier. We should first familiarize ourselves with the extensive theory of Indian music. Indian music is one of the oldest musical trad

How to make a Method Thread Safe?

In multi-threaded applications where multiple threads make calls to the methods of a single object, it is necessary that those calls be synchronized. If code is not synchronized, then one thread might interrupt another thread and the object could be left in an invalid state. A class whose members are protected from such interruptions is called thread-safe. Although, there is no rule that makes the code thread safe, the only thing you can do is make sure that your code will work no matter how many times is it being actively executed, each thread can be interrupted at any point, with each thread being in its own state/location , and this for each function (static or otherwise) that is accessing common objects. If a method (instance or static) only references variables scoped within that method then it is thread safe because each thread has its own stack: In this instance, multiple threads could call ThreadSafeMethod concurrently without issue. public class Thing { publ

Create VHD using DISKPART

Create Virtual Harddisk Using DISKPART Open the   Elevated Command Prompt   with Administrator Privileges and type the following commands: DISKPART CREATE VDISK FILE="c:\win7\win7.vhd" MAXIMUM=20000 SELECT VDISK FILE="c:\win7\win7.vhd" ATTACH VDISK CREATE PARTITION PRIMARY ASSIGN LETTER=X FORMAT QUICK LABEL=Windows7 EXIT This will create the  VHD  file of primary partition. You will see the newly attached disk in Disk Management with Drive Letter X: Attaching and Detaching VHD in  Windows 7 Right Click  on My Computer and Click ' Manage ' that will open up  Computer Management , in that click on  Disk Management . Just like previous part. Then Right Click on Disk Management and select  'Attach VHD'.  This will open new windows  'Attach Virtual Hard Disk ' Click on  OK  and that will attach the existing Virtual Hard Disk. Now, if you don't want to make write anything on the VHD, we