0% found this document useful (0 votes)
3 views

02-Protocol Architecture Extra

Uploaded by

e19481
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

02-Protocol Architecture Extra

Uploaded by

e19481
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Data and Computer

Communications
Chapter 2 – Protocol Architecture,
TCP/IP, and Internet-Based
Applications

1
Protocol Architecture, TCP/IP, and
Internet-Based Applications

 To destroy communication completely, there must


be no rules in common between transmitter and
receiver—neither of alphabet nor of syntax —On
Human Communication, Colin Cherry

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

1. Message. The message is the information (data) to be communicated.


Popular forms of information include text, numbers, pictures, audio, and
video.

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.

4. Transmission medium. The transmission medium is the physical path by


which a message travels from sender to receiver. Some examples of
transmission media include twisted-pair wire, coaxial cable, fiber-optic cable,
and radio waves.

5. Protocol. A protocol is a set of rules that govern data communications. It


represents an agreement between the communicating devices. Without a
protocol, two devices may be connected but not communicating, just as a
person speaking French cannot be understood by a person who speaks only
Japanese.

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

• Typical tasks to be performed are as follow:

1. The source system must either activate the


direct data communication path or inform the
communication network of the identity of the
desired destination system.

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

 peer layers communicate using a set of rules or


conventions known as a protocol.
 What is a protocol?

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.

Key Elements of a Protocol


 syntax - data format
 semantics - control info & error handling
 timing - speed matching & sequencing

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.

• Even in this simple scenario;


• A set of rules needs to be followed
1. Maria and Ann need to greet each other when they meet
2. Confine their vocabulary to the level of their friendship
3. Refrain from speaking when other party is speaking
4. Conversation need to dialog and not a monolog
5. At the end, the exchange of nice words

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.

 no official model but a working one


 Application layer

 Host-to-host, or transport layer (TCP layer)

 Internet layer (Network Layer)

 Network access layer (OSI:Data link Layer)

 Physical layer
15
TCP/IP Layers

16
Reference: Data Communications and Networking · Forouzan
Physical Layer

 concerned with physical interface between


computer and network
 concerned with issues like:
 characteristics of transmission medium
 signal levels
 data rates
 other related matters

17
Network Access Layer
 concerned with the exchange of data between an end
system and attached network
 concerned with issues like :
 destination address provision

 invoking specific services like priority

 access to & routing data across a network link between


two attached systems
 The specific software used at this layer depends on the
type of network to be used; different standards have been
developed for circuit switching, packet switching (e.g.,
frame relay), LANs (e.g., Ethernet), and others.
 allows layers above to ignore link specifics
18
Internet Layer (IP)
The internet layer provides procedures used to allow
data to traverse multiple interconnected networks to
provide communications between devices are attached to
different networks.
 routing functions across multiple networks

 for systems attached to different networks

 using IP protocol

 implemented in end systems and routers

 routers connect two networks and relays data from one


network to the other on its route from the source to the
destination end system.
19
Transport Layer (TCP)
 The host-to-host layer, or transport layer,
collects mechanisms in a common layer shared by
all applications to provide reliable delivery of
data.
 Regardless of the nature of the applications, there
is usually a requirement that data be exchanged
reliably, ensuring that all of the data arrives at the
destination application and that the data arrives in
the same order in which they were sent.
 commonly uses TCP to provide this functionality.
20
Application Layer

 provide support for user applications


 need a separate module for each type of
application
 In brief, the application layer contains the
logic needed to support the various user
applications. For each different type of
application, such as file transfer, a separate
module is needed that is peculiar to that
application.
21
Operation of TCP and IP

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).

• To control this operation, control information as well as user


data must be transmitted. The sending process generates a
block of data and passes this to TCP. TCP may break this
block into smaller pieces to make it more manageable. To
each of these pieces, TCP appends control information known
as the TCP header, forming a TCP segment.
26
• Next, TCP hands each segment over to IP, with
instructions to transmit it to B. These segments must be
transmitted across one or more subnetworks and relayed
through one or more intermediate routers. This operation,
too, requires the use of control information. Thus IP
appends a header of control information to each segment
to form an IP datagram.

• Finally, each IP datagram is presented to the network


access layer for transmission across the first subnetwork
in its journey to the destination. The network access layer
appends its own header, creating a packet, or frame. The
packet is transmitted across the subnetwork to router J.

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.

• At router J, the packet header is stripped off and the IP


header examined.
• On the basis of the destination address information in
the IP header, the IP module in the router directs the
datagram out across subnetwork 2 to B. To do this,
the datagram is again augmented with a network
access header.

• When the data are received at B, the reverse process


occurs. At each layer, the corresponding header is
removed, and the remainder is passed on to the next
higher layer, until the original user data are delivered
to the destination process.
Transmission Control Protocol (TCP)
 For most applications running as part of the TCP/IP
protocol architecture, the transport layer protocol is
TCP.
 provides a reliable connection for transfer of data
between applications
 A TCP segment is the basic protocol unit
 TCP tracks segments between entities for duration of
each connection , in order to regulate the flow of
segments and to recover from lost or damaged
segments.

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.

• Options. There can be up to 40 bytes of optional information in the TCP header.

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

• UDP enables a procedure to send messages to other


