Purpose of Network Protocols
Without protocols, devices would lack the ability to understand the electronic signals they send to each other over network connections. Network protocols serve these basic functions:
Address data to the correct recipients.Physically transmit data from source to destination, with security protection if needed.Receive messages and send responses appropriately.
Consider a comparison between network protocols with how a postal service handles physical paper mail. Just as the postal service manages letters from many sources and destinations, network protocols keep data flowing along many paths continuously. Unlike physical mail, however, network protocols provide advanced capabilities. These include delivering a constant flow of messages to one destination (called streaming) and automatically making copies of a message for delivery to multiple destinations at once (called broadcasting).
Common Types of Network Protocols
No one protocol exists that supports all the features every computer network needs. Still, each serves as a key that unlocks a given network device or service. Different network protocols have been invented over the years, each attempting to support certain types of network communication. The three basic characteristics that distinguish one type of protocol from another are:
Simplex vs. duplex: A simplex connection allows only one device to transmit on a network. Duplex network connections allow devices to transmit and receive data across the same physical link. Connection-oriented or connectionless: A connection-oriented network protocol exchanges (a process called a handshake) address information between two devices that allow them to carry on a conversation (called a session). Connection-less protocols deliver individual messages from one point to another without regard for similar messages sent before or after (and without knowing whether messages are successfully received). Layer: Network protocols typically work together in groups (called stacks because diagrams often depict protocols as boxes stacked on top of each other). Some protocols function at lower layers closely tied to how different types of wireless or network cabling physically work. Others work at higher layers linked to how network applications work, and some work at intermediate layers in between.
The Internet Protocol Family
The common network protocols in public use belong to the Internet Protocol family. IP is the basic protocol that enables home and other local networks across the internet to communicate with each other. IP works well for moving individual messages from one network to another. It does not support the concept of a conversation (a connection over which a stream of messages can travel in one or both directions). The Transmission Control Protocol (TCP) extends IP with this higher layer capability. Because point-to-point connections are essential on the internet, the two protocols are paired together and known as TCP/IP. Both TCP and IP operate in the middle layers of a network protocol stack. Popular applications on the internet have sometimes implemented their protocols on top of TCP/IP. HyperText Transfer Protocol is used by web browsers and servers worldwide. TCP/IP, in turn, runs on top of lower-level network technologies like Ethernet. Other popular network protocols in the IP family include ARP, ICMP, and FTP.
How Network Protocols Use Packets
The internet and most other data networks work by organizing data into small pieces called packets. To improve communication performance and reliability, each large message sent between two network devices is often subdivided into smaller packets by the underlying hardware and software. These packet switching networks require packets to be organized in specific ways according to the protocols the network supports. This approach works well with the technology of modern networks as these handle data in the form of bits and bytes (digital 1s and 0s). Each network protocol defines rules for how its data packets must be organized. Because protocols like Internet Protocol often work together in layers, some data embedded inside a packet formatted for one protocol can be in the format of some other related protocol (a method called encapsulation). Protocols typically divide each packet into three parts—header, payload, and footer. Some protocols, like IP, do not use footers. Packet headers and footers contain the contextual information required to support the network, including addresses of the sending and receiving devices. Payloads contain the data to be transmitted. Headers or footers often include special data to improve the reliability and performance of network connections, such as counters that keep track of the order in which messages were sent and checksums that help network applications detect data corruption or tampering.
How Network Devices Use Protocols
The operating systems of network devices include built-in support for some lower-level network protocols. All modern desktop computer operating systems support Ethernet and TCP/IP, for example. Many smartphones support Bluetooth and protocols from the Wi-Fi family. These protocols connect to the physical network interfaces of a device, like its Ethernet ports and Wi-Fi or Bluetooth radios. Network applications support the higher-level protocols which talk to the operating system. A web browser, for example, translates addresses like http://lifewire.com/ into HTTP packets that contain the data that a web server can receive and send back the correct page. The receiving device is responsible for re-assembling individual packets into the original message by removing the headers and footers and concatenating packets in the correct sequence.