Wednesday 10 July 2019

Open System Interconnection (OSI) model Notes


Open System Interconnection (OSI) model, OSI Model defines and is used to understand how data is transferred from one computer to another in a computer network . Two computers connected to each other with LAN Cable and  Connectors (RJ-45), sharing data with help of Network interface card(NIC) forms a computer network. But if one computer is based on MSWindows and other Is MAC OS. Then how are they going to communicate  with each other? In order to accomplish successful communication between the computers or network or different architecture- 7 layered Open System Interconnection (OSI) Model was introduced by ISO in1984. ISO is the organization dedicated to defining global communication and standards.
  This model is called Open System Interconnection (OSI) because this model allows any two different systems to communicate regardless of their underlying architecture. The model consists of seven functions, often referred to as layers. Every layer Added its own header to the packet from previous layer. The seven layers can be grouped into three groups - NetworkTransport and Application
• Layer 1, 2 and 3 i.e. physical, data link, and network are network support layers.
• Layer 4, Transport layer provides end to end reliable data transmission.
• Layer 5, 6 and 7 i.e. Session, Presentation, and Application layer are user support layers.
Each Layer is a package of protocols.


  
Layer 7 – Application Layer 
AL is used by Network Applications (Computer applications that used internet) i.e. chrome, firefox, outlook , skype, etc. Web browser ,  is a Network application running in your PC, does  not reside in Application Layer. But it uses application layer protocols like HTTP,HTTPS to do web surfing . All network applications depend on application layer protocols.  HTTP,HTTPS,FTP,SMTP, these protocols collectively called Application Layer. Application Layer provide services for network applications with help of protocols to perform user activities. Application Layer: Does not include firefox, chrome,etc.  It includes Application layer protocols that are needed to make these applications work correctly in a network called internet .




Layer 6 – Presentation Layer 
Presentation Layer receives data from Application layer. The data in the form of characters and numbers are converted to binary format:- Translation. Before  data is transmitted PL reduces the number of bits to represent original data:-Data Compression. To maintain integrity of data, the data is encrypted at sender side and decrypted in receiver side. SSL (secure socket layer)  protocol used in Presentation Layer for encryption and decryption.


Layer 5 – Session Layer 
Session Layer helps in setting up and managing   Connections and enabling sending data and receiving data followed by termination of connection. Session layer has Application programming interfaces.   (API’s ) eg: NETBIOS, which allows application of different    computers to communicate with each other. Before a session or connection is established with a server. Server performs function called Authentication.  Authorization: Determines if you have permission to access the files.

Session Management: Webpage contain text, images. These files are stored   separately on the web server. When you request for a website in a web browser.  Web browser opens a separate session to the web server to Download text and image files separately. These files received as data packets.  Session Layer  keeps a track of which data packet belong to which file ie  either text or image file and tracks where the received data  packet goes. This is called Session Management .


Layer 4 – Transport Layer 

Transport layer (also called end-to-end layer) manages end to end (source to destination) (process to process) message delivery in a network and also provides the error checking and hence guarantees that no duplication or errors are occurring in the data transfers across the network. It makes sure that all the packets of a message arrive intact and in order.
Three main Functions of Transport Layer:  Segmentation, Flow Control and Error Control
Segmentation:
Data is divided into small  data units called segments.
·         Each data unit contain source and destination port number and sequence number
·         Port number helps to direct each segment to the correct application
·         Sequence number  helps to reassemble the segments to form correct message


Flow Control: Transport layer makes sure that the sender and receiver communicate at a rate they both can handle. Therefore flow control prevents the source from sending data packets faster than the destination can handle. Here, flow control is performed end-to-end rather than across a link.

Error control: Transport layer also performs error control. Here error control is performed end-to-end rather than across a single link. The sending transport layer ensures that the entire message arrives at the receiving transport layer without error (damage, loss or duplication). Error correction is achieved through retransmission.
Protocols: These protocols work on the transport layer TCP, SPX, NETBIOS, ATP and NWLINK.

Transport layer provides two types of services:

 Connection Oriented Transmission(uses TCP Protocol)

(a) In this type of transmission the receiving device sends an acknowledgment, back to the source after a packet or group of packet is received.
(b) This type of transmission is also known as reliable transport method.
(c) Because connection oriented transmission requires more packets be sent across network, it is considered a slower transmission method.
(d) If the data that is sent has problems, the destination requests the source for retransmission by acknowledging only packets that have been received and are recognizable.
(e) Once the destination computer receives all of the data necessary to reassemble the packet, the transport layer assembles the data in the correct sequence and then passes it up, to the session layer.

Connectionless Transmission (uses UDP protocol)

(a) In this type of transmission the receiver does not acknowledge receipt of a packet.
(b) Sending device assumes that packet arrive just fine.
(c) This approach allows for much faster communication between devices.
(d) The trade-off is that connectionless transmission is less reliable than connection oriented.



Layer 3 – Network Layer 

Transport layer passes the data segments to network layer. Network layer works for the transmission of received data segment from one network to another network.Data units in Network layer are called packets .It is a layer where router resides. The function of Network Layer : Logical Addressing, Routing, Path Determination
Logical Addressing: IP addressing is done in Network Layer  called logical addressing
Every computer in a network has unique IP address.  Network Layer  assigns sender and receiver IP address to each segment to form a IP Packet

Routing: is method to route data packet from source to destination. It is based on logical address [IP + Mask].
Eg: Computer A is connected to network:1 and Computer B is connected to network:2 and from computer B there is a request to access facebook. Now face book server replies to computer B in a form of packet. This packet is to be delivered to computer B only. Since in a network each device has unique IP address. Network layer of Facebook server will add the source and destination IP address in the data packet. Suppose mask used is 255.255.255.0. This mask tells first three combinations represent the network and last one represent the host computer B.  Based on the IP address and Mask , routing decisions are made in computer network.

Path Determination: Computer can be connected to internet server or other computer in number of ways. Choosing the best possible path for data delivery from source to destination is called path determination
OSPF-Open shortest path first
BGP- Border Gateway protocol
ISIS- Intermediate system to Intermediate system
These protocols determine best possible  path for data packet delivery

Layer 2 - Data Link layer 
It is responsible for reliable node-to-node delivery of data. It receives the data from network layer and creates frames, add physical address to these frames and pass them to physical layer.
There are two types of addressing: 1.Logical Addressing (Done by Network Addressing) 2.Physical Addressing (Done by Data Link layer). MAC Address is a 12 digit alphanumeric number embedded in a  network interface card (NIC)of your computer. Data link layer is embedded as a software in NIC
Data link layer adds the header( i.e. Source and Destination physical address(MACAddress) and tail (Error control information) to the data packet to form a frame

Functions of Data Link Layer:             
Link Establishment and Termination: Establishes and terminates the logical link between two nodes.
Physical addressing: After creating frames, Data link layer adds physical addresses (MAC address) of sender and/or receiver in the header of each frame.
Frame Traffic Control: Tells the transmitting node to "back-off algorithm" when no frame buffers are available.
Frame Sequencing: Transmits/receives frames sequentially.
Frame Acknowledgment: Provides/expects frame acknowledgments. Detects and recovers from errors that occur in the physical layer by retransmitting non-acknowledged frames and handling duplicate frame receipt.
Frame Delimiting: Creates and recognizes frame boundaries.
Frame Error Checking: Checks received frames for integrity.
Media Access Management: determines when the node "has the right" to use the physical medium.
Flow control: It is the traffic regulatory mechanism implemented by Data Link layer that prevents the fast sender from drowning the slow receiver. If the rate at which data is absorbed by receiver is less that the rate produced in the sender, the data link layer imposes this flow control mechanism.
Error control: Data link layer provides the mechanism of error control in which it detects and retransmits damaged· or lost frames. It also deals with the problem of duplicate frame, thus providing reliability to physical layer.
Access control: When a single communication channel is shared by multiple devices, MAC sub-layer of data link layer helps to determine which device has control over the channel at a given time.
Feedback: After transmitting the frames, the system waits for the feedback. The receiving device then sends the acknowledgement frames back to the source providing the receipt of the frames.

Layer 1 – Physical Layer

The physical layer, the lowest layer of the OSI model, is concerned with the transmission and reception of the unstructured raw bit stream over a physical medium. It describes the electrical/optical, mechanical, and functional interfaces to the physical medium, and carries the signals for all of the higher layers. Physical layer defines the cables, network cards and physical aspects.
It is responsible for the actual physical connection between the devices. Such physical connection may be made by using twisted pair cable, fiber-optic, coaxial cable or wireless communication media. This layer gets the frames sent by the Data Link layer and converts them into signals compatible with the transmission media. If a metallic cable is used, then it will convert data into electrical signals; if a fiber optical cable is used, then it will convert data into luminous signals; if a wireless network is used, then it will convert data into electromagnetic signals; and so on.



No comments:

Post a Comment