Friday, November 6, 2020

OSI Model 7 Layer

OSI stands for Open Systems Interconnection. It has been developed by ISO – ‘International Organization of Standardization‘, in the year 1984. It is a 7 layer architecture with each layer having specific functionality to perform.

L1 [Physical Layer]

The lowest layer of the OSI reference model is the physical layer. It is responsible for the actual physical connection between the devices. The physical layer contains information in the form of bits. It is responsible for transmitting individual bits from one node to the next. When receiving data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will put the frame back together.

1)Bit synchronization: The physical layer provides the synchronization of the bits by providing a clock. This clock controls both sender and receiver thus providing synchronization at bit level.

2)Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent per second.

3)Physical topologies: Physical layer specifies the way in which the different, devices/nodes are arranged in a network.
a) Bus

 
b) Star 


c) Mesh 


d) Tree(Cisco three layer hierarchical model)


e) Ring



4)Transmission mode: Physical layer also defines the way in which the data flows between the two connected devices. 
a) Simplex


b) half-duplex 


c) full-duplex



Example. 
1) Hub


2) Modem


3) Cable Ethernet


4) Fiber(Single Mode, Multi Mode)


L2 [Data Link Layer]

The data link layer is responsible for the node to node delivery of the message. The main function of this layer is to make sure data transfer is error-free from one node to another, over the physical layer. When a packet arrives in a network, it is the responsibility of DLL to transmit it to the Host using its MAC address.

The packet received from Network layer is further divided into frames depending on the frame size of NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the wire asking “Who has that IP address?” and the destination host will reply with its MAC address.

ARP
The address resolution protocol (arp) is a protocol used by the Internet Protocol (IP) [RFC826], specifically IPv4, to map IP network addresses to the hardware addresses used by a data link protocol. The protocol operates below the network layer as a part of the interface between the OSI network and OSI link layer.


RARP
The Reverse Address Resolution Protocol (RARP) is an obsolete computer networking protocol used by a client computer to request its Internet Protocol (IPv4) address from a computer network, when all it has available is its link layer or hardware address, such as a MAC address.

a) Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the beginning and end of the frame.

b) Physical addressing: After creating frames, Data link layer adds physical addresses (MAC address) of sender and/or receiver in the header of each frame.

c) Error control: Data link layer provides the mechanism of error control in which it detects and retransmits damaged or lost frames.

d) Flow Control: The data rate must be constant on both sides else the data may get corrupted thus , flow control coordinates that amount of data that can be sent before receiving acknowledgement.

e) 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.

Media Access Control (MAC) Address
MAC Addresses are unique 48-bits hardware number of a computer, which is embedded into network card (known as Network Interface Card) during the time of manufacturing. MAC Address is also known as Physical Address of a network device.


L3 [Network Layer]

Network layer works for the transmission of data from one host to the other located in different networks. It also takes care of packet routing selection of the shortest path to transmit the packet, from the number of routes available. The sender & receiver’s IP address are placed in the header by the network layer.
The functions of the Network layer are :

a) Routing: The network layer protocols determine which route is suitable from source to destination. This function of network layer is known as routing.

b) Logical Addressing: In order to identify each device on internetwork uniquely, network layer defines an addressing scheme. The sender & receiver’s IP address are placed in the header by network layer. Such an address distinguishes each device uniquely and universally.
Example IPv6, IPv4

L4 [Transport Layer]

Data in the Transport Layer is called as Segments. Transport Layer is called as Heart of OSI model. Transport layer provides services to application layer and takes services from network layer. The data in the transport layer is referred to as Segments. It is responsible for the End to End Delivery of the complete message. The transport layer also provides the acknowledgement of the successful data transmission and re-transmits the data if an error is found.

At sender’s side:
Transport layer receives the formatted data from the upper layers, performs Segmentation and also implements Flow & Error control to ensure proper data transmission. It also adds Source and Destination port number in its header and forwards the segmented data to the Network Layer.
Note: The sender need to know the port number associated with the receiver’s application.
Generally, this destination port number is configured, either by default or manually. For example, when a web application makes a request to a web server, it typically uses port number 80, because this is the default port assigned to web applications. Many applications have default port assigned.

