SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Computer Networks – CSE331
Lecture 12
1 Hr
 understand principles behind
transport layer services:
 multiplexing, demultiplexing
 reliable data transfer
 flow control
 congestion control
 learn about Internet
transport layer protocols:
 UDP: connectionless
transport
 TCP: connection-oriented
reliable transport
 TCP congestion control
 provide logical communication
between app processes running on
different hosts
 transport protocols run in end systems
 sender side: breaks app messages
into segments, passes to network
layer
 receiver side: reassembles segments
into messages, passes to app layer
 more than one transport protocol
available to apps
 Internet: TCP and UDP
application
transport
network
data link
physical
application
transport
network
data link
physical
 reliable, in-order
delivery (TCP)
 congestion control
 flow control
 connection setup
 unreliable, unordered
delivery: UDP
 Send & forget
 services not available:
 delay guarantees
 bandwidth guarantees
application
transport
network
data link
physical
application
transport
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
process
socket
use header info to deliver
received segments to correct
socket
demultiplexing at receiver:
handle data from multiple
sockets, add transport header (later used
for demultiplexing)
multiplexing at sender:
transport
application
physical
link
network
P2P1
transport
application
physical
link
network
P4
transport
application
physical
link
network
P3
 host receives IP datagrams
 each datagram has source IP address, destination IP address
 each datagram carries one transport-layer segment
 each segment has source, destination port number
 host uses IP addresses & port numbers
to direct segment to appropriate socket
source port # dest port #
32 bits
application
data
(payload)
other header fields
TCP/UDP segment format
 recall: created socket has host-
local port #:
DatagramSocket mySocket1
= new DatagramSocket(12534);
 when host receives UDP segment:
 checks destination port # in segment
 directs UDP segment to socket with
that port #
 when creating datagram to send
into UDP socket, must specify
 destination IP address
 destination port #
IP datagrams with same dest. port
#, but different source IP
addresses and/or source port
numbers will be directed to same
socket at dest
DatagramSocket serverSocket = new
DatagramSocket(6428);
transport
application
physical
link
network
P3
transport
application
physical
link
network
P1
transport
application
physical
link
network
P4
DatagramSocket mySocket1 =
new DatagramSocket(5775);
DatagramSocket mySocket2 =
new DatagramSocket(9157);
source port: 9157
dest port: 6428
source port: 6428
dest port: 9157
source port: ?
dest port: ?
source port: ?
dest port: ?
 TCP socket identified by 4-tuple:
 source IP address
 source port number
 dest IP address
 dest port number
 demux: receiver uses all four
values to direct segment to
appropriate socket
 server host may support many
simultaneous TCP sockets:
 each socket identified by its own
4-tuple
 web servers have different
sockets for each connecting
client
 non-persistent HTTP will have
different socket for each request
transport
application
physical
link
network
P3
transport
application
physical
link
P4
transport
application
physical
link
network
P2
source IP,port: A,9157
dest IP, port: B,80
source IP,port: B,80
dest IP,port: A,9157
host: IP
address A
host: IP
address C
network
P6P5
P3
source IP,port: C,5775
dest IP,port: B,80
source IP,port: C,9157
dest IP,port: B,80
three segments, all destined to IP address: B,
dest port: 80 are demultiplexed to different sockets
server: IP
address B
transport
application
physical
link
network
P3
transport
application
physical
link
transport
application
physical
link
network
P2
source IP,port: A,9157
dest IP, port: B,80
source IP,port: B,80
dest IP,port: A,9157host: IP
address A
host: IP
address C
server: IP
address B
network
P3
source IP,port: C,5775
dest IP,port: B,80
source IP,port: C,9157
dest IP,port: B,80
P4
threaded server
 “best effort” service, UDP
segments may be:
 lost
 delivered out-of-order
to app
 connectionless:
 no handshaking between
UDP sender, receiver
 each UDP segment
handled independently
of others
 UDP use:
 streaming multimedia apps
(loss tolerant, rate sensitive)
 DNS
 reliable transfer over UDP:
 add reliability at application
layer
 application-specific error
recovery!
source port # dest port #
32 bits
application
data
(payload)
UDP segment format
length checksum
length, in bytes of UDP
segment, including header
 no connection establishment (which can
add delay)
 simple: no connection state at sender,
receiver
 small header size
 no congestion control: UDP can blast
away as fast as desired
why is there a UDP?
More in next lecture
 Ross book 3.1 to 3.2
 Forouzan 13.1

Weitere ähnliche Inhalte

Was ist angesagt?

Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udprahul kundu
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake Alok Tripathi
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)Fatbardh Hysa
 
TCP Theory
TCP TheoryTCP Theory
TCP Theorysoohyunc
 
TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol Akhil .B
 
