TCP/IP, like most protocols, is a suite of protocols rather than being a single monolithic protocol. The Open Systems Interconnection (OSI) model describes how suites of protocols work together and it establishes an industry standard for network communication. The OSI model is a conceptual theory that describes how protocols should work. TCP/IP does not exactly map to the OSI model on a one-to-one basis, but it maps closely enough to offer insights into how the protocol functions in general. The OSI model is made up of seven layers, with each layer performing a different function to enable network communication. Each of the protocols within the TCP/IP protocol suite operate at one of the OSI layers. The seven layers of the OSI model include the following:
Note: The physical elements of the network actually reside in the physical layer. This includes the NIC and the appropriate communication medium, whether copper cabling, fiber optic cabling, radio transmitter/receiver (for wireless), IR transmitter/receiver, and so on. As data moves down the OSI model, each layer adds its own information. This process is known as encapsulation. On the receiving end, the information is stripped off as the data flows up the layers. This process is known as de-encapsulation.
Connection-Based and Connectionless ProtocolsSome protocols are connection-based while others are connectionless. The orientation of a protocol will define the relationship between two hosts when transmitting data. A protocol that is connection-based will require a formal relationship to be established between the transmission end-points before data is transferred. A connectionless protocol, on the other hand, requires no formal relationship to be established. The Transmission Control Protocol (TCP) is a connection-based protocol, meaning before data can be sent between two hosts, a session must first be established. TCP offers reliable delivery of data through sequencing, error checking, and flow control. TCP establishes a session through a process known as a three-way handshake. After a session is established, information can be reliably sent. Each datagram that is sent is assigned a sequence number. The sequence numbers ensure that the destination computer can reassemble the data in the proper order as it is received. The destination computer will send acknowledgments for segments that are received. If the source computer does not receive an acknowledgement within a certain amount of time, the segment will be retransmitted, thus ensuring delivery of information. Note FTP and Telnet are examples of programs that use TCP to transfer data between two TCP/IP hosts. Unlike TCP, UDP is a connectionless protocol. This means that UDP does not establish a session before sending data nor does it provide for reliable delivery. When information is sent, acknowledgements are not returned so it is just assumed that it has been received. UDP is more often used in one-to-many situations where information is sent using a broadcast or for multicasting (TCP is used for one-to-one communication). If reliable delivery and sequencing of datagrams is required, it is the responsibility of the application or a higher level protocol to provide these services. For example, UDP is often used by videoconferencing and streaming media applications because they require fast delivery of data. The Session Information Protocol (SIP) used for streaming media relies on UDP but also uses its own retransmission mechanisms because UDP does not offer reliable delivery of data. |