TCP Protocol Layers

TCP/IP is an industry standard set of protocols developed by the U.S. Department of Defense Advanced Research Projects Agency (DARPA) in 1969, the same year ATT dropped off Multix project and the development of Unix was started. in 1980 Berkeley lands large DARPA contract and forms Computer Systems Research Group (CSRG) which implements TCP/IP on Unix.

A data communication protocol is a set of rules that must be followed for the two electronic devices to communicate

The following mapping helps you better understand the terms used:
  • Model = structure
  • Layer = functions
  • Protocol = rules

Each communication protocol has three aspects that need to be thorously and unambiquesly defined.

  • Syntax - Data format and coding
  • Semantics - Control information and error handling
  • Timing - Speed matching and sequencing

Many protocols were developed to provide and support data communications. They form a communication architecture, sometimes referred as "protocol stack". For example TCP/IP family of protocols are often referred to as "TCP protocol stack".

Each protocol provides for a function that is needed to make the data communication possible. Many protocols are used so that the problem can be broken into manageable pieces. Each software module that implements a protocol can be developed and updated independently of other modules, as long as the interface between modules remains well defined and does not change. So it is very important for a protocol to have published standard approved by some international body. TCP/IP model has standards that are defined and described in Request for Comment (RFC) documents. RFCs are documents that describe various layers protocol architecture and functions. They are sequentially numbered and are freely accessible from http://www.ietf.org and several other sites (for example www.faqs.com ). Various national and international organizations influenced the development of TCP-IP protocol stack. Among them:

  • Internet Architecture Board (IAB), www.iab.org/
  • Internet Engineering Task Force (IETF), www.ietf.org/
  • Internet Society, www.isoc.org/
  • The Internet Corporation of Assigned Names and Numbers (ICANN), www.icann.org/
  • Internet Research Task Force (IRTF), www.irtf.org/
  • World Wide Web Consortium (W3C), www.w3.org/

As we mentioned before conceptually you can view TCP/IP protocol stack as consisting of several layers. You can think of layers in terms of object oriented programming (classes and subclasses) or in term of libraries. Some of the advantages of a layered model are similar to advantages of modular programming:

  • Diminish the complexity of networking by separating it into many functions or layers
  • Introduction of changes or new features in one layer can be accomplished without changes in the other layers
  • Provides a standard to follow, allowing inter-operability between software and hardware vendors
  • Simplifies troubleshooting

TCP/IP model is a four-layered structure. The layers are as following:

  1. Application layer
    • Refers to standard network services like http, ftp, telnet as well as communication methods used by various application programs
    • Also defines compatible representation of all data
  2. Transport layer
    • Manages the transfer of data by using connection oriented (TCP) and connectionless (UDP) transport protocols
    • Manages the connections between networked applications
  3. Internet layer
    • Manages addressing of packets and delivery of packets between networks
    • Fragments packets so that they can be dealt with by lower level layer (Network Interface layer Network)
  4. Network Interface layer
    • Delivers data via physical link (Ethernet is the most common link level protocol )
    • Provides error detection and packet framing

Each layer in the DARPA model corresponds to one or more layers of the seven-layer Open Systems Interconnection (OSI) model. The latter is a purely bureaucratic invention by one of semi-useless international organizations and has neither theoretical value (being rather naive view on layers) or practical significance (TCP-IP is the king of the hill) but still each year students are tortured with this crap and need to memorize the correspondence between TCP-IP layers and OSI layers.

The main ideas about formal correspondence between TCP-IP layers and OSI layers can be easily deducted from the following diagram:

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. There are many Application layer protocols and new protocols are always being developed.

The most widely-known Application layer protocols are those used for the exchange of user information:

  • The Hypertext Transfer Protocol (HTTP) is used to transfer files that make up the Web pages of the World Wide Web.
  • The File Transfer Protocol (FTP) is used for interactive file

    transfer.

  • The Simple Mail Transfer Protocol (SMTP) is used for the transfer of mail messages and attachments.
  • Telnet, a terminal emulation protocol, is used for logging on remotely to network hosts.

