Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DCN-Unit II

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 30

Data Communication and Network

Unit-II
Transport Layer Design Issues

 1. Service-point addressing
 Computers often run many programs at the same time. Due to this, source-to-destination
delivery means delivery from a specific job (currently running program) on one computer
to a specific job (currently running program) on the other system not only one computer to
the next.
 For this reason, the transport layer added a specific type of address to its header, it is
referred to as a service point address or port address.
 Transport Layer requires a Port number to correctly deliver the segments of data to the
correct process amongst the multiple processes running on a particular host. A port
number is a 16 bit address used to identify any client-server program uniquely.
 By this address each packet reaches the correct computer and also the transport layer gets
the complete message to the correct process on that computer.
Transport Layer Design Issues

 2. Segmentation and Reassembly


 In segmentation, a message is divided into transmittable segments; each segment
containing a sequence number. This number enables this layer to reassemble the message.
 Upon arriving at its destination system message is reassembled correctly, identify and
replaces packets that were lost in transmission.
 In other words: A message is divided into segments; each segment contains sequence
number, which enables this layer in reassembling the message. Message is reassembled
correctly upon arrival at the destination and replaces packets which were lost in
transmission.
Transport Layer Design Issues
 3. Connection Control: It can be either of two types:
 Connectionless Transport Layer
 Connection Oriented Transport Layer
 i) Connectionless Transport Layer
 This Transport Layer treats each packet as an individual and delivers it to the destination machine.
 In this type of transmission, the receiver does not send an acknowledgment to the sender about the
receipt of a packet. This is a faster communication technique.
 ii) Connection Oriented Transport Layer
 This Transport Layer creates a connection with the Transport Layer at the destination machine
before transmitting the packets to the destination.
 To Create a connection following three steps are possible:
 Connection establishment
 Data transfer
 Connection termination
 When all the data are transmitted connection is terminated. Connectionless Service is less reliable
than connection Oriented Service.
Transport Layer Design Issues
 4. Multiplexing and Demultiplexing
 Multiple packets from diverse applications are transmitted across a network needs very
dedicated control mechanisms, which are found in the transport layer.
 The transport layer accepts packets from different processes. These packets are
differentiated by their port numbers and pass them to the network layer after adding proper
headers.
 In other words: Multiplexing allows simultaneous use of different applications over a
network which is running on a host. The transport layer provides this mechanism which
enables us to send packet streams from various applications simultaneously over a
network. The transport layer accepts these packets from different processes differentiated
by their port numbers and passes them to the network layer after adding proper headers.
 In Demultiplexing, at the receiver's side to obtain the data coming from various processes.
It receives the segments of data from the network layer and delivers it to the appropriate
process running on the receiver's machine.
 Similarly, Demultiplexing is required at the receiver side to obtain the data coming from
various processes. Transport receives the segments of data from the network layer and
delivers it to the appropriate process running on the receiver’s machine.
Transport Layer Design Issues
 5. Flow control
 The transport layer also responsible for the flow control mechanism between the adjacent
layers of the TCP/IP model.
 It does not perform across a single link even it performs an end-to-end node.
 By imposing flow control techniques data loss can be prevented from the cause of the
sender and slow receiver.
 For instance, it uses the method of sliding window protocol in this method receiver sends a
window back to the sender to inform the size of the data is received.
 The transport layer provides a flow control mechanism between the adjacent layers of the
TCP/IP model. TCP also prevents data loss due to a fast sender and slow receiver by
imposing some flow control techniques. It uses the method of sliding window protocol
which is accomplished by the receiver by sending a window back to the sender informing
the size of data it can receive.
Transport Layer Design Issues
 6. Error Control
 Error Control is also performed end to end like the data link layer.
 In this layer to ensure that the entire message arrives at the receiving transport layer
without any error(damage, loss or duplication). Error Correction is achieved through
retransmission of the packet.
 The data has arrived or not and checks for the integrity of data, it uses the ACK and NACK
services to inform the sender.
 Transport layer checks for errors in the messages coming from application layer by using
error detection codes, computing checksums, it checks whether the received data is not
corrupted and uses the ACK and NACK services to inform the sender if the data has
arrived or not and checks for the integrity of data.
Transport Layer Connection Management
 The transport layer is represented by two protocols: TCP and UDP.
 The IP protocol in the network layer delivers a datagram from a source host to the
