0% found this document useful (0 votes)
2 views32 pages

Transport Layer

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 32

KGiSL Institute of Technology

(Approved by AICTE, New Delhi; Affiliated to Anna University, Chennai)


Recognized by UGC, Accredited by NBA (IT)
365, KGiSL Campus, Thudiyalur Road, Saravanampatti, Coimbatore – 641035.

Department of Electronics and Communication Engineering

Name of the Faculty : Ms.R.Kiruthikaa

Subject Name & Code : EC3401/Networks and Security

Branch & Department : Electronics and Communication Engineering

Year & Semester : II/ IV

Academic Year :2024-25

EC3401 / N & S / II ECE / IV SEM / KG-KiTE


Syllabus
UNIT III TRANSPORT AND APPLICATION LAYERS

Transport Layer Protocols – UDP and TCP Connection and State


Transition Diagram - Congestion Control and Avoidance(DEC bit,
RED)- QoS - Application Layer Paradigms – Client – Server
Programming – Domain Name System – World Wide Web, HTTP,
Electronic Mail.

EC3401 / N & S / II ECE / IV SEM / KG-KiTE


Course Outcome

CO 3: List the functions of the transport and application layer. K2 LEVEL

EC3401 / N & S / II ECE / IV SEM / KG-KiTE


TRANSPORT LAYER
Difference between Packet& Frame
PACKET FRAME

Encapsulated unit created at the Network layer of the OSI model. Encapsulated unit created at the data link layer of the OSI

Ex: IP-Packet Ex:Ethernet Frame

Packet contains Source and destination IP address along with Frame contains Source and destination MAC address along with
Top layer data Top layer data.

Segment is encapsulated with in a packet. Hence segment is the packet is encapsulated within a frame. Hence packet is the data
data part part

Thus, a packet typically contains logical address information Thus a frame typically contains physical address information.
Transport Layer
• The Transport layer is responsible for the delivery of a message from
one process to another.
Process to process means:
It is not just a source to destination delivery i.e from one computer to
another.
It is a delivery from a specific process on one computer to a specific
process on the other.
What a Network layer actually does?
It oversees source-to-destination delivery of individual packets , it
does not recognize any relationship between those packets.
It treats each one independently , as though each piece belongs to a
separate message.
How transport layer differ from network layer?

• The transport layer , ensures that the whole message arrives intact
and in order , overseeing both error control and flow control at the
source –to-destination level.
Transport Layer
Transport layer protocol
• A transport layer protocol can be either connectionless or
connection-oriented.
• UDP-Connectionless protocol-Simple
• TCP-Connection oriented protocol-Complex
• SCTP-Connection oriented protocol-Designed for Multimedia
application
• (Stream control transport protocol)
PDU(SEGMENT)
• In the Transport layer a message is normally divided into
transmittable segment.
• UDP treats each segment separately
• TCP creates a relationship between the segments using sequence
numbers.
Connectionless transport layer
• A connectionless transport layer treats each segment as an
independent packet and delivers it to the transport layer at the
destination machine.
• The packets are not numbered ; they may be delayed or lost or may
arrive out of sequence.
• There is no acknowledgement either.
• UDP is connectionless…
Connection –oriented transport layer
• A connection oriented transport layer makes a connection with the
transport layer at the destination machine first before delivering the
packets.
• After all the data is transferred , the connection is terminated.
• TCP and SCTP are Connection oriented…
Reliable versus unreliable
Transport layer service can be reliable or unreliable
• If the application layer program needs reliability,
TCP &SCTP protocol will implement flow and error control at the transport
layer . But it is slower and more complex service.
• If the application layer program does not need reliability, it means most real-
time application does not demand flow and error control,but it demand fast
service. So unreliable protocol UDP is used.
Question arises?
• If the data link layer is reliable and has flow and error control , do
we need this at transport layer too?
Answer

YES
• Reliability at the data link layer is between two
nodes ;
• we need reliability between two ends .
• Because the network layer in the internet is
unreliable.
• So we need to implement reliability at the
transport layer.
Types of data delivery

The transport layer is responsible for process-to-


process delivery.
Addressing
• At the Data link layer, we need a MAC address to choose ONE node
among SEVERAL node.
• At the Network layer we need an IP address to choose one Host
among Millions.
• At the Transport layer we need a transport layer address called a
PORT NUMBER ,to choose among multiple processes running on the
destination host.
• Destination port number for delivery; source port no for the reply
Port number
• Port number for a client host program defines itself randomly by the
transport layer. at this is called ephemeral port number ranging from
49,152 to 65,535
• Port number for servers are universally assigned by (internet assigned
number authority) called well-known port number ranging from0 to
1023
Socket address
• Process to process delivery needs two identifiers , IP address and port
number at each end to make a connection.
• The combination of IP address and a Port number is called a socket
address
• Client socket address defines the client process uniquely.
• Server socket address defines the server process uniquely
Socket address
It is a 48 bit address .
It is a combination of both IP Address and port number.
UDP
• The User Datagram Protocol (UDP) is called a connectionless ,
unreliable transport protocol.
• UDP is so powerless , it perform process to process communication
with very limited error checking.
• If a process wants to send a small message and does not care much
about reliability , it can use UDP
Well-known ports used by UDP
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
53 Nameserver Domain Name Service
67 Bootps Server port to download bootstrap information
68 Bootpc Client port to download bootstrap information
69 TFTP Trivial File Transfer Protocol
111 RPC Remote Procedure Call
123 NTP Network Time Protocol
161 SNMP Simple Network Management Protocol
162 SNMP Simple Network Management Protocol (trap)
User datagram format
• UDP packets , called User datagrams , have a fixed-size header of 8
byte.
Source Port Number :

• This is the Port number used by the process running on the machine
• It is 16 bit long ,means port number can range from 0 to 65,535.
• If the source host is client an ephemeral port number is chosen by the
UDP for that particular process requested.
• If the source host is server the port number is a well-known port number.
Destination Port Number:

• This port number used by the process running on the destination


host.
• It is also 16 bit long
• If the destination host is a server(client sending a request)the port
number ,is a well known port number most case.
• If the destination host is the client(a server sending a response),the
port number is an ephemeral port number most case.
LENGTH :
• This is a 16 bit field that defines the total length of the user
datagram , Header plus Data.
CHECKSUM
• This field is used to detect errors over the entire user
datagram(header plus data)
UDP Checksum

UDP checksum includes three sections:


• A pseudo header
• UDP header
• Data coming from application layer.
Pseudo Header:

• It is a part of the IP packet header in which user datagram is


encapsulated.
• The reason for including Pseudo Header in checksum is to save IP
header from corrupt.
Protocol :
• The protocol field is added to ensure that the packet belongs to
UDP , not to other transport layer protocol . value of UDP is 17.
• If this value changes during transmission , the checksum calculation
at the receiver will detect it and UDP drops the packet . It is not
delivered to the wrong protocol.
Checksum calculation of a simple UDP user
datagram
Queues in UDP
Uses of UDP

• UDP is suitable for a process that requires simple request-response


communication with little concern for flow and error control.
• UDP is suitable transport protocol for multicasting
• UDP is used for management process such as SNMP
• UDP is used for some route updating protocols such as (RIP)

You might also like