[ Standards, Protocols, Layered Architectures, OSI Architecture, TCP/IP Architecture]
Both the the OSI and the TCP/IP architectures are layered architectures, that is the functionality of the network is decomposed into layers, where a higher level layer uses the services provided by the layer immediately below it and where across a network communicating entities communicate exclusively at the same layer (i.e. if a sender entity at layer i sends a packet P, the receiver entity at layer i will receive P; these two are called peer entities).
application --> DNS SMTP FTP TELNET HTTP
| | | | |
| | | | |
| | | | |
| +--------------------------+
| |
| |
transport ----> UDP TCP
| |
| ICMP |
| | |
+------------------------------+
|
|
network ------> IP<--------------+
| |
ARP | |
| | |
+--------------+ |
| |
link ------> Ethernet PPP
| |
| |
physical ----> Ethernet modem
where:
As you can see from the diagram, there tend to be multiple protocols at each layer, except at the network layer. For this reason people talk of the hourglass structure of the internet protocols and see IP as the king of internet protocols.
There is a fundamental difference between the lowest three levels (the communication subnet) and the top four levels of the OS architecture. The bottom layers are between directly connected hosts thus they involve all the hosts in a path from sender to receiver. The top four layers are end-to-end protocols, that is, the communication is stated in terms of only the original sender and the final destination, independent of how many intermediate hosts are traversed. Intermediate nodes do not participate at all in the processing of the higher level protocols, to them it is data. [Think in terms of overhead: In the source and target node protocols at all layers are processed. In the intermediate nodes only protocols in the bottom three layers are processed.] This has a direct impact on efficiency: for example, error checking in protocols at the higher level is only done at the sender and receiver, not at each intermediate hosts.
Three related concepts in discussing layers are Services,
Interfaces, and Protocols.
Services are what a layer
provides to the layer above it (the former is the Service Provider
and the latter is the Service User).
A layer may provide more than one service. For
example the transport layer provides a connection-oriented service and a
connectionless service. A service will have a "service model"
expressed as a set of
primitives used to access that service. There are four basic
kinds of primitives:
Each message (message is the preferred name for the PDU at the session layer and above; at the transport layer, in particular TCP, segment is preferred; at the network layer datagram is used, but packet used to refer to the IDU exchanged at the Network to data link layer boundary (a packet is a datagram or a fraction thereof); at the data link, frame is used; and at the physical layer packet is common) consists of data being transmitted plus information required by the protocol for addressing, error detection, etc. This extra information appears as a header before that data and (may be) a trailer after the data, i.e. the data is encapsulated in the message. [Not all messages have both a header and a trailer. Usually the trailer is not present.] The message sent at layer i will be transmitted as data by the layer below it. Assuming that the layer below can transmit this data as a single message we will have the situation
Note that the headers and tails constitute transmission overhead, reducing the utilization of the bandwidth of the communication channel. Of course this is only part of the communication overhead: retransmissions and acknowledgements further reduce bandwidth.
A concept often used in communication is session. It consists of one or more connections. For example, a program on machine A may be involved in communication with a program on machine B, the connection drops due to communication problems. When communication is reestablished the programs continue from where they were in the session using a new connection. An example of a session is the interactions during a remote procedure call. The requestor has to send the request, possibly in multiple messages, the receiver collects them, processes the request, then sends back the results. All in one session.
The transmission units at different layers may be of different maximum sizes. We have here the same distinction that exists between "logical" and "physical" records in file systems.