destination host.
 Nowadays, the operating system supports multiuser and multiprocessing environments, an
executing program is called a process. When a host sends a message to other host means
that source process is sending a process to a destination process. The transport layer
protocols define some connections to individual ports known as protocol ports.
 An IP protocol is a host-to-host protocol used to deliver a packet from source host to the
destination host while transport layer protocols are port-to-port protocols that work on the
top of the IP protocols to deliver the packet from the originating port to the IP services, and
from IP services to the destination port.
 Each port is defined by a positive integer address, and it is of 16 bits.
Transport Layer Connection Management
 1.UDP
 UDP stands for User Datagram Protocol.
 UDP is a simple protocol and it provides non sequenced transport functionality.
 UDP is a connectionless protocol.
 This type of protocol is used when reliability and security are less important than speed
and size.
 UDP is an end-to-end transport level protocol that adds transport-level addresses,
checksum error control, and length information to the data from the upper layer.
 The packet produced by the UDP protocol is known as a user datagram.
Transport Layer Connection
Management
 User Datagram Format
 The user datagram has a 16-byte header which is shown below:
 Source port address: It defines the address of the application process that has delivered a
message. The source port address is of 16 bits address.
 Destination port address: It defines the address of the application process that will receive
the message. The destination port address is of a 16-bit address.
 Total length: It defines the total length of the user datagram in bytes. It is a 16-bit field.
 Checksum: The checksum is a 16-bit field which is used in error detection.
 Disadvantages of UDP protocol
 UDP provides basic functions needed for the end-to-end delivery of a transmission.
 It does not provide any sequencing or reordering functions and does not specify the damaged
packet when reporting an error.
 UDP can discover that an error has occurred, but it does not specify which packet has been
Transport Layer Connection Management
 2. TCP
 TCP stands for Transmission Control Protocol.
 It provides full transport layer services to applications.
 It is a connection-oriented protocol means the connection established between both the ends of the
transmission. For creating the connection, TCP generates a virtual circuit between sender and receiver
for the duration of a transmission.
 Features Of TCP protocol:
 Stream data transfer: TCP protocol transfers the data in the form of contiguous stream of bytes. TCP
group the bytes in the form of TCP segments and then passed it to the IP layer for transmission to the
destination. TCP itself segments the data and forward to the IP.
 Reliability: TCP assigns a sequence number to each byte transmitted and expects a positive
acknowledgement from the receiving TCP. If ACK is not received within a timeout interval, then the
data is retransmitted to the destination.
The receiving TCP uses the sequence number to reassemble the segments if they arrive out of order or
to eliminate the duplicate segments.
 Flow Control: When receiving TCP sends an acknowledgement back to the sender indicating the
number the bytes it can receive without overflowing its internal buffer. The number of bytes is sent in
ACK in the form of the highest sequence number that it can receive without any problem. This
mechanism is also referred to as a window mechanism.
Transport Layer Connection Management
 Multiplexing: Multiplexing is a process of accepting the data from different applications
and forwarding to the different applications on different computers. At the receiving end,
the data is forwarded to the correct application. This process is known as demultiplexing.
TCP transmits the packet to the correct application by using the logical channels known as
ports.
 Logical Connections: The combination of sockets, sequence numbers, and window sizes,
is called a logical connection. Each connection is identified by the pair of sockets used by
sending and receiving processes.
 Full Duplex: TCP provides Full Duplex service, i.e., the data flow in both the directions at
the same time. To achieve Full Duplex service, each TCP should have sending and
receiving buffers so that the segments can flow in both the directions. TCP is a connection-
oriented protocol. Suppose the process A wants to send and receive the data from process
B. The following steps occur:
 Establish a connection between two TCPs.
 Data is exchanged in both the directions.
 The Connection is terminated.
Transport Layer
Connection Management
 TCP Segment Format

 Source port address: It is used to define the address of the application program in a source
computer. It is a 16-bit field.
 Destination port address: It is used to define the address of the application program in a
destination computer. It is a 16-bit field.
 Sequence number: A stream of data is divided into two or more TCP segments. The 32-bit
sequence number field represents the position of the data in an original data stream.
 Acknowledgement number: A 32-field acknowledgement number acknowledge the data from
