VCE IT Lecture Notes by Mark Kelly, McKinnon Secondary College

OSI Model

Open Systems Interconnection

 

 

Developed in 1984 by the standards organisation ISO, the OSI model is used by all network engineers to construct ICT hardware and software that needs to communicate with other equipment. The OSI Reference Model describes a set of seven layers that define the different stages that data must go through to travel from one device to another over a network.

For VCE Software Development, the main emphasis is on level 1, and how it relates to the TCP/IP protocol.

 

 

The OSI layers

 

Please note: I have seen different interpretation of the layers in each set: e.g. one source puts layer 4 into the application set, while another puts it in the transport set. I'll sort it out eventually. 8 April 2010

The 7 layers of the OSI model are divided into 2 sets: the application set and the transport set.

To get from point A to point B on a network, data passes through each layer like a car being built on a factory production line. At the sender's end, the data passes through layers 1,2,3,4 (at which point the data is sent) and then at the receiver's the data passes through layers 1,2,3,4,5,6,7 at which point the data can be used.

 

OSI Seven Layer Model

Data Unit

Layer

Function

Description

 

Application
set

(Host layers)

 

These layers are used whenever a message passes from or to a human user

Data

7. Application

Network process to application

The application layer is the OSI layer closest to the end user, which means that both the OSI application layer and the user interact directly with the software application. This layer interacts with software applications that implement a communicating component. It interacts with the operating system or software application, controlled by the human user. Communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified.

The application layer determines the identity and availability of communication partners for an application with data to transmit. When determining resource availability, the application layer must decide whether sufficient network or the requested communication exist. In synchronizing communication, all communication between applications requires cooperation that is managed by the application layer. Application layer implementations include Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP) .

6. Presentation

Data representation,encryption and decryption The presentation layer works to transform data into the form that the application layer can accept. It translates the data to/from the the Application layer into a standard format that the other layers can understand. Usually part of an operating system, protocols at this layer convert incoming and outgoing data from one presentation format to another (for example, from a text stream into a popup window with the newly arrived text). This layer formats and encrypts/decrypts data to be sent across a network, providing freedom from compatibility problems. It is sometimes called the syntax layer. Includes MIME, SSL.

5. Session

Interhost communication

Controls the dialogues (connections) between computers. It establishes, manages and terminates the connections between the local and remote application. This layer sets up, coordinates, and terminates conversations, exchanges, and dialogs between the applications at each end. It deals with session and connection coordination.

Segments

4. Transport

End-to-end connections and reliability,Flow control

Manages the flow of data, providing for error checking and recovery of data between the sending and receiving devices. This layer takes streams of data from multiple applications and merges them together into a single data stream for the physical network. It's like the railway controller managing many trains coming on and off spur lines into a single main rail line heading for the city. This layer manages the end-to-end control (for example, determining whether all packets have arrived) and error-checking. It ensures complete data transfer.

The Transport Layer provides transparent transfer of data between end users. Typical examples of Layer 4 are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

Transport Set

(Media
layers)

 

These layers are used for all messages.

Packet

3. Network

Path determination and logical addressing

Controls how data will be sent to the receiving device; including logical protocols, addressing, and routing (sending data in the right direction to the right destination on outgoing transmissions and receiving incoming transmissions at the packet level).

Routers operate at this layer.

Frame

2. Data link

Physical addressing The data are prepared so the receiving hardware can understand it, e.g. creating appropriate data packets. This layer provides synchronization for the physical level and manipulates data to suit local conditions (e.g. bit-stuffing). It furnishes transmission protocol knowledge and management.
Bit

1. Physical

Media, signal and binary transmission

This is the hardware level. It defines how the network devices work physically, such as cable connections, voltage levels and timing. It conveys the bit stream through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier.

This includes the layout of pins, cable specifications, hubs, repeaters, network adapters etc.

 

 

To memorise the OSI layers, try this mnemonic:

Programmers
Do
Not
Throw
Stale
Pizza
Away

 

 

 

A layer is a collection of functions that provide services to the layer above it and receive service from the layer below it. A layer can only deal with the layers immediately above and below it, just as a car on a production line must travel in a linear way from one end of the conveyer belt to the other.

