TCP/IP Model
Where the OSI Model describes a highly theoretical model of inter-networked communication, the TCP/IP model much more significantly resembles actual communication on today's Internet. It's important to remember while discussing the TCP/IP model that it is still only a model. Actual implementation of protocols can be more complex and messy than the model describes. Make sure to keep this in mind, because TCP/IP relies on terms like TCP and IP, which are themselves the names of actual protocols.
Since TCP/IP (RFC 1122) is the closest model to the actual Internet, it's helpful to understand how it came to exist. It is the result of a research project funded by the United States Department of Defense (DOD). DOD's research agency is called Defense Advanced Research Projects Agency (DARPA). DARPA established ARPANET, the first wide-area packet-switching network. The first computers were connected in 1969 and the network was declared operational in 1975. After that, DARPA started to work on a protocol that enabled multiple separate networks to connect together in a network of networks.
In March 1982, DOD declared TCP/IP as the standard for all military computer networks. ARPANET was migrated to the 4th version of TCP/IP in January 1983. ARPANET was formally decommissioned in 1990 due to the widespread adoption of TCP/IP. Since commercial networks and enterprises were now linked together, there was no longer a need to further fund military and academic networks as the backbone for the Internet.
Compared to OSI, the TCP/IP model is less concerned with strict encapsulation. Instead, it's primary goal is to scope or classify communication at four different levels, in such a way that each level does not need to pay attention to the level below it. In other words, for all "X", communication at level "X" can happen according to the same defined rules, even if rules for communication at level "X - 1" have multiple implementations available. The four levels of communication TCP/IP attempts to isolate are between applications, between machines, between networks, and finally within a network. Each of these levels can be thought of as layers that roughly map to one or more layers of the OSI model.
Layer 4: The Application Layer (HyperText Transfer Protocol, File Transfer Protocol, Simple Mail Transfer Protocol, etc.) of TCP/IP can roughly be thought of as analogous in function to the Application, Presentation, and Session layers of the OSI model. Its purpose is to answer the question "What rules should we use to determine how different pieces of software can talk to each other?" HTTP, FTP, and SMTP are examples of protocols that live at the Application Layer.
Layer 3: The Transport Layer (TCP and UDP) of TCP/IP attempts to answer the question "What rules should we use to determine how machines should communicate together regardless of the networks they happen to be on?" As such, it accomplishes much of the same purpose as the OSI Transport Layer, but it also has some functions like session termination that would exist at the OSI Session Layer. It defines which port information should travel to/from. We'll cover ports in more detail later on, but for now, we can think of them as virtual windows into a machine. Different network services run on different ports, allowing the machine to receive different kinds of network traffic. TCP and UDP are by far the most well known protocols at Layer 3.
Layer 2: The Internet Layer (Internet Protocol) is arguably one of the important layers in understanding how the Internet is built. Its name, after all, is what we use to call this whole enterprise of online connectivity in the first place. The Internet Layer answers the question "What rules should we use to define how information travels between networks?" It's analogous to the OSI Network Layer, and is responsible for the concept of IP Addresses. IP, IPsec, and ICMP are examples of protocols that exist on the Internet Layer.
Layer 1: The Link Layer (Ethernet) answers the question "What rules should we use to define communication within the same physical network?" It is comparable to the OSI Data Link Layer, but may also perform some functions of the Network Layer as well. The TCP/IP model doesn't explicitly define an OSI Physical Layer equivalent, because it assumes that protocols should be mostly agnostic to the physical instantiation of data. ARP is one of the most important Link Layer protocols, and we'll learn more about it in an upcoming section.
Relevant Note(s): Information Technology Data Packets and Analysis