Introduction To the OSI Model
The OSI – Open Systems Interconnect model is a standard that was introduced by the ISO, the International Organization for Standards which is part of the United Nations. The standard was published in 1983 and specifies a layered approach to network communication.
Note: ISO is not an acronym. It comes from the Greek word “isos” which means equal, intended to reflect the equal status of the members.
The purpose of the OSI reference model is to make networks more manageable and to aid the problem of moving data between computers. The main objectives of the ISO OSI reference model were
a. allow manufactures of different systems to interconnect their equipment through standard interfaces.
b. Allow software and hardware to integration well and be portable on differing systems.
c. Create a model which all the countries of the world use.
The model divides the problem of moving data between computers into seven smaller, more manageable tasks, which equate to the seven layers of the OSI reference model.
The seven layers are:
1. The Physical Layer
2. The Data Link Layer
3. The Network Layer
4. The Transport Layer
5. The Session Layer
6. The Presentation Layer
7. The Application Layer
The Application Layer is the top layer and is also referred to as layer 7. Data passes from the top layer of the sender through the other layers to the Physical Layer – layer 1, then across the network media – e.g. network cabling, and up from the Physical Layer of the receiver to the Application Layer. There is virtual data flow between corresponding layers on the sending and the receiving node. The rules governing the data transfers between peer layers are called protocols.
It must be noted that the OSI model is an abstract model that provides a framework that defines the functions of each layer.
In effect the OSI standard defines the interfaces between the layers. Each layer provides a service to the layer immediately above it and also requests a service from the layer immediately below it. The packages of data passed between layers are called PDUs (Protocol Data Units). These PDUs have specific names when referring the four lower layers:
Layer | PDU Name |
Transport Network Data Link Physical | Segments Packets/Datagram Frames Bits |
As the data is passed from layer to layer, each layer adds its own information. This is called encapsulation.
The layers of the OSI model can be grouped into two layers – the Media layers, consisting of the physical layer and the datalink layer, and the Host layers, consisting of the application, presentation, session and transport layers. The Media layers so called because it controls delivery of data over the network, and the Host layers so called because they provide for accurate delivery of data between computers, or hosts, on the network.
1. Physical Layer
Computers store information using bits which are are expressed in binary digits, i.e. can have a value of 0 or 1. The physical layer provides for the transmission of the binary digits. The binary digits are converted into an electrical voltage and sent over a copper cable, or converted to pulses of light and transmitted over a fibre optic cable. This makes the physical layer responsible for the electrical, mechanical, procedural and functional specifications for activating, maintaining and deactivating the physical link between end systems. This means that it covers: cables, electrical voltages, electrical currents and intensities of light pulses, connectors and encoding.
Cables: cables in most cases are either coaxial, twisted pair or fibre optic cable.
Electrical voltages, electrical currents and intensities of light pulses – This defines the levels of the voltages or light levels for transmission of the binary digits over the cable. Electrical impulses representing data are known as signals. It is here that how bits are represented is determined e.g. which voltages represent 1s and 0s.
It is at the physical layer that it is determined when a piece of data transmitted starts and ends. This is accomplished by transmitting certain bit patterns.
PDU | Bits |
2. The Data Link Layer
The Data Link Layer is concerned with media access, that is the transmission of data from one system to another that are directly connected. It ensures bits are transmitted reliably. It does this by adding extra bits that define the beginning and the end of the data frame and adding error detection and correction bits. It also ensures that multiple nodes do not try to access the network media at the same time.
The data link layer is actually made up of two sub layers – the lower of these being the MAC layer and the upper, the LLC (Logical Link Control Layer).
The LLC : This sub layer accepts and delivers packets from the above network layer. It allows more than one network layer protocol to be used.
MAC Layer: This sub layer is responsible for generating frames appropriate to the particular network interface in use. It allows more than one NIC (Network Interface Card – network adapter) to be supported. It is at this sub layer that network card drivers operate and that NIC addresses are implemented – hence the term MAC address. The MAC address of a NIC is “burnt in” to it. It is actually stored in ROM on the NIC. The MAC addresses are administered by ISO. The MAC address is a 48 bit number. The first 24 bits carry the manufacturers ID. This is the part that is specified by ISO, so each manufacturer is assign a a specific ID or group of IDs. The other 24 bits of the MAC address is administered by the manufacturer, whose responsibility it is to ensure that it is unique. Note: The MAC address cannot be used to route data to systems on another network, only to systems on the same network segment, because the MAC address does not carry any information about the location of the NIC.
The data link layer builds on the physical layer. It takes packets from the network layer and frames them so that they can be transmitted from one node to another. The data link layer provides for:
Error control, Flow control, Line discipline, Network topology, Ordered delivery of frames and Physical addressing. The following discusses each of these functions.
Error control: This is where binary digits are added that are used to identify if there has been an error in the transmission of any of the bits. There is also usually some mechanism for the destination node to tell the source node that there is an error and get the source node to retransmit the data. The checksum is the error detection technique that is used by ethernet. Note: There is no error correction at this layer.
Flow control: This is where there is communication between the nodes to ensure that the destination is able to deal with the data at the rate that it is being transmitted by the source. Usually the destination sends messages to the source to indicate whether it is ready to receive data. Windowing is a common technique used.
Line discipline: This is the method by which orderly access to the network media is achieved. Typically only one node is permitted to access the network media at a time, and so this needs to be governed so that nodes don’t access the media simultaneously. Common methods of line discipline are CSMA/CD (Carrier Sense Multiple Access with Collision Detection) and token passing.
Network topology: This is to do with the physical arrangement of network nodes and media within a networking structure.
Ordered delivery of frames: This provides for the sequencing of the data frames in the correct order and allows the receiving nodes to determine if there are any gaps in the sequence of the received data frames.
Physical addressing: This provides for the physical addressing of the node. Each node on the network has a unique physical address called the MAC (Media Access Control) address. The MAC address is “burnt into” the NIC (Network Interface Card). It is physically set up in the NIC when it is manufactured and cannot be changed. The MAC addressing gives no indication as to the physical location of the NIC. This aspect is dealt with in the MAC layer of the Data Link Layer.
PDU | Frame |
The frame has three parts. A header, a data payload and a trailer.
Header: This contains control information. This contains the source and destination address for the frame.
Data payload: This consists of a packet received from the network layer of the source, or destined for the network layer of the destination system.
Trailer: This usually contains a checksum that is used to verify the integrity of the data.
3. The Network Layer
This layer defines address and routing. It is also involved in splitting data for transmission and reassembling data on receipt.
It defines the protocols that are responsible for data delivery to the required destination. It is responsible for Network addresses and Routing.
Network addresses: This identifies the logical location of the node (the network address), and the actual (node address). The protocol defines the form of the network and node address. IP and IPX are common network layer protocols.
Routing: This is the passing of the data packets from one network segment to another and involves router. The router reads the destination network address and decides which network segment to send the packet on to. Routers maintain a routing table that is used to determine the route through the internetwork that the packet takes to get to its destination. Because the internetwork can change, the routing tables need to reflect this. This is the job of the routing protocol. Routers talk to each other using routing protocols. RIP (Routing Information Protocol) and OSPF (Open Shortest Path First) are common routing protocols. RIP uses the number of “hops” beween the source and destination as the metric. The metric is a unit used to give information about the route to the destination. The hop is the number of routers that the packet needs to pass through to get to the destination. OSPF uses other types of metrics to determine the best route to the destination. These include latency and bandwidth.
PDU | Packets |
The network layer adds a header to segments received from the transport layer on the source node. It takes the header off of packets and hands them to the transport layer on the destination node.
Example of network layer protocols:
IP – Internet Protocol
IPX – Internet Packet Exchange
ARP – Address Resolution Protocol
ICMP – Internet Control Message Protocol
IGMP – Internet Group Management Protocol
nb the links for the above protocols open a new window and take you to RFC (Request For Comments) documents. These documents are the specification for the protocol.
4. The Transport Layer
This layer is concerned with end to end connection and reliability. It supports the transmission of multiple streams of data from a single computer.
It provides for reliable end to end error and flow control. Connection Type and Name resolution are covered by the transport layer.
Connection type: This defines the way that data is moved between source and destination nodes and their interaction. The connection can be connection-orientated or connectionless. TCP (Transmission Control Protocol) is a connection-orientated protocol and UDP (User Datagram Protocol) is a connectionless protocol found at the transport layer. In a connection-orientated connection a virtual connection is set up and data is acknowledged. Each segment sent has a sequence number so that segments can be correctly ordered at the destination and so that segments that get lost can be retransmitted. The acknowledgement is in the form of a data segment requesting the next segment or the sequence number of the next segment that the destination node is expecting. See the window page for an explanation of windowing. In a connectionless connection there are no acknowledgements sent , so the segments are just sent. Connection-orientated connections are therefore called reliable, and connectionless, unreliable connections.
Name Resolution: This allows for the resolution of logical names to network names. A typical implementation of this is the DNS (Domain Name Service) which resolves domain names – e.g. www.uel.ac.uk, to an IP address – 161.76.9.15.
PDU | Segment |
The transport layer takes session layer PDUs and encapsulates them by the addition of a header, on the source node, and removes the header before passing the segment onto the session layer on the destination node.
The most commonly used network protocols generally rely on the transport layer to ensure “error free” communication between higher layer protocols. In this context “error free” means that any errors are detected and corrected or the error is reliably reported to the higher layer.
In reliable network communication, the same sort of techniques are employed as in the data link layer for the detection and correction of error. Note: the difference is that at this layer there is error correction. So there is connection establishment, sequence numbers, timeouts and acknowledgements used. There is also flow control employed.
The control information required to implement the above is included in the segment head. The header also includes the “address” of the address of the higher layer protocol. In the case of the TCP/IP, the higher layer protocol is the application and it is identified by a port number.
In unreliable network communication, e.g. with UDP, error handling is the responsibility of the higher layer protocol. In the case of TCP/IP this is the application.
Examples of Transport Layer protocols:
TCP – Transmission control Protocol
UDP – User Datagram Protocol
SPX – Sequenced Packet Exchange
5. The Session Layer
This layer is concerned with interhost communication. It provides an open communication path with other nodes on the network. It involves setting up, maintaining and closing down of sessions. It builds on the transport layer. This layer provides a higher-level connection, such as a login procedure, or a remote connection. It is important that the session layer is not dependant on any specific transport or network layer.
This layer provides an orderly “conversation” between the systems, ensuring that they don’t “speaks” at the same time.
In terms of managing the session, the session layer divides the communication into parts by establishing synchronisation points. These allow a dialogue to be rolled back partially in the event of an error, therefore there would be no need to restart the entire session.
The closing down of the session involves closing it “gracefully,” that is when both systems agree to stop.
Examples of session layer protocols:
FTP (File Transfer Protocol)
Named Pipes
NetBIOS
6. The Presentation Layer
This layer is concerned with the presentation and interpreting of data. It presents data to the application layer. It uses a set of translations that allow the data to be interpreted properly so that data from the application layer of one system can be read by the application layer of another system.. A method that is used to transfer data is to translate the data into a standard format before transmission. The systems are configured so that they receive this standard formatted data and then convert it back into the format that is required.
The presentation layer can also encrypt and decrypt data, thus providing security to network communications. It can also be responsible for authenticating the source of the data received.
Compression is another function that this layer can perform. One technique for doing this is called Run Length Encoding. This is where a long run of identical characters in a character stream is replaced by a special character, followed by a number specifying how many repetitions there are, followed by the character itself. The receiving system is then able to regenerate the original character stream using this information.
7. The Application layer
The Application layer is where the users communicate with the computer. It is responsible for identifying and establishing the availability of the remote node and determining if there are enough resources for the intended communication to take place. Thus it supplies network services to application programs.
The building blocks of the application layer are Application Service Elements (ASEs). There are two main classes of ASEs. ASEs combine together to form an Application Entity (AE) to perform a task e.g. file transfer. The AE from one system will exchange PDUs with it peer, on another system by negotiating an Application Association with the AE on the peer system.
Examples of application programs :
FTP – File Transfer Protocol
TFTP – Trivial File Transfer Protocol
SMTP – Simple Mail Transfer Protocol
SNMP – Small Network Management Protocol
PING –
NFS – Network File System
TELNET – remote logon
etc.