Protocol stack

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

In computer networking, protocols are often designed with a single purpose in mind. This modularisation makes design, and evaluation easier. Because each protocol module usually communicates with two others, they are commonly imagined as layers in a stack of protocols. The lowest protocol always deals with "low-level", physical interaction of the hardware. Every higher layer adds more features. User applications habitually deal only with the topmost layers.

  T ~ ~ ~ T
 [A]     [B]_____[C]

Imagine three computers A, B, and C. A and B both have radio equipment, and can communicate via the airwaves using a suitable network protocol like IEEE 802.11. B and C are connected via a cable, exchanging data over that - again with the help of a protocol (for example Ethernet). However, none of this two protocols will be able to transport information from A to C, because these computers are conceptually on different networks. One therefore needs an inter-network protocol to "connect" them.

One could combine our two protocols to form a powerful third mastering both cable and wireless transmission, but we would need a different super-protocol for each possible combination of protocols. It is easier to leave the base protocols alone, and design a protocol that can work on top of any of them (the Internet protocol is an example). This will make two stacks of two protocols each. The inter-network protocol will communicate with each of the base protocol in their simpler language. The base protocols will not talk directly to each other.

A request on computer A to send a chunk of data to C is taken by the upper protocol, which (through whatever means) knows that C is reachable through B. It therefore instructs the wireless protocol to transmit the data packet to B. On this computer, the lower layer handlers will pass the packet up to the inter-network protocol, which, on recognizing that B is not the final destination, will again invoke lower-level functions. This time, the cable protocol is used to send the data to C. There the received packet is again passed to the upper protocol, which (with C being the destination) will pass it on. Often an even higher-level protocol will sit on top, and incur further processing.

A commonly used protocol stack looks like this:

+- - - - - -+
| HTTP      |
+- - - - - -+
| TCP       |
+- - - - - -+
| IP        |
+- - - - - -+
| Ethernet  |
+- - - - - -+

See also: TCP/IP