How TCP/IP Works
- Jan 18, 2012
TCP/IP is a system (or suite) of protocols, and a protocol is a system of rules and procedures. For the most part, the hardware and software of the communicating computers carry out the rules of TCP/IP communications—the user does not have to get involved with the details. Still, a working knowledge of TCP/IP is essential if you want to navigate through the configuration and troubleshoot problems you’ll face with TCP/IP networks.
This hour describes the TCP/IP protocol system and shows how the components of TCP/IP work together to send and receive data across the network.
At the completion of this hour, you will be able to
- Describe the layers of the TCP/IP protocol system and the purpose of each layer
- Describe the layers of the OSI protocol model and explain how the OSI layers relate to TCP/IP
- Explain TCP/IP protocol headers and how data is enclosed with header information at each layer of the protocol stack
- Name the data package at each layer of the TCP/IP stack
- Discuss the TCP, UDP, and IP protocols and how they work together to provide TCP/IP functionality
The TCP/IP Protocol System
Before looking at the elements of TCP/IP, it is best to begin with a brief review of the responsibilities of a protocol system.
A protocol system such as TCP/IP must be responsible for the following tasks:
- Dividing messages into manageable chunks of data that will pass efficiently through the transmission medium.
- Interfacing with the network adapter hardware.
- Addressing: The sending computer must be capable of targeting data to a receiving computer. The receiving computer must be capable of recognizing a message that it is supposed to receive.
- Routing data to the subnet of the destination computer, even if the source subnet and the destination subnet are dissimilar physical networks.
- Performing error control, flow control, and acknowledgment: For reliable communication, the sending and receiving computers must be able to identify and correct faulty transmissions and control the flow of data.
- Accepting data from an application and passing it to the network.
- Receiving data from the network and passing it to an application.
To accomplish the preceding tasks, the creators of TCP/IP settled on a modular design. The TCP/IP protocol system is divided into separate components that theoretically function independently from one another. Each component is responsible for a piece of the communication process.
The advantage of this modular design is that it lets vendors easily adapt the protocol software to specific hardware and operating systems. For instance, the Network Access layer (as you learn in Hour 3, “The Network Access Layer”) includes functions relating to the specification and design of the physical network. Because of TCP/IP’s modular design, a vendor such as Microsoft does not have to build a completely different software package for TCP/IP on an optical-fiber network (as opposed to TCP/IP on an ordinary ethernet network). The upper layers are not affected by the different physical architecture; only the Network Access layer must change.
The TCP/IP protocol system is subdivided into layered components, each of which performs specific duties (see Figure 2.1). This model, or stack, comes from the early days of TCP/IP, and it is sometimes called the TCP/IP model. The official TCP/IP protocol layers and their functions are described in the following list. Compare the functions in the list with the responsibilities listed earlier in this section, and you’ll see how the responsibilities of the protocol system are distributed among the layers.
Figure 2.1 The TCP/IP model’s protocol layers.
Network Access layer: Provides an interface with the physical network. Formats the data for the transmission medium and addresses data for the subnet based on physical hardware addresses. Provides error control for data delivered on the physical network.
Internet layer: Provides logical, hardware-independent addressing so that data can pass among subnets with different physical architectures. Provides routing to reduce traffic and support delivery across the internetwork. (The term internetwork refers to an interconnected, greater network of local area networks (LANs), such as what you find in a large company or on the Internet.) Relates physical addresses (used at the Network Access layer) to logical addresses.
Transport layer: Provides flow-control, error-control, and acknowledgment services for the internetwork. Serves as an interface for network applications.
Application layer: Provides applications for network troubleshooting, file transfer, remote control, and Internet activities. Also supports the network application programming interfaces (APIs) that enable programs written for a particular operating environment to access the network.
Later hours provide more detailed descriptions of the activities at each of these TCP/IP protocol layers.
When the TCP/IP protocol software prepares a piece of data for transmission across the network, each layer on the sending machine adds a layer of information to the data that is relevant to the corresponding layer on the receiving machine. For instance, the Internet layer of the computer sending the data adds a header with some information that is significant to the Internet layer of the computer receiving the message. This process is sometimes referred to as encapsulation. At the receiving end these headers are removed as the data is passed up the protocol stack.