A means for humans to deal with complexities is to form abstractions, then encapsulate these abstractions with an interface. The implementation of the abstraction may be complex, but from the outside only the interface is available, and the users of the interface aren't concerned with the insides. An encapsulated complexity isn't a complexity.
Abstractions and interfaces aren't enough. Some means must be found to organize them. In networking, as in operating systems, this means a layered model, or a protocol stack.
layersEach layer provides services to the layer above it, and in turn uses the services of the layer below it. The services are defined by the layers interface. No communication outside of the above/below layer is allowed. The implementation of each layer may be quite complex, but this is made transparent to the layer above by the interface.
protocol between peer layers
interface between layers
physical medium
When two computers using a layered protocol stack communicate they do so layer-to-layer. Corresponding layers have a protocol which defines how the layers in the two computers talk to each other. Each layer in a protocol stack communicates only with its peer layer in the protocol stack on the other computer.
A protocol is the implentation of a layer. As such, it is hidden from the layer above it via the service interface. A protocol may be changed (on both ends, of course) without causing confusion to the layer above as long as the service interface is maintained.
networking hardware failuresThere are simply too many details and too many problems to be mastered when communicating for a single magic protocol or layer to handle them all. The problem has to be broken into smaller pieces.
media failures
noise and data corruption
congested networks & finite buffers
variable delay in delivering data
duplicated data
lost data
data out of order with respect to how it was sent
Comer makes an analogy between a protocol stack model and programming in a high level language. Both processes:
divide a big problem into manageable pieces
are arranged linearly
<sender and receiver, N layers, identical objects, peer protocol conversations>Actual movementWhat's ignored: the actual flow of data (down, across, up).
As data is passed down to each layer, the data has information added to it in the form of a header (or a trailer). When it reaches the other stack, the headers (trailers) are stripped off and the result is passed upwards.In communicating through protocol stack architecture, a message is passed down, across and up. Even though we talk about protocols between peer layers, the flow of data is down, across, and up. The conceptual flow is horizontal, peer-to-peer.<header being added at each layer, becoming next layer down data field, trailer on data link layer>
The messages or data units at each layer are identical on the sender and the receiver.
OSI does a good job of making explicit the separate concepts of services, interfaces, and protocols. The model was designed (by committee) before any protocols (implentation) was done. This is good for the clean separation of concepts, but bad for creating a protocol stack that's useful in the real world.
Application layer (7)
Application layer
![]()
OSI stack next to TCP/IP stack
The simplistic picture we drew earlier ignored the actal flow of data through the network. We can correct this and show it for TCP/IP.<sender and receiver, intermediary nodes>
<Comer, Figure 11.7>
End systems (hosts, computers, devices) are attached to local networks or dynamically join local networks.
Individual machines and small local networks are attached to local ISPs.
The local ISPs pay their bill to regional ISPs for connectivity.
The regional ISPs have connections to national access points or places where national ISPs come together. Possibly they connect directly to NSP hubs.
The NSPs themselves consist of long distance backbone networks of very high capacity.
The NAPs are usually small but very high capacity internetworks with many links and switches located in large metropolitan areas.
Each host can have 4095 simultaneous, multiplexed (switched) virtual circuits going to other hosts. Each circuit would correspond to a process. Permanent virtual circuits are also supported.
Physical layer
Like a virtual leased-line. You must keep the average traffic below a certain level, but you get higher peak service speeds.
The only service provided is to distinguish the start/stop of each frame sent, and whether a frame was corrupted in transit. Anything else is up to the user of the frame relay.
Based on ATM (Asynchronous Transfer Mode). ATM supports all types of services by using a small, fixed length packets (53 bytes) called cells. For this reason, the services provided by ATM are known as cell relay (analogous to frame relay).
Cell switching has the advantages that packet switching has over circuit switching, but is more flexible. Fixed size cells can also be switched faster, which is important given that gigabit speeds will be used in ATM.
ATM is connection-oriented, but only partially reliable (cells are delivered in order, but may be lost). Being connection-oriented allows for quality-of-service guarantees for synchronous data like voice, video.
ATM reference model is quite different than OSI or TCP/IP. <figure 1.30>
ConnectivitySome possibilities are:Two types of services offered by the layers: connection-oriented and connectionless service. Connection-oriented establishes a connection, transfers data, tears the connection down. More overhead in starting, but each message can assume that the connection has already been established. Analogous to a human conversation.ReliabilityBy contrast, connectionless service means each packet carries all the information needed to deliver it. No connection is made ahead of time. Analogous to sending a postal letter.
Reliability refers to whether data may be lost, out of sequence, or duplicated. It does not refer to whether corrupted data may be received unknowingly.Message boundariesByte pipe versus discrete messages.
connection-oriented
Connection-oriented, reliable, byte stream
and
Connectionless, unreliable, message
| Layer | Data unit | Application | message | Transport | segment | Network | packet | Data Link | frame | Physical | bit |