other communicating devices. If ACK field is set to 1, then it specifies the sequence number that
the receiver is expecting to receive.
 Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The minimum
size of the header is 5 words, and the maximum size of the header is 15 words. Therefore, the
maximum size of the TCP header is 60 bytes, and the minimum size of the TCP header is 20
bytes.
 Reserved: It is a six-bit field which is reserved for future use.
 Control bits: Each bit of a control field functions individually and independently. A control bit
Transport Layer
Connection Management
 TCP Segment Format

 There are total six types of flags in control field:


 URG: The URG field indicates that the data in a segment is urgent.
 ACK: When ACK field is set, then it validates the acknowledgement number.
 PSH: The PSH field is used to inform the sender that higher throughput is needed so if possible, data must
be pushed with higher throughput.
 RST: The reset bit is used to reset the TCP connection when there is any confusion occurs in the sequence
numbers.
 SYN: The SYN field is used to synchronize the sequence numbers in three types of segments: connection
request, connection confirmation ( with the ACK bit set ), and confirmation acknowledgement.
 FIN: The FIN field is used to inform the receiving TCP module that the sender has finished sending data. It
is used in connection termination in three types of segments: termination request, termination confirmation,
and acknowledgement of termination confirmation.
 Window Size: The window is a 16-bit field that defines the size of the window.
 Checksum: The checksum is a 16-bit field used in error detection.
 Urgent pointer: If URG flag is set to 1, then this 16-bit field is an offset from the sequence number indicating that it
is a last urgent data byte.
 Options and padding: It defines the optional fields that convey the additional information to the receiver.
Transport Layer
Connection Management
Differences b/w TCP & UDP
Basis for Comparison TCP UDP

UDP transmits the data directly to


TCP establishes a virtual circuit the destination computer without
Definition
before transmitting the data. verifying whether the receiver is
ready to receive or not.

It is a Connection-Oriented
Connection Type It is a Connectionless protocol
protocol
Speed slow high
Reliability It is a reliable protocol. It is an unreliable protocol.
Header size 20 bytes 8 bytes

It waits for the acknowledgement It neither takes the


acknowledgement of data and has the ability to acknowledgement, nor it
resend the lost packets. retransmits the damaged frame.
Session Layer
 Design Issue
 Session Layer is one of the Seven Layers of OSI Model. Physical layer, Data Link Layer and
Network Layer lack some services such as establishment of a session between
communicating systems. This is managed by Session Layer which particularly behaves as a
dialog controller between communicating system thus facilitating interaction between them.
 Before looking into design issues, here are some of functions of Session Layer:
 Dialog Control –Session layer allows two systems to enter into a dialog exchange
mechanism which can either be full or half-duplex.
 Managing Tokens –The communicating systems in a network try to perform some critical
operations and it is Session Layer
which prevents collisions which might occur while performing these operations which would
otherwise result in a loss.
 Synchronization –Checkpoints are the midway marks that are added after a particular
interval during stream of data
transfer. These points are also referred to as synchronization points. The Session layer
permits process to add these checkpoints.For example, suppose a file of 400 pages is being
sent over a network, then it is highly beneficial to set up a checkpoint after every 50 pages so
that next 50 pages are sent only when previous pages are received and acknowledged.
Session Layer
 Design Issue
 Design Issues with Session Layer :
 Establish sessions between machines –The establishment of session between machines is
an important service provided by session layer. This session is responsible for creating a
dialog between connected machines. The Session Layer provides mechanism for opening,
closing and managing a session between end-user application processes, i.e. a semi-
permanent dialogue. This session consists of requests and responses that occur between
applications.
 Enhanced Services –Certain services such as checkpoints and manangement of tokens are
the key features of session layer and thus it becomes necessary to keep enhancing these
features during the layer’s design.
 To help in Token management and Synchronization –The session layer plays an
important role in preventing collision of several critical operation as well as ensuring better
data transfer over network by establishing synchronization points at specific intervals.
Thus it becomes highly important to ensure proper execution of these services.
Session Layer
 Remote Procedure Call
 A remote procedure call is an interprocess communication technique that is used for client-
server based applications. It is also known as a subroutine call or a function call.
 A client has a request message that the RPC translates and sends to the server. This request
may be a procedure or a function call to a remote server. When the server receives the
request, it sends the required response back to the client. The client is blocked while the
server is processing the call and only resumed execution after the server is finished.
 The sequence of events in a remote procedure call are given as follows −
 The client stub is called by the client.
 The client stub makes a system call to send the message to the server and puts the
parameters in the message.
 The message is sent from the client to the server by the client’s operating system.
 The message is passed to the server stub by the server operating system.
 The parameters are removed from the message by the server stub.
 Then, the server procedure is called by the server stub.
Session Layer
 Remote Procedure Call
 Advantages of Remote Procedure Call
 Some of the advantages of RPC are as follows −
 Remote procedure calls support process oriented and thread oriented models.
 The internal message passing mechanism of RPC is hidden from the user.
 The effort to re-write and re-develop the code is minimum in remote procedure calls.
 Remote procedure calls can be used in distributed environment as well as the local
environment.
 Many of the protocol layers are omitted by RPC to improve performance.
 Disadvantages of Remote Procedure Call
 Some of the disadvantages of RPC are as follows −
 The remote procedure call is a concept that can be implemented in different ways. It is not a
standard.
 There is no flexibility in RPC for hardware architecture. It is only interaction based.
 There is an increase in costs because of remote procedure call.
Presentation Layer
 Design Issues
 The primary goal of this layer is to take care of the syntax and semantics of the
information exchanged between two communicating systems.
 Presentation layer takes care that the data is sent in such a way that the receiver will
understand the information(data) and will be able to use the data.
 Languages(syntax) can be different of the two communicating systems. Under this
condition presentation layer plays a role translator.
 In order to make it possible for computers with different data representations to
communicate, the data structures to be exchanged can be defined in an abstract way.
 The presentation layer manages these abstract data structures and allows higher-level
data structures(eg: banking records), to be defined and exchanged.
Presentation Layer
 Design Issues
 Before going through the design issues in the presentation layer, some of its main functions
are:
 Translation –
It is necessary that the information which is in the form of numbers, characters and
symbols needs to be changed to the bit streams. The presentation layer handles the
different encoding methods used by different machines .It manages the translation of data
between the format of network requires and computer.
 Encryption –
The data encryption at the transmission end as well as the decryption at the receiver end is
managed by the presentation layer.
 Compression –
In order to reduce the number of bits to be transmitted, the presentation layer performs the
data compression. It increases efficiency in case of multimedia files such as audio, video
etc.
Presentation Layer
 Design Issues
 Design issues with Presentation Layer :
 Standard way of encoding data –
The presentation layer follows a standard way to encode data when it needs to be
transmitted. This encoded data is represented as character strings, integers, floating point
numbers, and data structures composed of simple components. It is handled differently by
different machines based on the encoding methods followed by them.
 Maintaining the Syntax and Semantics of distributed information –
The presentation layer manages and maintains the syntax as well as logic and meaning of
the information that is distributed.
 Standard Encoding on the wire –
The data structures that are defined to be exchanged need to be abstract along with the
standard encoding to be used “on the wire”.
Presentation Layer
 Data Compression Technique
 Data compression is the function of presentation layer in OSI reference model.
 Compression is often used to maximize the use of bandwidth across a network or to
optimize disk space when saving data.
 Data Compression is a technique in which the size of data is reduced without loss of
information.
 Lossy compression and Lossless compression are the categories of data compression
method.
 The main difference between the two compression techniques (lossy compression and
Lossless compression) is that, The lossy compression technique does not restored the data
in its original form, after decompression on the other hand lossless compression restores
and rebuilt the data in its original form, after decompression.
 Difference between Lossy Compression and Lossless Compression:
Presentation Layer
S.NO Lossy Compression Lossless Compression
Lossy compression is the method which eliminate While Lossless Compression does not eliminate the
1.
the data which is not noticeable. data which is not noticeable.

