The OSI transport layer (Layer 4) defines several functions, the most important of which are error recovery and flow control. Likewise, the TCP/IP transport layer protocols also implement these same types of features. Note that both the OSI model and the TCP/IP model call this layer the transport layer. But as usual, when referring to the TCP/IP model, the layer name and number are based on OSI, so any TCP/IP transport layer protocols are considered Layer 4 protocols. Let’s know about OSI reference and TCP/IP model:
OSI Reference Model
A network reference model serves as a blueprint, dictating how network communication should occur. The OSI model was the first true network model , and consisted of seven layers. The Open Systems Interconnection (OSI) model was developed in the 1970’s and formalized in 1983 by the International Organization for Standardization (ISO). The OSI Model consists of seven layers, each corresponding to a particular network function:
Layer 7 Application Layer
Application layer consists of protocols that focus on process-to-process communication across an IP network and provides a firm communication interface and end-user services. It is also called User layer because it provides interaction to User. Example: SMTP, DHCP, FTP, HTTP, HTTPS etc PDU format is DATA.
Layer 6 Presentation Layer
Presentation layer is used to present data to the application layer in an accurate, well-defined and standardized format. It provides proper format to the file. Encryption & Decryption and Compression & Decompression is done. Example : Text, Images, Videos, Audio etc. PDU format is DATA.
Layer 5 Session Layer
Session layer is the fifth layer and provides the mechanism for opening, closing and managing a session between end-user application processes. It creates different session for different session ID with the help of Port number. Port no. is of 16 bit (0-65535) value. Port are of 2 types. Well known ports(0-1023) & Open ports (1024-65535). Example: FTP-80, DNS-53, DHCP-67/68. PDU format is DATA.
Layer 4 Transport Layer
The transport layer is the fourth layer in the open system interconnection model responsible for end-to-end communication over a network. Transport layer ensures the reliable arrival of messages and provides error checking mechanisms and data flow controls. It provides transparent transfer of data between end systems using the services of the network. There are 2 Services in Transport layer i.e TCP and UDP
- TCP stands for Transmission Control Protocol, It is Connection Oriented, Slow but Reliable transport protocol.
- UDP stands for User Datagram Protocol, It is Connection Less, fast but Unreliable transport protocol.
PDU format is SEGMENT.
Layer 3 Network Layer
The network layer is the third level of the Open Systems Interconnection Model (OSI Model) and the layer that provides data routing paths for network communication. Data is transferred in the form of packets via logical network paths in an ordered format controlled by the network layer. L3 is responsible for Best path selection between Source to Destination. Example: EIGRP, OSPF, VRRP, PIM, ICMP etc PDU format is PACKET.
Layer 2 Data Link Layer
The data link layer is the second layer of the OSI model & It is most reliable node to node delivery of data. It forms frames from the packets that are received from network layer and gives it to physical layer. Data-link layer is responsible for implementation of point-to-point flow and error control mechanism. Flow Control. Example, CDP, ARP, PPP, FDDI etc It has a 2 sub layer: LLC sublayer & MAC sublayer.
- LLC-Logical Link Control is the upper sublayer of L2 and it performs Error control, Framing, Flow control & responsible for identifying different protocol logically.
- MAC is the lower sublayer of L2 and it frames data received from the upper layer and passes them to the physical layer. It also defines how to transmit data on physical layer. Example CSMA/CD.
PDU format is FRAME.
Layer 1 Physical Layer
The physical layer is the lower layer of the OSI Model and it deals with bit-level transmission between different devices. Example: Cables, NIC, Hub, Repeater etc. PDU format is BITS.
TCP/IP Model
TCP/IP also is a layered protocol but does not use all of the OSI layers. OSI model was theoretical model and protocol-independent standard but TCP/IP is the model aroung which Network or internet is developed and it is protocol-dependent model.It is occasionally known as the Department of Defense (DoD) model, because the development of the networking model was funded by DARPA. The TCP/IP Model consists of four layers:
Layer 4 Application Layer
The Application layer provides applications the ability to access the services of the other layers and defines the protocols that applications use to exchange data. IN TCP/IP Application layer is the Combined layer of Application, Presentation & Session Layer of the OSi model. Application layer in TCP/IP also performs Encryption, Decryption along with helps on creating Sessions. Example of Application Layer Protocol are BGP, DHCP, DNS, TELNET, HTTP etc.
Layer 3 Host-to-Host (Transport) Layer
Host to Host layer is equivalent to Network Layer of OSI model. It provides the services for Secure data transmission from Source and Destination. ensures the reliable arrival of messages and provides error checking mechanisms and data flow controls. It provides transparent transfer of data between end systems using the services of the network. It uses 2 Services i.e TCP and UDP.
Layer 2 Internet layer
The Internet layer is responsible for addressing, packaging, and routing functions. This layer is equivalent to Network Layer of OSI Model. Internet Layer is responsible to provide best path to reach destination. The core protocols of the Internet layer are IP, ARP, ICMP, and IGMP.
Layer 1 Network Access Layer
Network Access layer is responsible for placing TCP/IP packets on the network medium and receiving TCP/IP packets off the network medium. TCP/IP was designed to be independent of the network access method, frame format, and medium. In this way, TCP/IP can be used to connect differing network types. These include LAN technologies such as Ethernet and Token Ring and WAN technologies such as Frame Relay. Network Access layer encompasses the Data Link and Physical layers of the OSI model.