Tcp vs udp difference and comparison diffen
Tcp vs udp   difference and comparison   diffenTcp vs udp   difference and comparison   diffen
Tcp vs udp difference and comparison diffenHarikiran Raju
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control ProtocolPeter R. Egli
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)Kruti Niranjan
 

Was ist angesagt? (20)

Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
 
Tcp Udp
Tcp UdpTcp Udp
Tcp Udp
 
Transport Protocols
Transport ProtocolsTransport Protocols
Transport Protocols
 
Transport layer
Transport layerTransport layer
Transport layer
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
Transport layer
Transport layerTransport layer
Transport layer
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
 
Transport layer
Transport layerTransport layer
Transport layer
 
TCP Theory
TCP TheoryTCP Theory
TCP Theory
 
TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol
 
Tcp vs udp difference and comparison diffen
Tcp vs udp   difference and comparison   diffenTcp vs udp   difference and comparison   diffen
Tcp vs udp difference and comparison diffen
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control Protocol
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
 
Transport layer
Transport layerTransport layer
Transport layer
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 

Ähnlich wie Lec 12(Transport Layer)

Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingKeyur Vadodariya
 
Computer networks Module 3 Transport layer
Computer networks Module 3 Transport layerComputer networks Module 3 Transport layer
Computer networks Module 3 Transport layerclaudle200415
 
4_5938019984411199949.ppt
4_5938019984411199949.ppt4_5938019984411199949.ppt
4_5938019984411199949.pptHodaKHajeh1
 
Chapter 3 v6.01 (1)
Chapter 3 v6.01 (1)Chapter 3 v6.01 (1)
Chapter 3 v6.01 (1)Krunal Pawar
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxGirT2
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layerKhánh Ghẻ
 
COE332-Ch03d.pptx
COE332-Ch03d.pptxCOE332-Ch03d.pptx
COE332-Ch03d.pptxMemMem25
 
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIAL
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIALTRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIAL
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIALjainyshah20
 

Ähnlich wie Lec 12(Transport Layer) (20)

Chapter3 transport
Chapter3 transportChapter3 transport
Chapter3 transport
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Chapter 3 v6.01
Chapter 3 v6.01Chapter 3 v6.01
Chapter 3 v6.01
 
Chapter_3_V6.01.ppt
Chapter_3_V6.01.pptChapter_3_V6.01.ppt
Chapter_3_V6.01.ppt
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
Computer networks Module 3 Transport layer
Computer networks Module 3 Transport layerComputer networks Module 3 Transport layer
Computer networks Module 3 Transport layer
 
Chapter_3_v8.0.pptx
Chapter_3_v8.0.pptxChapter_3_v8.0.pptx
Chapter_3_v8.0.pptx
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Chapter_3_V6.01 (1).pptx
Chapter_3_V6.01 (1).pptxChapter_3_V6.01 (1).pptx
Chapter_3_V6.01 (1).pptx
 
4_5938019984411199949.ppt
4_5938019984411199949.ppt4_5938019984411199949.ppt
4_5938019984411199949.ppt
 
Chapter 3 v6.01 (1)
Chapter 3 v6.01 (1)Chapter 3 v6.01 (1)
Chapter 3 v6.01 (1)
 
lecturer3.pptx
lecturer3.pptxlecturer3.pptx
lecturer3.pptx
 
Chapter 3 v6.0
Chapter 3 v6.0Chapter 3 v6.0
Chapter 3 v6.0
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layer
 
COE332-Ch03d.pptx
COE332-Ch03d.pptxCOE332-Ch03d.pptx
COE332-Ch03d.pptx
 
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIAL
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIALTRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIAL
TRANSPORT LAYER_DATA STRUCTURE LEARNING MATERIAL
 
CCNA 1 Chapter 7 v5.0 2014
CCNA 1 Chapter 7 v5.0 2014CCNA 1 Chapter 7 v5.0 2014
CCNA 1 Chapter 7 v5.0 2014
 
Lecture set 7
Lecture set 7Lecture set 7
Lecture set 7
 
More on Tcp/Ip
More on Tcp/IpMore on Tcp/Ip
More on Tcp/Ip
 

Mehr von maamir farooq (20)

Ooad lab1
Ooad lab1Ooad lab1
Ooad lab1
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lesson 02
Lesson 02Lesson 02
Lesson 02
 
Php client libray
Php client librayPhp client libray
Php client libray
 
Swiftmailer
SwiftmailerSwiftmailer
Swiftmailer
 
Lect15
Lect15Lect15
Lect15
 
Lec 7
Lec 7Lec 7
Lec 7
 
Lec 6
Lec 6Lec 6
Lec 6
 
Lec 5
Lec 5Lec 5
Lec 5
 
J query 1.7 cheat sheet
J query 1.7 cheat sheetJ query 1.7 cheat sheet
J query 1.7 cheat sheet
 