Different layers can provide similar, related functions but differ in the level at which they work. For example, an army quartermaster in charge of providing food to an entire army must have a function for providing food to hundreds of combat units. Similarly, a combat unit's cook must have a function for providing food to his fellow soldiers. While the quartermaster and the cook are both said to be providing food, they do it at different levels, and each relies on the other.

The quartermaster provides food by organising trucks and warehouses and forklifts to get food to where it's needed. Cooks do a similar job by opening tins and packets and providing meals to troops. (In a similar vein, the quartermaster could not operate unless someone in a higher layer again has organised food suppliers to sell food to the army and agents to pack and deliver it to the quartermasters.) They are all providing similar services at a different level.

The cook could not do his work without the food provided by the quartermaster; the quartermaster could not get food to the troops without the cook. Their functions are similar; the level at which they operate is different: more abstract (removed from direct application) in the case of the quartermaster, and less abstract (more practical and direct) in the case of the cook.

Let's call the provision of food an instance.

In the OSI model, an instance in one level communicates with the same instances in OSI levels above and below. A higher OSI layer will manage the behaviour of related instances in lower layers. Higher layers also rely on the provision of services by lower layers.

In a more relevant example, when it comes to providing communications across a network, several different OSI layers will contribute to the data transfer; but each will do it at a different level. e.g. one higher layer may negotiate the setting up of the communications link between sender and receiver, while a lower layer constructs data packets containing the data, and a lower layer yet manages the flow of the packets' individual binary bits across a wire between one network card and another. All the layers are working as a team on the same job, but each does his own task.

If you're still having trouble visualising it, think of a government. It has responsiblities, with instances such as defence, law and order, public health. Similarly, a network has responsibilities such as security, error correction, data flow.

The government's leader is not standing on the beach with a gun, or patrolling the streets in a police car, or operating on sick people. These tasks are passed down to lower levels until the job is actually carried out.

Similarly, a network has layers of management from high level acts (e.g. a human clicking a webpage URL to request a file) down to the bit-by-bit data flow between a NIC and a CPU.


Now, while the OSI layers are linked to each other vertically, with data flowing up and down like lifts in a lift shaft between related instances in layers, data also flows horizontally between different instances (areas of responsibility) at the same layer level.

For horizontal data flow the OSI has a set of specific protocols to manage data exchange. Protocols enable a function in one host to interact with a corresponding function at the same layer in another host.

For example, the cook mentioned above might need security to prevent food being stolen by greedy troops. He would need to communicate with a military policeman (MP) to watch the troops at mealtime so they don't steal food or leave a mess behind. The cook and MP are working at the same level (layer) but doing different jobs (instances).

Meanwhile, in a different layer, the quartermaster would need to ensure food warehouses were being secured against theft by rioters. The quartermaster has similar security concerns as the cook; and the quartermaster will negotiate with the police chief to get the necessary services.

The negotiations between the cook and the MP, and between the quartermaster and the police chief are both managed by protocols. There are accepted ways for the cook to organise for the MP to be at the right place at the right time and do the right thing. There are also accepted ways for the quartermaster and the police chief to communicate and get the security organised.

In a similar fashion, communication protocols in networking are used so related equipment can exchange data efficiently and effectively. For example, a mail server at one network knows how to exchange mail with another mail server at a differerent network because both use the same POP or IMAP protocol to manage their data exchange.

A web user can request web pages from a web server because the user and the server both use the same HTTP protocol. One NIC can accept a data stream from another NIC because both use the same Ethernet carrier sense and collision detection protocols (CSMA/CD). Internet data can flow from one WAN to another WAN because each WAN obeys the rules in TCP/IP: the vital pair of protocols that govern internet traffic.

 

 

A really dumb analogy

 

 

'Hmphh,' you say. 'That's all very well, but I still don't get it. Why the layers? What do they do?'

Maybe this will help a bit, at the risk of oversimplifying the model...

OSI LAYER

ANALOGY

Layer 7: Application Mr A of A Corporation wants to send a message to Mr B of B corporation. He picks up the phone and calls for his personal assistant (his PA).

Layer 6: Presentation