procedures with a minimum of protocol mechanism. Some
transaction-oriented applications make use of UDP; one
example is SNMP (Simple Network Management Protocol).
• Because it is connectionless, UDP has very little to do.
Essentially, it adds a port addressing capability to IP.
• The UDP header also includes a checksum to verify that no
error occurs in the data; the use of the checksum is
optional. 36
IP 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.

• Time-to-live. Due to some malfunctioning of routing protocols


(discussed later) a datagram may be circulating in the Internet, visiting
some networks over and over without reaching the destination. This
may create extra traffic in the Internet. The time-to-live (TTL) field is
used to control the maximum number of hops (routers) visited by the
datagram. When a source host sends the datagram, it stores a number
in this field. This value is approximately two times the maximum number
of routers between any two hosts. Each router that processes the
datagram decrements this number by one.

• Protocol. In TCP/IP, the data section of a packet, called the payload,


carries the whole packet from another protocol. A datagram, for
example, can carry a packet belonging to any transport-layer protocol
such as UDP or TCP. A datagram can also carry a packet from other
protocols that directly use the service of the IP, such as some routing
protocols or some auxiliary protocols.
39
Reference: Data Communications and Networking · Forouzan
• Header checksum. IP is not a reliable protocol; it does not check whether the
payload carried by a datagram is corrupted during the transmission. IP puts
the burden of error checking of the payload on the protocol that owns the
payload, such as UDP or TCP. The datagram header, however, is added by
IP, and its error-checking is the responsibility of IP. Errors in the IP header can
be a disaster. For example, if the destination IP address is corrupted, the
packet can be delivered to the wrong host. If the protocol field is corrupted,
the payload may be delivered to the wrong protocol. If the fields related to the
fragmentation are corrupted, the datagram cannot be reassembled correctly
at the destination, and so on. For these reasons, IP adds a header checksum
field to check the header, but not the payload. We need to remember that,
since the value of some fields, such as TTL, which are related to
fragmentation and options, may change from router to router, the checksum
needs to be recalculated at each router.

• Source and Destination Addresses. These 32-bit source and destination


address fields define the IP address of the source and destination
respectively. The source host should know its IP address. The destination IP
address is either known by the protocol that uses the service of IP or is
provided by the DNS

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.

• Payload. Payload, or data, is the main reason for creating a


datagram. Payload is the packet coming from other protocols
that use the service of IP. Comparing a datagram to a postal
package, payload is the content of the package; the header is
only the information written on the package.

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.

• IPv6 includes 128-bit source and destination address fields. Ultimately,


all installations using TCP/IP are expected to migrate from the current IP to
IPv6, but this process will take many years, if not decades.

43
44
TCP/IP Applications

 have a number of standard TCP/IP


applications such as:
 Simple Mail Transfer Protocol (SMTP)
 provides a basic electronic mail transport facility for
transferring messages among separate hosts. The SMTP
protocol does not specify the way in which messages are
to be created; some local editing or native electronic mail
facility is required. The target SMTP module will store
the incoming message in a user's mailbox.

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.

• TELNET provides a remote logon capability, which enables a user at


a terminal or personal computer to logon to a remote computer and
function as if directly connected to that computer. The protocol was
designed to work with simple scroll-mode terminals. Terminal traffic
between User and Server TELNET is carried on a TCP connection.

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.

•Perhaps the most important is that the key TCP/IP protocols


were mature and well tested at a time when similar OSI
protocols were in the development stage. When businesses
began to recognize the need for interoperability across
networks, only TCP/IP was available and ready to go.

•Another reason is that the OSI model is unnecessarily


complex, with seven layers to accomplish what TCP/IP does
with fewer layers. Figure illustrates the layers of the TCP/IP
and OSI architectures, showing roughly the correspondence
in functionality between the two.

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:

• Protocol specification: Two entities at the same layer in different


systems cooperate and interact by means of a protocol. Because two
different open systems are involved, the protocol must be specified
precisely. This includes the format of the protocol data units exchanged,
the semantics of all fields, and the allowable sequence of PDUs.

• Service definition: In addition to the protocol or protocols that operate


at a given layer, standards are needed for the services that each layer
provides to the next higher layer. Typically, the definition of services is
equivalent to a functional description that defines what services are
provided, but not how the services are to be provided.

• Addressing: Each layer provides services to entities at the next higher


layer. These entities are referenced by means of a service access point
(SAP). Thus, a network service access point (NSAP) indicates a transport
entity that is a user of the network service. 55
Traditional vs Multimedia
Applications
 traditionally Internet dominated by info
retrieval applications
 typically using text and image transfer
 eg. email, file transfer, web
 see increasing growth in multimedia
applications
 involving massive amounts of data
 such as streaming audio and video

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,

• may require a reasonable upper bound on delay


variation,
• may vary in the amount of packet loss

58
If any, that they can sustain.

• These requirements are difficult to meet in an


environment with variable queuing delays and
congestion losses. Accordingly, inelastic traffic
introduces two new requirements into the internet
architecture.

1. Applications need to be able to state their requirements,


either ahead of time in a service request function or on
the fly my means of IP packet header

2.Still be able to support elastic traffic.

59
Multimedia Technologies

60
Summary

 introduced need for protocol architecture


 TCP/IP protocol architecture
 OSI Model & protocol architecture
standardization
 traditional vs multimedia application needs

61

You might also like