Assignment
AssignmentAssignment
Assignment
 
Java script summary
Java script summaryJava script summary
Java script summary
 
Lec 3
Lec 3Lec 3
Lec 3
 
Lec 2
Lec 2Lec 2
Lec 2
 
Lec 1
Lec 1Lec 1
Lec 1
 
Css summary
Css summaryCss summary
Css summary
 
Manual of image processing lab
Manual of image processing labManual of image processing lab
Manual of image processing lab
 
Session management
Session managementSession management
Session management
 
Data management
Data managementData management
Data management
 
Content provider
Content providerContent provider
Content provider
 

Kürzlich hochgeladen

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 

Kürzlich hochgeladen (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Lec 12(Transport Layer)

  • 1. Computer Networks – CSE331 Lecture 12 1 Hr
  • 2.  understand principles behind transport layer services:  multiplexing, demultiplexing  reliable data transfer  flow control  congestion control  learn about Internet transport layer protocols:  UDP: connectionless transport  TCP: connection-oriented reliable transport  TCP congestion control
  • 3.  provide logical communication between app processes running on different hosts  transport protocols run in end systems  sender side: breaks app messages into segments, passes to network layer  receiver side: reassembles segments into messages, passes to app layer  more than one transport protocol available to apps  Internet: TCP and UDP application transport network data link physical application transport network data link physical
  • 4.  reliable, in-order delivery (TCP)  congestion control  flow control  connection setup  unreliable, unordered delivery: UDP  Send & forget  services not available:  delay guarantees  bandwidth guarantees application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical
  • 5. process socket use header info to deliver received segments to correct socket demultiplexing at receiver: handle data from multiple sockets, add transport header (later used for demultiplexing) multiplexing at sender: transport application physical link network P2P1 transport application physical link network P4 transport application physical link network P3
  • 6.  host receives IP datagrams  each datagram has source IP address, destination IP address  each datagram carries one transport-layer segment  each segment has source, destination port number  host uses IP addresses & port numbers to direct segment to appropriate socket source port # dest port # 32 bits application data (payload) other header fields TCP/UDP segment format
  • 7.  recall: created socket has host- local port #: DatagramSocket mySocket1 = new DatagramSocket(12534);  when host receives UDP segment:  checks destination port # in segment  directs UDP segment to socket with that port #  when creating datagram to send into UDP socket, must specify  destination IP address  destination port # IP datagrams with same dest. port #, but different source IP addresses and/or source port numbers will be directed to same socket at dest
  • 8. DatagramSocket serverSocket = new DatagramSocket(6428); transport application physical link network P3 transport application physical link network P1 transport application physical link network P4 DatagramSocket mySocket1 = new DatagramSocket(5775); DatagramSocket mySocket2 = new DatagramSocket(9157); source port: 9157 dest port: 6428 source port: 6428 dest port: 9157 source port: ? dest port: ? source port: ? dest port: ?
  • 9.  TCP socket identified by 4-tuple:  source IP address  source port number  dest IP address  dest port number  demux: receiver uses all four values to direct segment to appropriate socket  server host may support many simultaneous TCP sockets:  each socket identified by its own 4-tuple  web servers have different sockets for each connecting client  non-persistent HTTP will have different socket for each request
  • 10. transport application physical link network P3 transport application physical link P4 transport application physical link network P2 source IP,port: A,9157 dest IP, port: B,80 source IP,port: B,80 dest IP,port: A,9157 host: IP address A host: IP address C network P6P5 P3 source IP,port: C,5775 dest IP,port: B,80 source IP,port: C,9157 dest IP,port: B,80 three segments, all destined to IP address: B, dest port: 80 are demultiplexed to different sockets server: IP address B
  • 11. transport application physical link network P3 transport application physical link transport application physical link network P2 source IP,port: A,9157 dest IP, port: B,80 source IP,port: B,80 dest IP,port: A,9157host: IP address A host: IP address C server: IP address B network P3 source IP,port: C,5775 dest IP,port: B,80 source IP,port: C,9157 dest IP,port: B,80 P4 threaded server
  • 12.  “best effort” service, UDP segments may be:  lost  delivered out-of-order to app  connectionless:  no handshaking between UDP sender, receiver  each UDP segment handled independently of others  UDP use:  streaming multimedia apps (loss tolerant, rate sensitive)  DNS  reliable transfer over UDP:  add reliability at application layer  application-specific error recovery!
  • 13. source port # dest port # 32 bits application data (payload) UDP segment format length checksum length, in bytes of UDP segment, including header  no connection establishment (which can add delay)  simple: no connection state at sender, receiver  small header size  no congestion control: UDP can blast away as fast as desired why is there a UDP? More in next lecture
  • 14.  Ross book 3.1 to 3.2  Forouzan 13.1