The PA writes down the message in German (which Mr A speaks) into his notebook.
Layer 5:
Session
The PA rips off the page with the message and sends it to the mail room with its destination address attached.
Layer 4: Transport The mail room takes the page (along with many other messages from employees), checks that the address is present and sorts messages into departments.
Layer 3:
Network
The mail room manager decides how best to send the message - does it needs to go airmail, by container ship, express post, bicycle courier?
Layer 2:
Data
The mail room manager puts the message into a standard waterproof envelope with its destination and delivery rules written on it (e.g. does the message need to be signed for? Does it need to be delivered to the recipient in person? How urgent is it?). Tim, the bicycle courier is summoned, and told to deliver the envelope.
Layer 1:
Physical
Tim jumps on his bike and pedals madly across town to Corporation B, steering and changing gear, jumping gutters and swerving to miss oncoming traffic. He arrives at the front door of Corporation B and hands over the envelope to the receptionist.
Layer 1:
Physical
The receptionist at Corporation B gives the envelope to corporation B's mail manager, who opens the envelope to see where it needs to go in their building.
Layer 2:
Data
The mail manager sees that it needs to go to Mr B. He puts the message into a standard Corporation B inter-office memo envelope.
Layer 3:
Network

Mr B's office number is written on the envelope, which is then given to the work experience kid. The kid is told where the office is, that he is to keep left in the corridors, and not interrupt Mr B if he is in a meeting.

Layer 4: Transport The kid trots down the corridors, checking office numbers and making sure the envelope is not being damaged by his sweaty hands.
Layer 5:
Session
The kid arrives at Mr B's office, checks the authenticity of the ID badge of Mr B's secretary, gets the secretary to sign a receipt for the message, and hands the envelope over.
Layer 6: Presentation The secretary opens the envelope, takes out the page, translates it into French (which Mr B speaks) and puts it in Mr B's in-tray.
Layer 7: Application Mr B removes the translated message from his in-tray, reads it and thinks about its contents.

 

Note how each step of the process is logically separated from the others. Each layer does not need to know how the other layers work: they just do their own jobs within their own limited walls.

The courier does not know or care what's in the envelope: the only thing concerning him is physically getting it from A to B. Once it's delivered, his job is done. Mr A and Mr B neither know nor care what sort of bike Tim was riding or what route he took; they only care that the message arrived safely and quickly. Each step in the process had its role in the efficient transfer of the information in the message. Like a factory production line...

 

 

 

Protocol stacks

 

 

Protocols are rules used by communication devices to ensure each device can understand the other. A simple human example is in 2-way radio use where people say "Over" when they've finished speaking so they don't talk over the top of each other. More about protocols is here.

A protocol stack is a group of protocols that all work together so networking equipment can intercommunicate. The TCP/IP protocol stack is a good example. It combines the TCP protocol and the IP protocol that work closely together, like Araldite, to make the internet work.

In the TCP/IP model of the Internet, protocols are not as rigidly designed into strict layers as the OSI model. However, TCP/IP does recognize four broad layers of functionality. Even though the concept is different from the OSI model, these layers are nevertheless often compared with the OSI layering scheme as shown below. There is some overlap between the TCP/IP layer divisions and the corresponding OSI layers (e.g. the TCP/IP transport layer closes the OSI session layer).

 

TCP/IP Layer

Corresponding OSI layer(s)

Job description

1. Network interface 1. Physical layer Data layer Routes data between devices on the same network or between the network and other devices
2. Internet 3. Network layer The IP protocol uses the IP address of a device to find out where the other network device is.
3. Transport 4. Transport layer TCP manages the flow of data from the sending device to the receiving device.
4. Application

5. Session layer

6. Presentation layer

7. Application layer

Uses protocols for specific communication jobs such as POP or IMAP for email transfer, HTTP for website transfers, or FTP for file transfer.

The strict peer layering of the OSI model does not present contradictions in TCP/IP, because protocol usage does have to follow the OSI layered hierarchy. e.g. some routing protocols provide a Link Layer for an application, although the protocol may well be a Transport or even an Application Layer protocol in its own right.

[Adapted from Wikipedia]

 

To better understand difference between the functions of the Physical Layer and the Data Link Layer, think of the Physical Layer as mainly dealing with the interaction of a single device with a medium (e.g. a data cable) while the Data Link Layer deals with the interactions of multiple devices with a shared medium.
 
Thanks to Howstuffworks.com for an overview of the layers and whatis.com for filling in the gaps.

Back to the IT Lecture Notes index

Back to the last page you visited

Created 9 April 2010

Last changed: March 11, 2011 2:45 PM

VCE IT Lecture notes copyright © Mark Kelly 2001-