Chapter 10: Hardware and communication
http
https
TCP
FTP UDP
Application layer Transport layer
IP
Network layer
hardware layer
Data link layer
Figure 10.18: TCP/IP protocol stack.
e
At each layer, apart from the bottom layer, there is a choice of which protocol to use. Each choice provides a different service, which will provide different properties for the packet being sent.
Sa m
pl
The top layer has a large number of options and is sometimes referred to as the presentation or application layer. Protocols used in this layer are very specific to applications. For example, HTTP (hypertext transfer protocol) is used to transport the HTML of webpages, while FTP (file transfer protocol) is used to send simple files over a network. The transfer protocol used at layer three depends on the application that is running. Having this choice of layer three protocols means that it is very easy to add new protocols without having to change any of the existing structure.
This is possible because there is a common interface between layer three and layer two. So HTTP and FTP create a packet differently, but they set it up in a way that any of the layer two protocols will understand. Each protocol offers different services, but always formats packets so that they can be understood by the other layers. The service access point (SAP) is where protocols will communicate with each other (Figure 10.19) and is generic, so that any protocol can be swapped out without affecting the other protocols in the stack. That way, the application chooses the service it requires, without having to tailor the data for a specific protocol. It is important to note that protocols at both ends of the network must match, otherwise the packet will not be understood.
Service access point
HTTP TCP
Figure 10.19: SAP.
Figure 10.20 shows how elements of the TCP/IP protocol stack communicate. The principle applies equally to other protocol stacks. Each protocol in the stack communicates along the logical communication lines. Each protocol considers that it communicates directly with its counterpart on the destination machine, and it does so by adding data to a packet’s header for its counterpart to read. However, what actually occurs is that information is passed down each protocol, with data being added to the packet’s header as it goes, before being placed on the network hardware, which transports it. At the destination, the packet is passed back
© Cambridge University Press 2017 The third party copyright material that appears in this sample may still be pending clearance and may be subject to change.
219