02-Protocol Architecture Extra
02-Protocol Architecture Extra
Communications
Chapter 2 – Protocol Architecture,
TCP/IP, and Internet-Based
Applications
1
Protocol Architecture, TCP/IP, and
Internet-Based Applications
2
KEY POINTS
A protocol architecture is the layered structure of hardware
and software that supports the exchange of data between
systems and supports distributed applications, such as
electronic mail and file transfer.
At each layer of a protocol architecture, one or more common
protocols are implemented in communicating systems. Each
protocol provides a set of rules for the exchange of data
between systems.
The most widely used protocol architecture is the TCP/IP
protocol suite, which consists of the following layers: physical,
network access,internet, transport, and application.
Another important protocol architecture is the seven-layer
OSI model.
3
Overview
2. Sender. The sender is the device that sends the data message. It can
be a computer, workstation, telephone handset, video camera, and so
on.
4
Reference: Data Communications and Networking · Forouzan
Overview
3. Receiver. The receiver is the device that receives the message. It can be a
computer, workstation, telephone handset, television, and so on.
5
Reference: Data Communications and Networking · Forouzan
Need For Protocol Architecture
• When computers, terminals, and/or other data
processing devices exchange data, the procedures
involved can be quite complex procedures, cf. file
transfer example
6
Reference: Data Communications and Networking · Forouzan
Need For Protocol Architecture
2. The source system must ascertain that the
destination system is prepared to receive
data.
3. The file transfer application on the source
system must ascertain that the file
management program on the destination
system is prepared to accept and store the file
for this particular user.
4. If the file formats used on the two systems are
different, one or the other system must
perform a format translation function.
7
Need For Protocol Architecture
better if task broken into subtasks
implemented separately in layers in stack
each layer provides functions needed to perform
communications for layers above
using functions provided by layers below
8
Peer layers communicate by means of
formatted blocks of data that obey a set or
rules.
Protocol is a set of rules or conventions used
for peer layers to communicate.
9
Example: A single-layer protocol
• Communication is so simple that it can occur in only one layer. Assume Maria
and Ann are neighbours with a lot of common ideas. Communication between
Maria and Ann takes place in one layer, face to face, in the same language.
10
Reference: Data Communications and Networking · Forouzan
TCP/IP Protocol Architecture
TCP/IP (Transmission Control protocol/Internet
Protocol)
developed by US Defense Advanced Research
Project Agency (DARPA)
for ARPANET packet switched network
protocol suite (a set of protocols organized in
different layers) used by the global Internet
protocol suite comprises a large collection of
standardized protocols
11
TCP/IP Protocol Architecture
It is a hierarchical protocol made up of
interactive modules, each of which provides a
specific functionality.
The term hierarchical means that each upper
level protocol is supported by the services
provided by one or more lower level protocols.
The original TCP/IP protocol suite was defined
as four software layers built upon the hardware.
Today, however, TCP/IP is thought of as a five-
layer model.
12
Simplified Network Architecture
13
TCP/IP Layers
In general terms, communications can be said to
involve three agents: applications, computers,
and networks.
These applications, and others, execute on
computers that can often support multiple
simultaneous applications. Computers are
connected to networks, and the data to be
exchanged are transferred by the network from one
computer to another.
14
Thus, data transfer involves :
• first getting the data to the computer in which the
application resides and then
• getting the data to the intended application within
the computer.
Physical layer
15
TCP/IP Layers
16
Reference: Data Communications and Networking · Forouzan
Physical Layer
17
Network Access Layer
concerned with the exchange of data between an end
system and attached network
concerned with issues like :
destination address provision
using IP protocol
22
• Indicates how these protocols are configured for communications.
• To make clear that the total communications facility may consist of
multiple networks, the constituent networks are usually referred to
as subnetworks. Some sort of network access protocol, such as
the Ethernet logic, is used to connect a computer to a subnetwork.
• This protocol enables the host to send data across the subnetwork
to another host or, if the target host is on another subnetwork, to a
router that will forward the data. IP is implemented in all of the end
systems and the routers.
• It acts as a relay to move a block of data from one host, through
one or more routers, to another host.
• TCP is implemented only in the end systems; it keeps track of the
blocks of data to assure that all are delivered reliably to the
appropriate application.
23
Addressing Requirements
For successful communication, every entity in the
overall system must have a unique address.
two levels of addressing required
each host on a subnet needs a unique global
network address, this allows the data to be
delivered to the proper host. Its IP address
each application on a (multi-tasking) host needs a
unique address within the host. This allows the
host-to-host protocol (TCP) to deliver data to the
proper process. known as a port
24
Operation of TCP/IP
25
• Consider a simple operation where a process on host A, wishes
to send a message to another process on host B. The process at
A hands the message down to TCP with instructions to send
it to host B. TCP hands the message down to IP with
instructions to send it to host B. Note that IP need not be told
the identity of the destination port. Next, IP hands the message
down to the network access layer (e.g., Ethernet logic) with
instructions to send it to router J (the first hop on the way to
B).
27
• The packet header contains the information that the
subnetwork needs to transfer the data across the
subnetwork. Examples of items that may be contained in
this header include:
• Destination subnetwork address: The subnetwork
must know to which attached device the packet is to be
delivered.
• Facilities requests: The network access protocol might
request the use of certain subnetwork facilities, such as
priority.
30
TCP Header
31
TCP segment format
32
Reference: Data Communications and Networking · Forouzan
• Source port address. This is a 16-bit field that defines the port number of the
application program in the host that is sending the segment.
• Destination port address. This is a 16-bit field that defines the port number of the
application program in the host that is receiving the segment.
• Sequence number. This 32-bit field defines the number assigned to the first byte of data
contained in this segment. As we said before, TCP is a stream transport protocol. To
ensure connectivity, each byte to be transmitted is numbered. The sequence number
tells the destination which byte in this sequence is the first byte in the segment. During
connection establishment each party uses a random number generator to create an
initial sequence number (ISN), which is usually different in each direction.
• Acknowledgment number. This 32-bit field defines the byte number that the receiver of
the segment is expecting to receive from the other party.
• Header length. This 4-bit field indicates the number of 4-byte words in the TCP header.
The length of the header can be between 20 and 60 bytes. Therefore, the value of this
field is always between 5 (5 × 4 = 20) and 15 (15 × 4 = 60).
• Control. This field defines 6 different control bits or flags. One or more of these bits can
be set at a time. These bits enable flow control, connection establishment and
termination, connection abortion, and the mode of data transfer in TCP.
33
Reference: Data Communications and Networking · Forouzan
• Window size. This field defines the window size of the sending TCP in bytes. Note that
the length of this field is 16 bits, which means that the maximum size of the window is
65,535 bytes. This value is normally referred to as the receiving window (rwnd) and is
determined by the receiver. The sender must obey the dictation of the receiver in this
case.
• Checksum. This 16-bit field contains the checksum. The calculation of the checksum for
TCP follows the same procedure as the one described for UDP. However, the use of the
checksum in the UDP datagram is optional, whereas the use of the checksum for TCP is
mandatory. The same pseudoheader, serving the same purpose, is added to the
segment.
• Urgent pointer. This 16-bit field, which is valid only if the urgent flag is set, is used when
the segment contains urgent data. It defines a value that must be added to the sequence
number to obtain the number of the last urgent byte in the data section of the segment.
34
Reference: Data Communications and Networking · Forouzan
User Datagram Protocol (UDP)
In addition to TCP, there is one other transport-
level protocol that is in common use as part of the
TCP/IP protocol suite: the User Datagram
Protocol (UDP).
no guaranteed delivery
no preservation of sequence
no protection against duplication
minimum overhead
adds port addressing to IP
35
UDP Header
37
• Version Number. The 4-bit version number (VER) field defines the version of
the IPv4 protocol, which, obviously, has the value of 4.
• Header Length. The 4-bit header length (HLEN) field defines the total length
of the datagram header in 4-byte words. The IPv4 datagram has a variable-
length header. When a device receives a datagram, it needs to know when
the header stops and the data, which is encapsulated in the packet, starts.
However, to make the value of the header length (number of bytes) fit in a 4-
bit header length, the total length of the header is calculated as 4-byte words.
The total length is divided by 4 and the value is inserted in the field. The
receiver needs to multiply the value of this field by 4 to find the total length.
• Service Type. In the original design of the IP header, this field was referred to
as type of service (TOS), which defined how the datagram should be handled.
• Total Length. This 16-bit field defines the total length (header plus data) of
the IP datagram in bytes. A 16-bit number can define a total length of up to
65,535 (when all bits are 1s). However, the size of the datagram is normally
much less than this. This field helps the receiving device to know when the
packet has completely arrived.
38
Reference: Data Communications and Networking · Forouzan
• Identification, Flags, and Fragmentation Offset. These three fields
are related to the fragmentation of the IP datagram when the size of the
datagram is larger than the underlying network can carry.
40
Reference: Data Communications and Networking · Forouzan
• Options. A datagram header can have up to 40 bytes of
options. Options can be used for network testing and
debugging. Although options are not a required part of the IP
header, option processing is required of the IP software. This
means that all implementations must be able to handle
options if they are present in the header. The existence of
options in a header creates some burden on the datagram
handling; some options can be changed by routers, which
forces each router to recalculate the header checksum.
41
Reference: Data Communications and Networking · Forouzan
IPv6 Header
42
• In 1995, the Internet Engineering Task Force (IETF), which develops
protocol standards for the Internet, issued a specification for a next-
generation IP, known then as IPng.
• This specification was turned into a standard in 1996 known as IPv6. IPv6
provides a number of functional enhancements over the existing IP,
designed to accommodate the higher speeds of today's networks and the
mix of data streams, including graphic and video, that are becoming more
prevalent.
• But the driving force behind the development of the new protocol was the
need for more addresses. The current IP uses a 32-bit address to specify a
source or destination. With the explosive growth of the Internet and of
private networks attached to the Internet, this address length became
insufficient to accommodate all systems needing addresses.
43
44
TCP/IP Applications
45
• The File Transfer Protocol (FTP) is used to send files from one
system to another under user command. Both text and binary files are
accommodated. FTP sets up a TCP connection to the target system for
the exchange of control messages. Once a file transfer is approved, a
second TCP data connection is set up for the data transfer, without
the overhead of any headers or control information at the application
level. When the transfer is complete, the control connection is used to
signal the completion and to accept new file transfer commands.
46
Some TCP/IP Protocols
47
OSI
The Open Systems Interconnection (OSI) reference model was
developed by the International Organization for
Standardization as a model for a computer protocol
architecture and as a framework for developing protocol
standards.
has seven layers
The designers of OSI assumed that this model and the
protocols developed within this model would come to
dominate computer communications, eventually replacing
proprietary protocol implementations and rival multivendor
models such as TCP/IP.
is a theoretical system delivered too late!
TCP/IP is the de facto standard
48
OSI Layers
49
OSI v TCP/IP
50
Reference: Prescribed Text & Data Communications and Networking · Forouzan
There are a number of reasons why the TCP/IP architecture
has come to dominate.
51
Standardized Protocol Architectures
52
• The principal motivation for the development of the OSI model was to
provide a framework for standardization. Within the model, one or
more protocol standards can be developed at each layer. The model
defines in general terms the functions to be performed at that layer and
facilitates the standards-making process in two ways by allowing
standards to be developed independently and simultaneously for each
layer, and because changes in standards in one layer need not affect
already existing software in another layer.
• Figure illustrates the use of the OSI model as such a framework. The
overall communications function is decomposed into seven distinct
layers, making the interfaces between modules as simple as possible.
In addition, the design principle of information hiding is used:
Lower layers are concerned with greater levels of detail; upper
layers are independent of these details. Each layer provides services to
the next higher layer and implements a protocol to the peer layer in
other systems.
53
Layer Specific Standards
54
Figure shows more specifically the nature of the standardization required
at each layer. Three elements are key:
56
Elastic and Inelastic Traffic
elastic traffic
can adjust to delay & throughput changes over
a wide range and still meet the needs of its
applications.
This is the traditional type of traffic supported
on TCP/IP-based internets and is the type of
traffic for which internets were designed
Elastic applications include common Internet-
based applications, such as file transfer,
electronic mail, remote logon, network
management, and Web access.
57
Elastic and Inelastic Traffic
inelastic traffic
does not adapt to such changes to changes in
delay and throughput across an internet.
eg. “real-time” voice & video traffic
need minimum requirements on net architecture
• minimum throughput may be required
• may be delay-sensitive,
58
If any, that they can sustain.
59
Multimedia Technologies
60
Summary
61