At receiver’s side:
Transport Layer reads the port number from its header and forwards the Data which it has received to the respective application. It also performs sequencing and reassembling of the segmented data.

The functions of the transport layer are :

Segmentation and Reassembly: This layer accepts the message from the (session) layer , breaks the message into smaller units . Each of the segment produced has a header associated with it. The transport layer at the destination station reassembles the message.

Service Point Addressing: In order to deliver the message to correct process, transport layer header includes a type of address called service point address or port address. Thus by specifying this address, transport layer makes sure that the message is delivered to the correct process.

The services provided by the transport layer :

Connection Oriented Service: It is a three-phase process which include
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement, back to the source after a packet or group of packet is received. This type of transmission is reliable and secure.

Connection less service: It is a one-phase process and includes Data Transfer. In this type of transmission, the receiver does not acknowledge receipt of a packet. This approach allows for much faster communication between devices. Connection-oriented service is more reliable than connectionless Service.

https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml

TCP(Transmission Control Protocol)

1) TCP is a connection-oriented protocol.

2) Connection-orientation means that the communicating devices should establish a connection before transmitting data and should close the connection after transmitting the data.

3) TCP is reliable as it guarantees delivery of data to the destination router.

4) TCP provides extensive error checking mechanisms. It is because it provides flow control and acknowledgment of data.

5) Sequencing of data is a feature of Transmission Control Protocol (TCP). this means that packets arrive in-order at the receiver.

6) TCP is comparatively slower than UDP.

7) Retransmission of lost packets is possible in TCP, but not in UDP.

8) TCP has a (20-80) bytes variable length header.

9) TCP is heavy-weight.

10) TCP doesn’t supports Broadcasting.

11) TCP is used by HTTP, HTTPs, FTP, SMTP and Telnet.

UDP(User Datagram Protocol)

1) UDP is the Datagram oriented protocol.

2) This is because there is no overhead for opening a connection, maintaining a connection, and terminating a connection. UDP is efficient for broadcast and multicast type of network transmission.

3) The delivery of data to the destination cannot be guaranteed in UDP.

4) UDP has only the basic error checking mechanism using checksums.

5) There is no sequencing of data in UDP. If ordering is required, it has to be managed by the application layer.

6) UDP is faster, simpler and more efficient than TCP.

7) There is no retransmission of lost packets in User Datagram Protocol (UDP).

8) UDP has a 8 bytes fixed length header.

9) UDP is lightweight.

10) UDP supports Broadcasting.

11) UDP is used by DNS, DHCP, TFTP, SNMP, RIP, and VoIP.

L5 [Session Layer]

This layer is responsible for establishment of connection, maintenance of sessions, authentication and also ensures security.
The functions of the session layer are :

Session establishment, maintenance and termination: The layer allows the two processes to establish, use and terminate a connection.

Synchronization : This layer allows a process to add checkpoints which are considered as synchronization points into the data. These synchronization point help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.

Dialog Controller : The session layer allows two systems to start communication with each other in half-duplex or full-duplex.

L6 [Presentation Layer]

Presentation layer is also called the Translation layer. The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.
The functions of the presentation layer are :

Translation : For example, ASCII to EBCDIC.

Encryption/ Decryption : Data encryption translates the data into another form or code. The encrypted data is known as the cipher text and the decrypted data is known as plain text. A key value is used for encrypting as well as decrypting data.
Compression: Reduces the number of bits that need to be transmitted on the network.

L7 [Application Layer]

At the very top of the OSI Reference Model stack of layers, we find Application layer which is implemented by the network applications. These applications produce the data, which has to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user.
Ex: Application – Browsers, Skype Messenger etc.

The functions of the Application layer are :

1) Network Virtual Terminal
2) FTAM-File transfer access and management
3) Mail Services
4) Directory Services

Thanks & Regards
UConfigIt

No comments:

Post a Comment