In Lossy compression, A file does not restore or While in Lossless Compression, A file can be
2.
rebuilt in its original form. restored in its original form.
In Lossy compression, Data’s quality is But Lossless Compression does not compromise
3.
compromised. the data’s quality.
But Lossless Compression does not reduce the size
4. Lossy compression reduces the size of data.
of data.
Algorithms used in Lossy compression are:
Algorithms used in Lossless compression are:
Transform coding, Discrete Cosine Transform,
5. Run Length Encoding, Lempel-Ziv-Welch,
Discrete Wavelet Transform, fractal compression
Huffman Coding, Arithmetic encoding etc.
etc.
Lossless Compression is used in Text, images,
6. Lossy compression is used in Images, audio, video.
sound.
Lossless Compression has less data-holding
7. Lossy compression has more data-holding capacity.
capacity than Lossy compression technique.
Lossy compression is also termed as irreversible Lossless Compression is also termed as reversible
8.
compression. compression.
Presentation Layer
 Cryptography
 Data Encryption and Decryption:
 Encryption is needed for security purposes when sending data across networks.
 An encryption algorithm is used during transmission, while a decryption algorithm is used
at the receiving node.
 Encryption and decryption typically involves the secure sockets layer (SSL) protocol,
which has become more popular when used by the presentation layer
 Encryption is related to cryptography in application layer.
 Cryptography referred almost exclusively to encryption, which is the process of converting
ordinary information (called plain text) into unintelligible text (called cipher text).
 A cipher is a pair of algorithms that create the encryption and the reversing decryption.
 Encryption is also known as private-key cryptography, and is called so because the key
used to encrypt and decrypt the message must remain secure, because anyone with access
to it can decrypt the data.
Application Layer
 Design Issues with Application Layer
 In the design and implementation of Application Layer protocols occurring problems and
these problems can be addressed by patterns from several different pattern languages:
 Design (pattern) Language for Application-level Communication Protocols: The
Application-level Communication Protocols Design Patterns language aims to help
solve communication software design.
 Service Design Patterns: Developers of communication applications must address
recurring design challenges related to efficiency, extensibility, and robustness. These
challenges are often independent of application-specific requirements. Successful
developers resolve these challenges by applying appropriate patterns and pattern
languages.
 Enterprise Application Architecture's Patterns:
 Pattern-Oriented Software Architecture: An architectural pattern is a general,
reusable solution to a commonly occurring problem in software architecture within a
given context. The architectural patterns address various issues in software engineering,
such as computer hardware performance limitations, high availability and minimization of
a business risk.
Application Layer
 Functions of the Application layer
 1. Network Virtual terminal
 The application layer is the software version of a physical terminal and this layer permitted
to a user to log on to a remote host.
 For this, an application creates a software emulation of a terminal at the remote host. By
this user's computer can communicate with the software terminal, which in turn,
communicates with the host.
 It is shown that the remote host is communicating with one of its terminals, so it allows the
user to log on.
 In other words, An application layer allows a user to log on to a remote host. To do so, the
application creates a software emulation of a terminal at the remote host. The user's
computer talks to the software terminal, which in turn, talks to the host. The remote host
thinks that it is communicating with one of its own terminals, so it allows the user to log
on.
Application Layer
 Functions of the Application layer
 2. File Transfer, Access, and Management (FTAM)
 An application permits a user to access files in a remote computer, to retrieve files from a
computer and to manage files on a remote computer.
 FTAM is concerned with a hierarchical virtual file in terms of file attributes, file structure
and the types of operations performed on the files and their attributes.
 In other word, An application allows a user to access files in a remote computer, to retrieve
files from a computer and to manage files in a remote computer. FTAM defines a
hierarchical virtual file in terms of file structure, file attributes and the kind of operations
performed on the files and their attributes.
Application Layer
 Functions of the Application layer
 3. Addressing
 To achieve communication between client and server system, there is a need for
addressing.
 When a request is sent from the client side to the server side, this request contains the
server address and its own address.
 The server answered to the client request, this request contains the destination address, i.e.,
client address. DNS is used to achieve this type of addressing.
 In other words, To obtain communication between client and server, there is a need for
addressing. When a client made a request to the server, the request contains the server
address and its own address. The server response to the client request, the request contains
the destination address, i.e., client address. To achieve this kind of addressing, DNS is
used.
Application Layer
 Functions of the Application layer
 4. Mail Services
 Email forwarding and storage of e-mails provided by an application layer.
 An application layer provides Email forwarding and storage.
 5. Directory Services
 A distributed database is contained by an application that provides access for global
information about various objects and services.
 An application contains a distributed database that provides access for global information
about various objects and services.
 6. Authentication
 It provides authentication to occur between devices for an extra layer of security and it
authenticates the sender or receiver's message or both.
 It authenticates the sender or receiver's message or both.

You might also like