Additionally, the following Application layer protocols help facilitate the use and management of TCP/IP networks:

  • The Domain Name System (DNS) is used to resolve a host name to an IP address.
  • The Routing Information Protocol (RIP) is a routing protocol that routers use to exchange routing information.
  • The Simple Network Management Protocol (SNMP) is used between a network management console and network devices (routers, bridges, intelligent hubs) to collect and exchange network management information.

Examples of Application layer interfaces for TCP/IP applications are Sockets and NetBIOS. Sockets provides a standard application programming interface (API) for interprocess communication via TCP/IP. NetBIOS is an industry standard interface for accessing protocol services such as sessions, datagrams, and name resolution.

Transport Layer

The Transport layer (also known as the Host-to-Host Transport layer) is responsible for providing the Application layer with session and datagram communication services. The core protocols of the Transport layer are Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Either of these two protocols are used by the application layer process, the choice depends on the application's transmission reliability requirements.

The mechanisms used by the Transport layer to determine whether data has been correctly delivered are:

  • Acknowledgement responses
  • Sequencing
  • Flow control

The Transport layer facilitates end-to-end data transfer. It supports multiple operations simultaneously. The layer is implemented by two protocols: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP uses packets called segments, while UDP uses packets called datagrams. Both TCP and UDP are encapsulated

inside Internet layer datagrams for transmission to the next node.

The Transport layer facilitates two types of communication:

  • Connection-oriented (TCP) – A connection must be established at the Transport layer of both systems before the application can transmit any data.
  • Connectionless (UDP) – All systems do not need to establish a connection with the recipient prior to data exchange. TCP is a more reliable form of data exchange than UDP.

TCP and UDP:

  • TCP is a reliable, connection-oriented protocol that provides error checking and flow control through a virtual link that it establishes and finally terminates. TCP is responsible for the establishment of a TCP connection (TCP handshake ), the sequencing and acknowledgment of packets sent, and the recovery of packets lost during transmission.
  • UDP is an unreliable, connectionless protocol that provides data transport with lower network traffic overheads than TCP. UDP is used when the amount of data to be transferred is small (such as the data that would fit into a single packet), or when the overhead of establishing a TCP connection is not desired or when the applications or upper layer protocols provide reliable delivery. UDP does not error check or offer any flow control, this is left to the application process. Still it can be used by protocols that provide reliable packet transmission like NFS.

The Transport layer encompasses the responsibilities of the OSI Transport layer and some of the responsibilities of the OSI Session layer.

Internet Layer

This layer is responsible for addressing, packaging, and routing functions. It allows communication across networks of the same and different types and carries out translations to deal with dissimilar data addressing schemes. The core protocols of the Internet layer are IP, ARP, ICMP, and IGMP.
  • The Internet Protocol (IP) is a routable protocol responsible for IP addressing, routing, and the fragmentation and reassembly of packets.
  • The Address Resolution Protocol (ARP) is responsible for the resolution of the Internet layer address to the Network Interface layer address such as a hardware address.
  • The Internet Control Message Protocol (ICMP) is responsible for providing diagnostic functions and reporting errors due to the unsuccessful delivery of IP packets.
  • The Internet Group Management Protocol (IGMP) is responsible for the management of IP multicast groups.

The Internet layer is analogous to the Network layer of the OSI model.

Network Interface Layer

Ethernet is the most popular network access layer protocol. Its hardware operates at the physical layer and its medium access control method (CSMA/CD) operates at the datalink layer.

The Network Interface layer encompasses the Data Link and Physical layers of the OSI model. Note that the Internet layer does not take advantage of sequencing and acknowledgment services that might be present in the Data-Link layer. An unreliable Network Interface layer is assumed, and reliable communications through session establishment and the sequencing and acknowledgment of packets is the responsibility of the Transport layer.

Source: www.softpanorama.org

Category: Forex

Similar articles: