0% found this document useful (0 votes)
13 views31 pages

CN - Lecture 05 - Transport Layer - ASS

Chapter 3 of 'Computer Networking: A Top Down Approach' focuses on the transport layer, detailing its responsibilities such as establishing communication sessions, data segmentation, and application identification. It discusses two main protocols: TCP, which provides reliable, connection-oriented transport, and UDP, which offers connectionless, unreliable delivery. The chapter also covers concepts like multiplexing, flow control, congestion control, and the differences between TCP and UDP applications.

Uploaded by

Leen Kayyal
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)
13 views31 pages

CN - Lecture 05 - Transport Layer - ASS

Chapter 3 of 'Computer Networking: A Top Down Approach' focuses on the transport layer, detailing its responsibilities such as establishing communication sessions, data segmentation, and application identification. It discusses two main protocols: TCP, which provides reliable, connection-oriented transport, and UDP, which offers connectionless, unreliable delivery. The chapter also covers concepts like multiplexing, flow control, congestion control, and the differences between TCP and UDP applications.

Uploaded by

Leen Kayyal
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/ 31

Chapter 3

Transport Layer

Computer
Networking: A Top
Down Approach
5th edition
Jim Kurose, Keith Ross
Addison-Wesley
April 2009
All material copyright 1996-2011 (adapted)
J.F Kurose and K.W. Ross, All Rights Reserved

Transport Layer 3-1


Chapter 3: Transport Layer
our goals:
❖ understand ❖ learn about Internet
principles behind transport layer protocols:
transport layer ▪ UDP: connectionless
services: transport
▪ multiplexing, ▪ TCP: connection-oriented
demultiplexing reliable transport
▪ reliable data transfer ▪ TCP congestion control
▪ flow control
▪ congestion control

Transport Layer 3-2


Chapter 3 outline
3.1 transport-layer 3.5 connection-oriented
services transport: TCP
3.2 multiplexing and ▪ segment structure
demultiplexing ▪ reliable data transfer
including connection ▪ flow control
less and oriented ▪ connection management
3.3 connectionless 3.6 principles of congestion
transport: UDP control
3.4 principles of reliable 3.7 TCP congestion control
data transfer
(including rdt1.0, 2.0,
2.1, 2.2, 3.0,
Pipelined protocols) Transport Layer 3-3
Transportation of Data

Role of the Transport Layer


The transport layer is responsible for establishing a temporary
communication session between two applications and delivering data
between them.
Transport Layer uses two protocols to achieve this:
❖ Transmission Control Protocol (TCP)
❖ User Datagram Protocol (UDP)
Primary Responsibilities of Transport Layer Protocols
❖ Tracking the individual communication between applications on the
source and destination hosts
❖ Segmenting data for manageability and reassembling segmented data
into streams of application data at the destination
❖ Identifying the proper application for each communication
stream

Adopted from GUtech Cisco Networking Academy


Transportation of Data
Role of the Transport Layer (Cont.)

Adopted from GUtech Cisco Networking Academy


Transport services and protocols
application
transport
❖ provide logical communication network
data link
between app processes physical

running on different hosts


❖ transport protocols run in
end systems
▪ send side: breaks app
messages into segments,
passes to network layer
▪ rcv side: reassembles application
segments into messages, transport
network
passes to app layer data link
physical

❖ more than one transport


protocol available to apps
▪ Internet: TCP and UDP
Transport Layer 3-6
Transport vs. network layer
❖ network layer: logical household analogy:
communication
between hosts 12 kids in Ann’s house sending
letters to 12 kids in Bill’s
❖ transport layer: house:
logical ❖ hosts = houses
communication ❖ processes = kids

between processes ❖ app messages = letters in


envelopes
▪ relies on, enhances, ❖ transport protocol = Ann
network layer and Bill who demux to in-
services house siblings
❖ network-layer protocol =
postal service

Transport Layer 3-7


Internet transport-layer protocols
application
❖ reliable, in-order delivery transport
network

(TCP) data link


physical
network

▪ congestion control (network network


data link
data link
physical
overloaded) physical
network

▪ flow control (sender won’t


data link
physical

overwhelm receiver) network


data link
▪ connection setup physical
network

❖ unreliable, unordered network


data link
physical

delivery: UDP data link


physical
network
application
transport
network
▪ best-effort (bit rate and latency data link
physical data link
physical
and packet loss)
❖ services not available:
▪ delay guarantees
▪ bandwidth guarantees Transport Layer 3-8
Transportation of Data

Transport Layer Reliability


(Fast Review)
TCP/IP provides two transport layer protocols, TCP and UDP.
TCP
❖ Provides reliable delivery ensuring that all of the data arrives at the
destination.
❖ Uses acknowledged delivery and other processes to ensure delivery.
❖ Makes larger demands on the network – more overhead.
UDP
❖ Provides just the basic functions for delivery – no reliability.
❖ Less overhead.

Adopted from GUtech Cisco Networking Academy


Transportation of Data

The Right Transport Layer


Protocol
TCP or UDP
❖ There is a trade-off between the value of reliability and the burden it
places on the network.
❖ Application developers choose the transport protocol based on the
requirements of their applications.

Adopted from GUtech Cisco Networking Academy


Transportation of Data
The Right Transport Layer Protocol (Cont.)

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP

UDP
❖ Defined in RFC 768
❖ Connectionless
❖ Unreliable delivery
❖ No ordered data
reconstruction
❖ No flow control
❖ Stateless protocol

Applications that use


UDP:
❖ Domain Name
System (DNS)
❖ Video Streaming

❖ VoIP

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP

Separating Multiple Communications


TCP and UDP use port numbers to differentiate between applications.

Internet Messaging

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP
TCP and UDP Port Addressing (Cont.)
The combination of the source and destination IP addresses and the
source and destination port numbers is known as a Socket.

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP
TCP and UDP Port Addressing (Cont.)

TCP Port Numbers

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP

TCP and UDP Port Addressing (Cont.)


UDP Port Numbers

Adopted from GUtech Cisco Networking Academy


Introducing TCP and UDP

TCP and UDP Segmentation


The Transport Layer divides the data into pieces called segments and adds
a header for delivery over the network.

Adopted from GUtech Cisco Networking Academy


TCP Communication

TCP Reliable Delivery


The reliability of TCP communication is obtained through the use of
connection-oriented sessions.

Adopted from GUtech Cisco Networking Academy


TCP Communication

TCP Server Processes

Adopted from GUtech Cisco Networking Academy


TCP Communication

TCP Server Processes (Cont.)

Adopted from GUtech Cisco Networking Academy


TCP Communication
TCP Connection, Establishment, and Termination
Three-Way Handshake
❖ Establishes that the destination device is present on the network
❖ Verifies that the destination device has an active service and accepts
requests on the destination port number that the initiating client
intends to use for the session
❖ Informs the destination device that the source client intends to
establish a communication session on that port number

Adopted from GUtech Cisco Networking Academy


Protocol Data Units

TCP Reliability – Ordered Delivery


Sequence numbers are used to reassemble segments into the original
order.

Adopted from GUtech Cisco Networking Academy


UDP Communication

UDP Low Overhead vs. Reliability


UDP:
❖ Simple protocol that provides the basic transport layer function
❖ Used by applications that can tolerate small loss of data
❖ Used by applications that cannot tolerate delay
UDP used by:
❖ DNS
❖ Simple Network Management Protocol (SNMP)
❖ Dynamic Host Configuration Protocol (DHCP)
❖ Trivial File Transfer Protocol (TFTP)
❖ IP telephony or VoIP
❖ Online games

Adopted from GUtech Cisco Networking Academy


UDP Communication

Datagram Reassembly

Adopted from GUtech Cisco Networking Academy


TCP or UDP, that is the Question

Applications Using TCP

Adopted from GUtech Cisco Networking Academy


TCP or UDP, that is the Question

Applications Using UDP

Adopted from GUtech Cisco Networking Academy


The services provided by
transport layer protocols:

Adopted from GUtech Cisco Networking Academy


Transport Layer 3-27
Addressing

• Data link layer → MAC address

• Network layer → IP address

• Transport layer → Port number (choose among multiple


processes running on destination host)

Adopted from GUtech Cisco Networking Academy


Transport Layer 3-28
Reliable Delivery

Adopted from GUtech Cisco Networking Academy


Transport Layer 3-29
Difference between flow control
and congestion control
❖ Flow control means preventing the ❖ Although, Flow control and congestion
source from sending data that the control are two network traffic control
sink will end up dropping because mechanisms used in computer networks,
it runs out of buffer space. they have their key differences. Flow
This is fairly easy with a sliding window control is an end to end mechanism
protocol--just make sure the source's that controls the traffic between a
window is no larger than the free space sender and a receiver, when a fast
in the sink's buffer. TCP does this by sender is transmitting data to a slow
letting the sink advertise its free buffer receiver. On the other hand, congestion
space in the window field of the acks. control is a mechanism that is used by a
network to control congestion in
Congestion control means the network. Congestion control
preventing (or trying to prevent) prevents loss of packets and delay caused
the source from sending data that due to congestion in the network.
will end up getting dropped by a Congestion control can be seen as a
router because its queue is full. mechanism that makes sure that an
This is more complicated, because entire network can handle the
packets from different sources travelling traffic that is coming to the
different paths can network. But, flow control refers to
converge on the same queue. mechanisms used to handle the
transmission between a particular
sender and a receiver.

http://www.differencebetween.com/
Transport Layer 3-30
Adopted from GUtech Cisco Networking Academy
Fast recovery
❖ Fast Recovery Since the Fast Retransmit algorithm is used when
duplicate ACKs are being received, the TCP sender has implicit
knowledge that there is data still flowing to the receiver. Why?
❖ The reason is because duplicate ACKs can only be generated
when a segment is received. This is a strong indication that
serious network congestion may not exist and that the lost
segment was a rare event. So instead of reducing the flow of data
abruptly by going all the way into Slow Start, the sender only
enters Congestion Avoidance mode. Rather than start at a
window of one segment as in Slow Start mode, the sender
resumes transmission with a larger window, incrementing as if in
Congestion Avoidance mode

Adopted from GUtech Cisco Networking Academy


Transport Layer 3-31

You might also like