Microsoft Windows uses a collection of protocols to communicate over the network, called Transmission Control Protocol/Internet Protocol (TCP/IP). TCP/IP is a suite of protocols developed in 1969 by the U.S. Department of Defense in order to connect different branches of the U.S. military and enable them to communicate. At first, in the early 1960s, different U.S. military departments chose different vendors as computer system suppliers. For instance, the navy chose Unisys, the army chose Digital Equipment Corporation (DEC), and the air force chose International Business Machines (IBM). After a while, the departments needed to communicate between themselves and to exchange data, but it was difficult since each department had a different computer system. The Department of Defense started a project to connect all the branches and enable them to communicate. The TCP/IP suite of protocols was developed, and the fourth iteration of the IP protocol, IPv4, became the standard to connect the world's computers and devices.
TCP provides the reliable delivery of messages and defines delivery mechanisms for data transfers. In comparison, IP manages network routing from the sender to the receiver. The TCP/IP suite of protocols works by mapping to a layered protocol architecture stack, or model, and it is aligned with the Open System Interconnect (OSI) architectural model. The OSI uses a seven-layer architecture model, while TCP/IP uses a four-layer architectural model. Additionally, each TCP/IP layer corresponds to one or more OSI layers.
The four layers that the TCP/IP model uses are network interface, internet, transport, and application. The seven OSI layers are physical, data-link, network, transport, session, presentation, and application.
The following diagram shows the TCP/IP protocol architecture layers along with the OSI model layers:
Each layer provides specific functionality within its architectural layer model, such as routing, addressing, packaging, or session communication. There are four TCP/IP Architecture Layers, as shown in the diagram: Network Interface Layer, Internet Layer, Host-to-Host or Transport Layer, and Application Layer.
The network interface layer or network access layer addresses physical transmissions, by putting packets of data onto the medium and retrieving data packets off the medium.
The internet layer deals with routing, addressing, and packaging tasks; the common internet protocols are IP, Address Resolution Protocol (ARP), Internet Group Management Protocol (IGMP), and the Internet Control Message Protocol (ICMP).
The transport layer protocols are TCP and the User Datagram Protocol (UDP). TCP is a reliable, connection-oriented protocol, which is responsible for packet delivery, while UDP is a connectionless and unreliable protocol, which is used to transfer smaller-sized packets.
The application layer is the protocol that directly communicates and exchanges data with applications; the best-known representatives are Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), and Simple Mail Transfer Protocol (SMTP).
TCP also uses ports, which are specific endpoints for data packet delivery. Let's suppose that a user is browsing the internet using a web browser, sending and receiving emails through their favorite email client, and uploading a file using an FTP client. If there were no ports, how would the computer know what data packet belongs to each application? The answer is by using standardized and predefined port numbers. This is so that multiple applications can send and receive information to and from the network at the same time.
The following screenshot lists some well-known ports: