A set of layers and protocols is called
'network architecture'. The specification
of architecture must contain enough information to allow
an implementer to write the program or build the hardware
for each layer so that it correctly obey the appropriate
protocol. Neither the details of the implementation
nor the specification of the interfaces are part of
the architecture because these are hidden inside the
machines and are not visible from the outside. It is
not even necessary that the interfaces on all machines
in a network be the same, provided that each machine
can correctly use all the protocols. A list of protocols
used by a certain system, one protocol per layer, is
called a protocol stack.
An analogy may help explain the idea of multilayer communication.
Imagine two philosopher (Peer processes in layer 3),
one of them speaks Urdu and English and the other one
speaks Chinese and French. Since they have no common
language, they both engage a translator (peer processes
at layer 2), each of them in turn contacts a secretary
(peer processes in layer 1). Philosopher 1 wishes to
convey his affection for oryctolagus cuniculus to his
peer. To do so, he passes a message (in English) across
the 2/3 interface, to his translator, saying "I like
rabbits," (click
here to view the illustration). The translators
have agreed on a neutral language, Dutch, so the message
is converted to "Ik hou van konijnen". The choice of
language is the layer 2 protocol and is up to the layer
2 peer processes.
The translator then gives the message to a secretary
for transmission, by, for example, fax (the layer 1
protocol). When the message arrives, it is translated
into French and passes across the 2/3 interface to philosopher
2.Note that each protocol is completely independent
of the other ones as long as the interfaces are not
changed. The translators can switch from Dutch to say,
French, at will, provided that they both agree, and
neither changes his interface with either layer 1 or
layer 3.
Similarly the secretaries can switch
from fax to email, or telephone without disturbing (or
even informing) the other layers. Each process may add
some information intended only for its peer.This information
is not passed to the layer above in the format required
for that. Now consider a more technical example: how
to provide communication to the top layer of the five-layer
network in illustration below. A message, M, is produced
by an application process running in layer 5 and given
to layer 4 for transmission. Layer 4 puts a header in
front of the message to identify the message and passes
the result to layer 3. The header includes control information,
such as sequence numbers to allow layer 4 on the destination
machine to deliver messages in the higher order if the
lower layers do not maintain sequence. In some layers,
headers layer contain sizes, times, and other control
fields.
In many networks, there is no limit
to the size of messages transmitted in the higher 4
protocol, but there is nearly always a limit imposed
by the layer 3 protocol consequently, layer 3 must break
up the incoming messages into smaller units, packets,
pretending a layer 3 header to each packet. In this
example, M is split into two parts, M1 and M2.
Layer 3 decides which of the outgoing lines to use and
passes the packets to layer 2. Layer 2 adds not only
a header to each piece, but also a trailer, and gives
the resulting unit to layer 1 for physical transmission.
At the receiving machine the message moves upward, from
layer to layer, with headers being stripped off as it
progresses. None of the headers for layers below n are
passed up to layer n.
The important thing to understand about above illustration
is the relation between the virtual and actual communication
and the difference between protocols and interfaces.
The peer processes in layer 4, for example, conceptually
think of their communication as being "horizontal,"
using the layer 4 protocol. Each one is likely to have
a procedure called something like Send_To_Other_Side
and Get_From-Other_Side, even though these procedures
actually communicate with lower layers across the 3/4
interface, not with the other side.
Two broadcast networks- (a)
Bus (b) Ring
As shown in the above illustration is
called "Network Software," it is worth pointing
out that the lower layers of a protocol hierarchy are
frequently implemented in hardware or firmware. Nevertheless,
complex protocol algorithms are involved, even if they
are embedded (in whole or in part) in hardware.