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. |
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
To memorise the OSI layers, try this mnemonic: Programmers
|
||||||||||||||||||||||||||||||||||||||
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...
|
||||||||||||||||||||||||||||||||||||||
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). |
||||||||||||||||||||||||||||||||||||||
|
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-