|
Some
of the key design issues that occur in computer networking are present in
several layers. Every layer needs a mechanism for identifying senders and
receivers. Since a network normally has many computers, some of which have
multiple processors; a means is needed for a process on one machine to
specify with whom it wants to talk. As a consequence of having multiple
destinations, some form of addressing is needed in order to specify a
specific destination.
Another
set of design decisions concerns the rules for data transfer. In some
system, data only travel in one direction (simplex communication). In
others they can travel in either direction, but not simultaneously
(half-duplex communication). In still others they travel in both directions
at once (full-duplex communication). The protocol must also determine how
many logical channels the connection corresponds to, and what their
priorities are. Many networks provide at least two logical channels per
connection, one for normal data and one for urgent data.
Error
control is an important issue because physical communication circuits are
not perfect. Not all communication channels preserve the order of messages
sent on them. To deal with a possible loss of sequencing, the protocol must
make explicit provision for the receiver to allow the pieces to be put back
together properly.
An issue
that occurs at every level is how to keep a fast sender for swamping a slow
receiver with data. Another problem that must be solved at several levels
is the inability of all processes to accept arbitrarily long messages.
All
these issues led to the development of a layered architecture for networks.
In the next two sections we will discuss two important network
architectures based on the layered approach, the OSI reference model and the TCP/IP
reference model.
3.1
THE OSI REFERENCE MODEL
The OSI
model is shown in fig. 3.1. This model is based on a proposal developed by
International Standards Organization (ISO)
as a first step toward international standardization of the protocols used
in the various layers. The model is also called ISO OSI (Open Systems Interconnection) Reference Model because
it deals with connecting open systems i.e., systems that are open for
communication with other systems.
The ISO
model has seven layers. The principles that were applied to arrive at the
seven layers are as follows:
1)
A layer should be created where a different level of abstraction is
needed.
2)
Each layer should perform a well defined function.
3)
The function of each layer should be chosen with an eye toward
defining internationally standardized protocols.
4)
The layer boundaries should be chosen to minimize the information
flow across the interfaces.
5)
The number of layers should be large enough that distinct functions
need not be thrown together in the same layer out of necessity, and small
enough that the architecture does not become unwieldy.
Note
that the OSI itself is not a network architecture because it does not
specify the exact services and protocols to be used in each layer. It just
tells what each layer should do. However, ISO has also produced standards
for all the layers, although these are not part of the reference model
itself. Each one has been published as a separate international standard.
The Physical Layer
The physical layer is concerned with
transmitting raw bits over a communication channel. The design issues have
to do with making sure that when one side sends a 1 bit, it is received by
the other side as a 1 bit, not as a 0 bit. Typical questions here are how
many volts should be used to represent a 1 and how many for a 0, how many
microseconds a bit lasts, whether transmission may proceed simultaneously
in both directions, how the initial connection is established and how it is
torn down when both sides are finished, and how many pins the network
connector has and what each pin is used for. The design issues here largely
deal with mechanical, electrical, and procedural interfaces, and the
physical transmission medium, which lies below the physical layer.
Key points:
1)
Concerned with the transmission of bits.
2)
Number of bits of second to be transmitted.
3)
Two way or one way transmission.
4)
Standardized protocol dealing with electrical, mechanical and signal
interfaces.
5)
Many standards have been developed, e.g. RS-232 (for serial
communication lines).
The Data Link Layer
The main
task of the data link layer is
to take a raw transmission facility and transform it into a line that
appears free of undetected transmission errors to the network layer. It
accomplishes this task by having the sender break the input data up into data frames (typically a few
hundred or a few thousand bytes), transmit the frames sequentially, and
process the acknowledgement frames
sent back by the receiver. Since the physical layer merely accepts and
transmits a stream of bits without any regard to meaning or structure, it
is up to the data link layer to create and recognize frame boundaries. This
can be accomplished by attaching special bit patterns to the beginning and
end of the frame. If these bit patterns can accidentally occur in the data,
special care must be taken to make sure these patterns are not incorrectly
interpreted as frame delimiters.
Another
issue that arises in the data link layer is how to keep a fast transmitter
from drowning a slow receiver in data. Some traffic regulation mechanism
must be employed to let the transmitter know how much buffer space the
receiver has at the moment. Frequently, this flow regulation and the error
handling are integrated.
Broadcast
networks have an additional issue in the data link layer: how to control
access to the shared channel. A special sublayer
of the data link layer, the medium access sublayer,
deals with this problem.
Key points:
1)
Handles errors in the physical layer.
2)
Group bits into frames and ensures their correct delivery.
3)
Adds some bits at the beginning and end of each frame plus the
checksum.
4)
Receiver verifies the checksum.
5)
If the checksum is not correct, it asks for retransmission. (send a
control message).
6)
Consists of two sublayers:
·
Logical Link Control (LLC) defines how data is transferred over the
cable and provides data link service to the higher layers.
·
Medium Access Control (MAC) defines who can use the network when multiple
computers are trying to access it simultaneously (i.e. Token passing, Ethernet [CSMA/CD]).
The Network Layer
The network layer is concerned with
controlling the operation of the subnet. A key design issue is determining
how packets are routed from source to destination. Routes can be based on
static tables that are "wired into" the network and rarely
changed. They can also be determined at the start of each conversation.
If too
many packets are present in the subnet at the same time, they will get in
each other's way, forming bottlenecks. The control of such congestion also
belongs to the network layer.
Since
the operators of the subnet may well expect remuneration for their efforts,
there is often some accounting function built into the network layer. At the
very least, the software must count how many packets or characters or bits
are sent by each customer, to produce rates on each side, the accounting
can become complicated.
When a
packet has to travel from one network to another to get to its destination,
many problems can arise. The addressing used by the second network may be
different from the first one. The second one may not accept the packet at
all because it is too large. The protocols may differ, and son on. It is up
to the network layer to overcome all these problems to allow heterogeneous
networks to be interconnected.
In broadcast
networks, the routing problem is simple, so the network layer is often thin
or even nonexistent.
Key points:
1)
Concerned with the transmission of packets.
2)
Choose the best path to send a packet (routing).
3)
It may be complex in a large network (e.g. Internet).
4)
Shortest (distance) route vs. route with least delay.
5)
Static (long term average) vs. dynamic (current load) routing.
6)
Two protocols are most widely used.
·
X.25
·
Connection Oriented
·
Public networks, telephone, European PTT
·
Send a call request at the outset to the destination
·
If destination accepts the connection, it sends an connection
identifier
·
IP (Internet Protocol)
·
Connectionless
·
Part of Internet
protocol suite.
·
An IP packet can be sent without a connection being established.
·
Each packet is routed to its destination independently.
The Transport Layer
The basic
function of the transport layer is
to accept data from the session layer, split it up into smaller units if
need be, pass these to the network layer, and ensure that the pieces all
arrive correctly at the other end. Furthermore, all this must be done
efficiently, and in a way that isolates the upper layer from the inevitable
changes in the hardware technology.
Under normal
conditions, the transport layer creates a distinct network connection
required by the session layer. If the transport connection requires a high
throughput, however, the transport layer might create multiple network
connections, dividing the data among the network connections to improve throughput.
On the other hand, if creating or maintaining a network connection is
expensive, the transport layer might multiplex several transport
connections onto the same network connection to reduce the cost. In all
cases, the transport layer is required to make the multiplexing transparent
to the session layer. The transport layer also determines what type of
service to provide the session layer, and ultimately, the users of the
network.
Key points:
1)
Network layer does not deal with lost messages.
2)
Transport layer ensures reliable service.
3)
Breaks the message (from sessions layer) into smaller packets,
assigns sequence number and sends them.
4)
Reliable transport connections are built on top of X.25 or IP.
5)
In case IP, lost packets arriving out of order must be reordered.
6)
TCP: (Transport Control Protocol) Internet transport protocol.
7)
TCP/IP Widely
used for network/transport layer (UNIX).
8)
UDP (Universal Datagram Protocol): Internet connectionless transport layer protocol.
9)
Application programs that do not need connection-oriented protocol generally use
UDP.
The Session Layer
The session layer allows users on
different machines to establish sessions
between them. A session allows ordinary data transport, as does the
transport layer, but it also provides enhanced services useful in some
applications. A session might be used to allow a user to log into remote
timesharing system or to transfer a file between two machines.
One of
the services of the session layer is to manage dialogue control. Sessions can
allow traffic to go in both directions at the same time, or in only one
direction at a time.
A related
session service is token management.
For some protocols, it is essential that both sides do not attempt the same
operation at the same time. To manage these activities, the session layer
provides tokens that can be exchanged. Only the side holding the token may
perform the critical operation.
Another session
service is synchronization. Consider
the problems that might occur when trying to do a two hour file transfer
between two machines with a one hour mean time between crashes. After each
transfer was aborted, the whole transfer would have to start over again and
would probably fail again the next time as well. To eliminate this problem,
the session layer provides a way to insert checkpoints into the data
stream, so that after a crash, only the data transferred after the last checkpoint
have to be repeated.
Key points:
1)
Just theory! Very few applications use it.
2)
Enhanced version of transport layer.
3)
Dialog control, synchronization facilities.
4)
Rarely supported (Internet
suite does not).
The Presentation Layer
The presentation layer performs certain functions that are
requested sufficiently often to warrant finding a general solution for
them, rather than letting each user solve the problems. In particular,
unlike all the lower layers, which are just interested in moving bits
reliably from here to there, the presentation layer is concerned with the
syntax and semantics of the information transmitted.
A typical example of a
presentation layer service is encoding data in a standard agreed upon way. Most
user do programs do not exchange random binary bit strings. They exchange
things such as people's names, dates, amounts of money, and invoices. These
items are represented as character strings, integers, floating point
numbers, and data structures composed of several simpler items. Different computers
have different codes for representing character strings (e.g., ASCII and
Unicode), integers (e.g., one's complement and two's complement), and so
on. In order to make it possible for computers with different
representations to communicate, the data structures to be exchanged can be
defined in an abstract way, along with a standard encoding to be used
" on the wire". The presentation layer manages these abstract
data structures and converts from the representation used inside the
computer to the network standard representation and back.
Key points:
1)
Just theory! Very few applications use it.
2)
Concerned with the semantics of the bits.
3)
Define records and fields in them.
4)
Sender can tell the receiver of the format.
5)
Make machines with different internal representations to
communicate.
6)
If implemented, the best layer for cryptography.
The Application Layer
The application layer contains a variety of protocols that are
commonly needed. For example, there are hundreds of incompatible terminal
types in the world. Consider the plight of full screen editor that is
supposed to work over a network with many different terminal types, each
with different screen layouts, escape sequences for inserting and deleting
text, moving the cursor, etc.
One way to solve this problem is
to define an abstract network
virtual terminal that editors and other programs can be written to deal
with. To handle each terminal type, a piece of software must be written to
map the functions of the network virtual terminal onto the real terminal. All
the virtual terminal software is in the application layer.
Another application layer
function is file transfer. Different file systems have different file
naming conventions, different ways of representing text lines, and so on. Transferring
a file between two different systems requires handling these and other
incompatibilities. This work, too, belongs to the application layer, as do
electronic mail, job entry, directory lookup, and various other general purposes
and special purpose facilities.
Key points:
1)
Collection of miscellaneous protocols for high level applications.
2)
Electronic mail, file transfer, connecting remote terminals, etc.
3)
E.g. SMTP, FTP, Telnet, HTTP, etc.
3.2 THE TCP/IP REFERENCE MODEL
Let us now turn our attention from
the OSI reference model to the reference model used in the grandparent of
all computer networks, the ARPANET, and its successor, the world wide
Internet. The ARPANET was a research network sponsored by the DoD (U.S. Department of Defense). It eventually
connected hundreds of universities and government installations using
leased telephone lines. When satellite and radio networks were added later,
the existing protocols had trouble interworking
with them, so a new reference architecture was needed. Thus the ability to
connect multiple networks together in a seamless way was one of the major
design goals from the very beginning. This architecture later became to
know as the TCP/IP Reference Model,
after its two primary protocols.
It has only four
layers. The TCP/IP reference model is shown in fig. 3.2.
The Internet Layer
This layer, called the internet layer, is the linchpin
that holds the whole architecture together. Its job is to permit hosts to inject
into any network and have them travel independently to the destination
(potentially on a different network). They may even arrive in a different
order than they were sent, in which case it is the job of higher layers to
rearrange them, if in-order delivery is desired.
The internet layer defines an official
packet format and protocol called IP
(Internet Protocol). The job of the internet layer is to deliver IP
packets where they are supposed to go. Packet routing is clearly the major
issue here, as is avoiding congestion. For these reasons, it is reasonable
to say that the TCP/IP internet layer is very similar in functionality to
the OSI network layer.
The Transport Layer
The layer above the internet
layer in the TCP/IP model is now usually called the transport layer. It is designed to allow peer entities on the
source and destination hosts to carry on a conversation, the same as in the
OSI transport layer. Two end-to-end protocols have been defined here. The first
one, TCP (Transmission Control
Protocol) is a reliable connection-oriented protocol that allows a byte
stream originating on one machine to be delivered without error on any
other machine in the internet. It fragments the incoming byte stream into
discrete messages and passes each one onto the internet layer. At the
destination the receiving TCP process reassembles the received messages
into the output stream. TCP also handles flow control to make sure a fast
sender cannot swamp a slow receiver with more messages than it can handle.
The second protocol in this layer,
UDP (User Datagram Protocol), is
an unreliable, connectionless protocol for applications that do not want
TCP's sequencing or flow control and wish to provide their own. It is also
widely used for one-shot, client server type request-reply queries and applications
in which prompt delivery is more important than accurate delivery, such as
transmitting speech or video. Since the model was developed, IP has been
implemented on many other networks.
The Application Layer
The TCP/IP model does not have
session or presentation layers. No need for them was perceived, so they
were not included. Experience with the OSI model has proven this view
correct: they are of little use to most applications.
On top of the transport layer is
the application layer. It contains
all the higher-level protocols. The early ones included virtual terminal
(TELNET), file transfer (FTP), and electronic mail (SMTP). The virtual
terminal protocol allows a user on one machine to log into a distant
machine and work there. The file transfer protocol provides a way to move
data efficiently from one machine to another. Electronic mail was
originally just a kind of file transfer, but later specialized protocol was
developed for it. Many other protocols have been added to those over years,
such as Domain Name Service (DNS) for mapping host names onto their network
addresses, NNTP, the protocol used for moving news articles around, and
HTTP, the protocol used for fetching pages on the World Wide Web, and many
others.
The Host-to-Network Layer
Below the internet layer is a
great void. The TCP/IP reference model does not really say much about what
happens here, except to point out that the host has to connect to the
network using some protocol so it can send IP packets over it. This protocol
is not defined and varies from host to host and network to network.
back...
|