![Page 1: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/1.jpg)
Computer NetworksUnit II
Transport layer(2012 pattern)
By Prof. B.A.Khivsara
Assistant Prof.
Department of Computer Engg.
SNJB’s KBJ COE, ChandwadIntroduction 1-1
![Page 2: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/2.jpg)
Introduction 1-2
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 3: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/3.jpg)
Introduction 1-3
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 4: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/4.jpg)
Transport Layer 3-4
Transport Layer
Services provided by transport layer Process to Process
delivery
Connection less as well as connection oriented data delivery
Error control
multiplexing/demultiplexing
reliable data transfer
flow control
congestion control
learn about transport layer protocols in the Internet: UDP: connectionless
transport
TCP: connection-oriented transport
STCP :Combination of TCP and UDP
RTP : Real time transport protocol
![Page 5: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/5.jpg)
23.5
Process to Process Data Delivery
![Page 6: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/6.jpg)
Addressing
• Mac Address (48 bit)
• Physical address
• NIC Card
Data Link Layer
• IP Address (32 or 128 bit)
• Logical Address
• Machine
Network Layer
• Port Address (16 bit)
• Logical Address
• Application
Transport Layer
Introduction 1-6
![Page 7: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/7.jpg)
Transport Layer 3-7
Transport services and protocols
provide logical communicationbetween app processes running on different hosts
transport protocols run in end systems
send side: breaks app messages into segments, passes to network layer
rcv side: reassembles segments into messages, passes to app layer
more than one transport protocol available to apps
Internet: TCP and UDP and SCTP
application
transport
network
data link
physical
application
transport
network
data link
physical
![Page 8: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/8.jpg)
Introduction 1-8
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 9: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/9.jpg)
23.9
IP addresses versus port numbers
![Page 10: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/10.jpg)
23.10
PORT ranges by IANA (Internet Assigned
Number Authority)
![Page 11: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/11.jpg)
Port Ranges by IANA
• From 0-1023
• Assigned & controlled by IANA
• These are port no.s for servers ex. FTP(20,21),SMTP (25)
Well Known
• From 1024-49151
• Not assigned & controlled by IANA
• Can only be registered with IANA
• Ex. MySQL(3306), MongoDB (27017)
Registered
• From 49152-65535
• Nighter controlled nor registered by IANA
• They can be used by any client Program(Process)Dynamic
Introduction 1-11
![Page 12: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/12.jpg)
23.12
Socket address
![Page 13: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/13.jpg)
Transport Service Primitives
The primitives for a simple transport service.
![Page 14: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/14.jpg)
Transport Service Primitives (2)
The nesting of TPDUs, packets, and frames.
![Page 15: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/15.jpg)
Berkeley Sockets
The socket primitives for TCP.
![Page 16: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/16.jpg)
23.16
Multiplexing and demultiplexing
![Page 17: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/17.jpg)
Transport Layer 3-17
Multiplexing/demultiplexing
delivering received segments
to correct socket
Demultiplexing at rcv host:
Multiplexing at send host:
gathering data from multiple
sockets, enveloping data with
header (later used for
demultiplexing)
![Page 18: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/18.jpg)
Transport Layer 3-18
How demultiplexing works host receives IP datagrams
each datagram has source IP address, destination IP address
each datagram carries 1 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
(message)
other header fields
TCP/UDP segment format
![Page 19: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/19.jpg)
Transport Layer 3-19
Internet transport-layer protocols
reliable, in-order delivery (TCP) congestion control
flow control
connection setup
unreliable, unordered delivery: UDP Faster data delivery
Stream Control Transmission Protocol (SCTP): Faster and reliable data delivery
application
transport
network
data link
physicalnetwork
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
![Page 20: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/20.jpg)
Introduction 1-20
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP (User datagram protocol)
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 21: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/21.jpg)
USER DATAGRAM PROTOCOL (UDP)
The User Datagram Protocol (UDP) is called a
connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
Well-Known Ports for UDP
User Datagram
Checksum
UDP Operation
Use of UDP
Topics discussed in this section:
![Page 22: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/22.jpg)
23.22
Well-known ports used with UDP
![Page 23: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/23.jpg)
23.23
User datagram format (UDP Header Format)
![Page 24: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/24.jpg)
UDP Pseudo Header
Introduction 1-24
![Page 25: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/25.jpg)
UDP Operations
• Connectionless service
• No Flow and error control except checksum
• Encapsulation and Decapsulation of messages in IP datagram
• Queing
![Page 26: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/26.jpg)
23.26
Queues in UDP
![Page 27: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/27.jpg)
Uses of UDP
Simple Request reply communication
Suitable for process with internal flow and control mechanisms. Eg. TFTP
The Real-Time Transport Protocol
Used in route updating protocol like Routing Information Protocol(RIP)
Remote Procedure Call(RPC)
Suitable for Multicasting. Multicasting capability is inbuilt in UDP software's
![Page 28: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/28.jpg)
Introduction 1-28
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP (Transmission control protocol)
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 29: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/29.jpg)
TCP (Transmission control protocol)
TCP is a connection-oriented protocol; it creates a
virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.
TSP Vs UDP
TCP Services
TCP Stream delivery
Segment (TCP Header)
A TCP Connection
Flow Control
Error Control
Topics discussed in this section:
![Page 30: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/30.jpg)
Introduction 1-30
![Page 31: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/31.jpg)
The TCP Service Model
Some assigned ports.Port Protocol Use21 FTP File transfer23 Telnet Remote login
25 SMTP E-mail
69 TFTP Trivial File Transfer Protocol
79 Finger Lookup info about a user80 HTTP World Wide Web
110 POP-3 Remote e-mail access
119 NNTP USENET news
![Page 32: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/32.jpg)
23.32
Stream delivery
![Page 33: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/33.jpg)
23.33
Sending and receiving buffers
![Page 34: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/34.jpg)
23.34
TCP segments
![Page 35: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/35.jpg)
23.35
TCP segment format (TCP Header)
![Page 36: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/36.jpg)
23.36
Control field
![Page 37: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/37.jpg)
23.37
Description of flags in the control field
![Page 38: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/38.jpg)
23.38
TCP Connection establishment using three-way handshaking
![Page 39: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/39.jpg)
Connection Establishment (3)
Three protocol scenarios for establishing a connection using a three-way
handshake. CR denotes CONNECTION REQUEST.
(a) Normal operation,
(b) Old CONNECTION REQUEST appearing out of nowhere.
(c) Duplicate CONNECTION REQUEST and duplicate ACK.
![Page 40: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/40.jpg)
Connection Release
Abrupt disconnection with loss of data.
![Page 41: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/41.jpg)
Connection Release (2)
The two-army problem.
![Page 42: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/42.jpg)
23.42
TCP Connection termination using three-way handshaking
![Page 43: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/43.jpg)
Connection Release (3)
Four protocol scenarios for releasing a connection. (a) Normal case of a three-way handshake. (b) final ACK lost.
6-14, a, b
![Page 44: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/44.jpg)
Connection Release (4)
(c) Response lost. (d) Response lost and subsequent DRs lost.
6-14, c,d
![Page 45: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/45.jpg)
TCP Transmission Policy(Flow control)
Window management in TCP.
![Page 46: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/46.jpg)
Sender Receiver
The senders application performs a
2K write to the receivers buffer,
which is now half full.
SEQ=02KApplication
does a 2K write
Empty
0 4K
2K
![Page 47: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/47.jpg)
Sender Receiver
SEQ=02K
ACK=2048 WIN=2048
Application
does a 2K write
Empty
0 4K
2K
The receiver acknowledges the first
2048 bytes and informs the sender
that there is space in the buffer for
2048 bytes.
![Page 48: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/48.jpg)
Sender Receiver
SEQ=02K
ACK=2048 WIN=2048
Application
does a 2K write
SEQ=20482K
Application
does a 2K write
Empty
0 4K
Full
2K
The sender’s application writes
another 2K. The receivers buffer is
now full and the sender is blocked.
![Page 49: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/49.jpg)
Sender Receiver
SEQ=02K
ACK=2048 WIN=2048
SEQ=20482K
ACK=4096 WIN=0
Application
does a 2K write
Application
does a 2K write
Sender is
blocked
Empty
0 4K
Full
2K
The receiver acknowledges the next
2048 (total of 4096) bytes and
informs the sender that there is no
space in the buffer. The sender is still
blocked.
![Page 50: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/50.jpg)
Sender Receiver
SEQ=02K
ACK=2048 WIN=2048
SEQ=20482K
ACK=4096 WIN=0
Application
does a 2K write
Application
does a 2K write
{Sender is
blocked
ACK=4096 WIN=2048
Sender may
send up to 2K
Empty
0 4K
Full
2K
2K
The receiver clears 2048 bytes from
the buffer and informs the sender that
this space is available for use. The
sender is now unblocked and may
send 2K.
![Page 51: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/51.jpg)
Sender Receiver
SEQ=02K
ACK=2048 WIN=2048
SEQ=20482K
ACK=4096 WIN=0
ACK=4096 WIN=2048
Application
does a 2K write
Application
does a 2K write
SEQ=40961K
Application
does a 1K write
{Sender is
blocked
Sender may
send up to 2K
Empty
0 4K
Full
2K
2K
2K1K
The sender’s application writes
another 1K. The receivers buffer
now has 1K of space available.
![Page 52: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/52.jpg)
Silly window syndrome Problem
Silly window syndrome.
![Page 53: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/53.jpg)
Solution to Silly window syndrome Problem
There are two solutions
1. Nagle’s solution
2. Clark’s solution
Introduction 1-53
![Page 54: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/54.jpg)
Nagle's algorithm
Purpose is to allow the sender TCP to make efficient use of the network, while still being responsive to the sender applications.
Idea:
If application data comes in byte by byte, send first byte only. Then buffer all application data till until ACK for first byte comes in. If network is slow and application is fast, the second segment will contain a lot of data. Send second segment and buffer all data till ACK for second segment comes in.An exception to this rule is to always send (not wait for ACK) if enough data for half the receiver window or MSS(Maximum segment size) is accumulated.
![Page 55: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/55.jpg)
Clark's algorithm
Purpose is to prevent the receiver from sending a window update for 1byte.
Idea:
Receiver is forced to wait until it has a decent amount of space available
The receiver should not send a window update until it can handle the maximum segment size it declared when the connection was established or until its buffer is half empty, whichever is smaller
![Page 56: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/56.jpg)
TCP congestion control
We looked at how TCP handles flow control. In addition we know the congestion happens. The only real way to handle congestion is for the sender to reduce sending rate.
So how does on detect congestion ?In old days, packets were lost due to transmission errors and congestion. But nowadays, transmission errors are very rare (except for wireless). So, TCP assumes a lost packet as an indicator of congestion.
So does TCP deal with congestion ?It maintains an indicator of network capacity, called the congestion window
![Page 57: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/57.jpg)
TCP Congestion Control
(a) A fast network feeding a low capacity receiver.(b) A slow network feeding a high-capacity receiver.
![Page 58: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/58.jpg)
TCP congestion control
In essence TCP deals with two potential problems separately:
Problem SolutionReceiver capacity Receiver window (rwnd)Network capacity Congestion window (cwnd)
Each window reflect the number of bytes the sender may transmit. The sender sends the minimum of these two sizes. This size is the effective window.
![Page 59: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/59.jpg)
TCP Congestion Control – 3 Stages
TCP uses these stages in updating cwnd.
1. Slow start: Initial state. Rapidly grow cwnd
2. Congestion avoidance: Slowly grow cwnd.
3. Congestion detection : (Multiplicative decrease)
}Control amount of data injected into network
![Page 60: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/60.jpg)
TCP Congestion Control – Slow start
When connection is established , the sender initializes the congestion window to the size of the maximum segment in use on the connection.
It then sends the one maximum segment
If this segment is acknowledged before timeout occurs then it doubles the segment size
This is continued until the timeout occurs or receivers window size is reached
![Page 61: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/61.jpg)
TCP Congestion Control
An example of the Internet congestion algorithm.
![Page 62: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/62.jpg)
TCP Congestion Control-Congestion Avoidance
When the size of congestion window
reaches the slow start threshold, the slow
start phase stops and the additive phase
begins.
Introduction 1-62
![Page 63: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/63.jpg)
TCP Congestion Control-Congestion Detection
If congestion occurs the congestion window
size must be decreased.
That means when a timer time outs or when
3 Acks are received the size of the
threshold is dropped to ½ (multiplicative
decrease)
1-63
![Page 64: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/64.jpg)
Introduction 1-64
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of services
![Page 65: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/65.jpg)
65
Socket programming
Socket API
client/server paradigm
two types of transport service via socket API:
unreliable datagram (UDP)
reliable, byte stream-oriented (TCP)
Goal: learn how to build client/server application that communicate using sockets
![Page 66: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/66.jpg)
66
Socket-programming using TCP
Socket: a door between application process and end-end-transport protocol (UCP or TCP)
TCP service: reliable transfer of bytes from one process to another
process
TCP with
buffers,
variables
socket
controlled by
application
developer
controlled by
operating
system
host or
server
process
TCP with
buffers,
variables
socket
controlled by
application
developer
controlled by
operating
system
host or
server
internet
![Page 67: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/67.jpg)
67
Socket programming with TCP
Client must contact server
server process must first be running
server must have created socket (door) that welcomes client’s contact
Client contacts server by:
creating client-local TCP socket
specifying IP address, port number of server process
When client creates socket: client TCP establishes connection to server TCP
When contacted by client, server TCP creates new socket for server process to communicate with client
allows server to talk with multiple clients
source port numbers used to distinguish clients
TCP provides reliable, in-order
transfer of bytes (“pipe”)
between client and server
application viewpoint
![Page 68: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/68.jpg)
2: Application Layer 68
Client/server socket interaction: TCP
wait for incoming
connection requestconnectionSocket =
welcomeSocket.accept()
create socket,port=x, for
incoming request:welcomeSocket =
ServerSocket()
create socket,connect to hostid, port=xclientSocket =
Socket()
close
connectionSocket
read reply from
clientSocket
close
clientSocket
Server (running on hostid) Client
send request using
clientSocketread request from
connectionSocket
write reply to
connectionSocket
TCP
connection setup
![Page 69: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/69.jpg)
2: Application Layer 69
Socket programming with TCP
Example client-server app:
1) client reads line from standard input
(inFromUser stream) , sends to server via
socket (outToServer stream)
2) server reads line from socket
3) server converts line to uppercase, sends back to
client
4) client reads, prints modified line from socket
(inFromServer stream)
![Page 70: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/70.jpg)
2: Application Layer 70
Example: Java client (TCP)
import java.io.*;
import java.net.*;
class TCPClient {
public static void main(String argv[]) throws Exception
{
String sentence;
String modifiedSentence;
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
Socket clientSocket = new Socket("hostname", 6789);
DataOutputStream outToServer =
new DataOutputStream(clientSocket.getOutputStream());
Create
input stream
Create
client socket,
connect to server
Create
output stream
attached to socket
![Page 71: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/71.jpg)
2: Application Layer 71
Example: Java client (TCP), cont.
BufferedReader inFromServer =
new BufferedReader(new
InputStreamReader(clientSocket.getInputStream()));
sentence = inFromUser.readLine();
outToServer.writeBytes(sentence + '\n');
modifiedSentence = inFromServer.readLine();
System.out.println("FROM SERVER: " + modifiedSentence);
clientSocket.close();
}
}
Create
input stream
attached to socket
Send line
to server
Read line
from server
![Page 72: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/72.jpg)
2: Application Layer 72
Example: Java server (TCP)import java.io.*;
import java.net.*;
class TCPServer {
public static void main(String argv[]) throws Exception
{
String clientSentence;
String capitalizedSentence;
ServerSocket welcomeSocket = new ServerSocket(6789);
while(true) {
Socket connectionSocket = welcomeSocket.accept();
BufferedReader inFromClient =
new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
Create
welcoming socket
at port 6789
Wait, on welcoming
socket for contact
by client
Create input
stream, attached
to socket
![Page 73: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/73.jpg)
2: Application Layer 73
Example: Java server (TCP), cont
DataOutputStream outToClient =
new DataOutputStream(connectionSocket.getOutputStream());
clientSentence = inFromClient.readLine();
capitalizedSentence = clientSentence.toUpperCase() + '\n';
outToClient.writeBytes(capitalizedSentence);
}
}
}
Read in line
from socket
Create output
stream, attached
to socket
Write out line
to socket
End of while loop,
loop back and wait for
another client connection
![Page 74: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/74.jpg)
2: Application Layer 74
Socket programming with UDP
UDP: no ―connection‖ between client and server
no handshaking
sender explicitly attaches IP address and port of destination to each packet
server must extract IP address, port of sender from received packet
UDP: transmitted data may be received out of order, or lost
application viewpoint
UDP provides unreliable transfer
of groups of bytes (“datagrams”)
between client and server
![Page 75: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/75.jpg)
2: Application Layer 75
Client/server socket interaction: UDP
Server (running on hostid)
close
clientSocket
read datagram from
clientSocket
create socket,
clientSocket =
DatagramSocket()
Client
Create datagram with server IP and
port=x; send datagram via
clientSocket
create socket,
port= x.
serverSocket =
DatagramSocket()
read datagram from
serverSocket
write reply to
serverSocket
specifying
client address,
port number
![Page 76: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/76.jpg)
2: Application Layer 76
Example: Java client (UDP)
se
nd
Pa
cke
t
to network from network
rece
ive
Pa
cke
t
inF
rom
Use
r
keyboard monitor
Process
clientSocket
UDP
packet
input
stream
UDP
packet
UDP
socket
Output: sends packet
(recall
that TCP sent “byte
stream”)
Input: receives packet
(recall thatTCP
received “byte
stream”)
Client
process
client UDP
socket
![Page 77: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/77.jpg)
2: Application Layer 77
Example: Java client (UDP)
import java.io.*;
import java.net.*;
class UDPClient {
public static void main(String args[]) throws Exception
{
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
DatagramSocket clientSocket = new DatagramSocket();
InetAddress IPAddress = InetAddress.getByName("hostname");
byte[] sendData = new byte[1024];
byte[] receiveData = new byte[1024];
String sentence = inFromUser.readLine();
sendData = sentence.getBytes();
Create
input stream
Create
client socket
Translate
hostname to IP
address using DNS
![Page 78: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/78.jpg)
2: Application Layer 78
Example: Java client (UDP), cont.
DatagramPacket sendPacket =
new DatagramPacket(sendData, sendData.length, IPAddress, 9876);
clientSocket.send(sendPacket);
DatagramPacket receivePacket =
new DatagramPacket(receiveData, receiveData.length);
clientSocket.receive(receivePacket);
String modifiedSentence =
new String(receivePacket.getData());
System.out.println("FROM SERVER:" + modifiedSentence);
clientSocket.close();
}
}
Create datagram with
data-to-send,
length, IP addr, port
Send datagram
to server
Read datagram
from server
![Page 79: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/79.jpg)
2: Application Layer 79
Example: Java server (UDP)
import java.io.*;
import java.net.*;
class UDPServer {
public static void main(String args[]) throws Exception
{
DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
while(true)
{
DatagramPacket receivePacket =
new DatagramPacket(receiveData, receiveData.length);
serverSocket.receive(receivePacket);
Create
datagram socket
at port 9876
Create space for
received datagram
Receive
datagram
![Page 80: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/80.jpg)
2: Application Layer 80
Example: Java server (UDP), cont
String sentence = new String(receivePacket.getData());
InetAddress IPAddress = receivePacket.getAddress();
int port = receivePacket.getPort();
String capitalizedSentence = sentence.toUpperCase();
sendData = capitalizedSentence.getBytes();
DatagramPacket sendPacket =
new DatagramPacket(sendData, sendData.length, IPAddress,
port);
serverSocket.send(sendPacket);
}
}
}
Get IP addr
port #, of
sender
Write out
datagram
to socket
End of while loop,
loop back and wait for
another datagram
Create datagram
to send to client
![Page 81: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/81.jpg)
Introduction 1-81
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP (Stream control transmission protocol)
RTP
TCP in wireless network
Quality of services
![Page 82: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/82.jpg)
23.82
SCTPStream Control Transmission Protocol (SCTP) is a new
reliable, message-oriented transport layer protocol.
SCTP, however, is mostly designed for Internet
applications that have recently been introduced. These
new applications need a more sophisticated service than
TCP can provide.
SCTP Services and Features
Packet Format
An SCTP Association
Flow Control and Error Control
Topics discussed in this section:
![Page 83: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/83.jpg)
23.83
SCTP is a message-oriented, reliable protocol
that combines the best features of
UDP and TCP.
Note
![Page 84: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/84.jpg)
TCP/IP Protocol Suite 84
Comparison
UDP: Message-oriented, Unreliable
TCP: Byte-oriented, Reliable
SCTPMessage-oriented, Reliable
Other innovative features
• Association, Data transfer/Delivery
• Fragmentation,
• Error/Congestion Control
![Page 85: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/85.jpg)
23.85
Some SCTP applications
![Page 86: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/86.jpg)
TCP/IP Protocol Suite86
Servicesof SCTP
Process-to-Process Communication
Multiple Streams
Multihoming
Full-Duplex Communication
Connection-Oriented Service
Reliable Service
![Page 87: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/87.jpg)
23.87
Multiple-stream concept
If one of the streams is blocked,
the other streams can still deliver
their data.
![Page 88: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/88.jpg)
23.88
An association in SCTP can involve multiple streams.
Note
![Page 89: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/89.jpg)
23.89
Multihoming concept
At present, SCTP does not allow load sharing between
different path.
Currently, it is only for fault-tolerance.
![Page 90: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/90.jpg)
TCP/IP Protocol Suite90
SCTP Features Transmission Sequence Number (TSN)
Stream Identifier (SI)
Stream Sequence Number (SSN)
Packets
Acknowledgment Number
Flow Control
Error Control
Congestion Control
![Page 91: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/91.jpg)
TCP/IP Protocol Suite91
In SCTP, a data chunk is numbered using a
TSN.
To distinguish between different streams,
SCTP uses an SI.
To distinguish between different data
chunks belonging to the same stream,
SCTP uses SSNs.
![Page 92: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/92.jpg)
Comparison between UDP,TCP and SCTP
UDP TCP SCTP
Message oriented protocol
Byte oriented protocol
Message oriented protocol
Preserve message boundaries
Does not Preserve message boundaries
Preserve message boundaries
Unreliable Reliable Reliable
No congestion and flow control
Have congestion and flow control
Have congestion and flow control
Each message follows different route so no sequencing
Each message follows same route so have in sequence datadelivery
have in sequence datadelivery
Port no 17 Port no 6 Port no 132
1-92
![Page 93: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/93.jpg)
TCP/IP Protocol Suite 93
SCTP vs. TCP (1)
Control informationTCP: part of the header
SCTP: several types of control chunks
DataTCP: one entity in a TCP segment
SCTP: several data chunks in a packet
OptionTCP: part of the header
SCTP: handled by defining new chunk types
![Page 94: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/94.jpg)
TCP/IP Protocol Suite 94
SCTP vs. TCP (2)
Mandatory part of the headerTCP: 20 bytes, SCTP: 12 bytes
Reason:• TSN in data chunk’s header
• Ack. # and window size are part of control chunk
• No need for header length field (∵no option)
• No need for an urgent pointer
ChecksumTCP: 16 bits, SCTP: 32 bit
![Page 95: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/95.jpg)
TCP/IP Protocol Suite 95
SCTP vs. TCP (3)
Association identifierTCP: none, SCTP: verification tag
Multihoming in SCTP
Sequence numberTCP: one # in the header
SCTP: TSN, SI and SSN define each data chunk
SYN and FIN need to consume one seq. #
Control chunks never use a TSN, SI, or SSN number
![Page 96: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/96.jpg)
TCP/IP Protocol Suite96
Comparison between a TCP segment and an SCTP packet
TCP has segments; SCTP has packets.
![Page 97: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/97.jpg)
TCP/IP Protocol Suite97
SCTP PACKET FORMAT
In this section, we show the format of a packet
and different types of chunks.
An SCTP packet has a mandatory general
header and a set of blocks called chunks.
There are two types of chunks:
1. control chunks and
2. data chunks.
![Page 98: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/98.jpg)
TCP/IP Protocol Suite98
SCTP packet format
![Page 99: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/99.jpg)
TCP/IP Protocol Suite99
In an SCTP packet, control chunks come
before data chunks.
Note
![Page 100: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/100.jpg)
23.100
General header (Common layout of a chunk)
![Page 101: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/101.jpg)
TCP/IP Protocol Suite101
In SCTP, control information and data
information are carried in separate chunks.
Data chunks are identified by three
identifiers: TSN, SI, and SSN.
TSN is a cumulative number identifying the
association; SI defines the stream;
SSN defines the chunk in a stream.
In SCTP, acknowledgment numbers are
used to acknowledge only data chunks;
control chunks are acknowledged by other
control chunks if necessary.
![Page 102: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/102.jpg)
TCP/IP Protocol Suite102
Packet, data chunks, and streams
![Page 103: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/103.jpg)
Introduction 1-103
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP (Real Time Transport Protocol)
TCP in wireless network
Quality of services
![Page 104: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/104.jpg)
RTP: A Transport Protocol forReal-Time Applications
![Page 105: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/105.jpg)
Introduction
Internet standard for real-time data Interactive audio, video, and simulation data
Primarily designed for multi-user multimedia conference Session management Scalability considerations
Provides end-to-end transport functions for real-time applications Payload type identification Sequence numbering Timestamping Delivery monitoring
![Page 106: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/106.jpg)
Introduction – cont.
Containing two closely linked parts: data + control RTP: Real-time transport protocol
• Carry real-time data
RTCP: RTP control protocol
• QoS monitoring and feedback
• Session control
Architecture
Applications
RTP & RTCP
Other transport and network protocols
UDP
IP
![Page 107: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/107.jpg)
RTP – packet format
V P X CSRC count
M Payload type
Sequence number
(16 bits)
Timestamp (32 bits)
Synchronization source (SSRC) id. (32 bits)
Contributing source (CSRC) id. (0~15 items, 32 bit each)
Header extension (optional)
Payload (real time data)
Padding (size x 8 bits)
Padding size (8bits)
Version (V, 2bits): =2
Padding(P, 1bit): If set, last byte of payload is padding size
Extension(X, 1bit): If set, variable size header extension exists
Fixed
header
optional
header
optional
![Page 108: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/108.jpg)
RTP - header CSRC count (4 bits): number of Contributors, max 16 can
be possible
Marker (1 bit): defined in profile, mark end of data
Payload type (7 bits): Audio/Video encoding scheme
Sequence number: random initial value, increase by one for each RTP packet; for loss detection and seq. restoration
SSRC: identify source; chosen randomly and locally; collision needs to be resolved
CSRC list: id. of contributing sources, inserted by mixer
![Page 109: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/109.jpg)
Introduction 1-109
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP
TCP in wireless network
Quality of Services (QoS)
![Page 110: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/110.jpg)
TCP over Wireless : outline
TCP over Wireless: Problems TCP over Wireless: Solutions/Schemes
Split TCP1.Indirect TCP2.Selective repeat protocol3.Mobile TCP
TCP-aware link layer1.Snoop2.WTCP
Link layer protocol End-to-end protocol
1.Selective Acknowledgement2.Explicit Loss Notification
![Page 111: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/111.jpg)
TCP over Wireless: Problems
TCP has been optimized for wired networks.
Any packet loss is considered to be the result of network congestion and the congestion window size is reduced drastically as a precaution.
Sources of errors in wireless links:1. Due to hands off between cells
2. Packet losses due to futile transmissions
3. Packet losses due to transmission errors in wireless links
![Page 112: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/112.jpg)
TCP over Wireless : outline
TCP over Wireless: Problems
TCP over Wireless: Solutions (Schemes) Split TCP
1.Indirect TCP
2.Selective repeat protocol
3.Mobile TCP
TCP-aware link layer1.Snoop
2.WTCP
Link layer protocol
End-to-end protocol1.Selective Acknowledgement
2.Explicit Loss Notification
![Page 113: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/113.jpg)
Split TCP: Indirect TCP I-TCP splits end-to-end TCP connection into two
connections Fixed host to BS BS to mobile host
Two TCP connections with independent flow/congestion control contexts
Packets buffered at BS
Internet
FH BS MH
TCP TCPBuffer
![Page 114: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/114.jpg)
Split TCP: Indirect TCP
Pros Separates flow and congestion control of wireless and
wired--higher throughput at sender
Cons Breaks TCP end-to-end semantics
• Ack at FH does not mean MH has received the packet
BS failure causes loss of data• Neither FH nor MH can recover the data
On path change, data has to be forwarded to new BS
Wireless part is the bottleneck
![Page 115: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/115.jpg)
Split TCP: Selective Repeat Protocol Similar to I-TCP but uses SRP/UDP (Selective Repeat
Protocol over UDP) over wireless link, Improving End-to-End Performance of TCP over Mobile Internetworks
Pros Better performance over wireless links
Cons All cons of I-TCP except last one
Internet
FH BS MH
TCP SRP/UDPBuffer
![Page 116: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/116.jpg)
Split-TCP: Mobile TCP
Similar to I-TCP but tries to keep TCP end-to-end semantics
No buffering , no retransmission at base station BS.
BS only monitors all packets and only acks the last packet after it is received by MH
Pros Data will be recovered eventually after BS failure BS buffer does not overflow
Cons Worse performance Still not exactly the TCP semantics
![Page 117: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/117.jpg)
TCP over Wireless : outline
TCP over Wireless: Problems
TCP over Wireless: Solutions (Schemes) Split TCP
1.Indirect TCP
2.Selective repeat protocol
3.Mobile TCP
TCP-aware link layer1.Snoop
2.WTCP
Link layer protocol
End-to-end protocol1.Selective Acknowledgement
2.Explicit Loss Notification
![Page 118: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/118.jpg)
TCP-aware Link Layers: Snoop Link layer is aware of TCP traffic
BS caches data and monitors acks. Retransmits on duplicate acks and drops duplicate acks
Internet
FH BS MH
Packet 1
Ack 1Packet 2
Ack 2
Packet 3
Packet 4Ack 2
Packet 1
Ack 1
Packet 2
Ack 2Packet 3
Packet 4
Packet 3
Blocks Dup-Ack
![Page 119: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/119.jpg)
TCP-aware Link Layers: Snoop
Pros No modification to FH and MH
BS only keeps soft state—BS failure does not break TCP
Cons Does not work with encrypted packets
Does not work if data packets and acks traverse different paths
Increases RTT—high timeout
![Page 120: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/120.jpg)
Introduction 1-121
Chapter 2: ROAD MAP
Transport Layer Introduction
Port Address
UDP
TCP
Socket Programming using TCP and UDP
SCTP
RTP (Real Time Transport Protocol)
TCP in wireless network
Quality of services (QoS)
![Page 121: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/121.jpg)
Quality of Service
• Requirements
• Techniques for Achieving Good Quality of Service
• Integrated Services
• Differentiated Services
![Page 122: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/122.jpg)
Requirements
Introduction 1-123
1. Reliability
2. Jitter
3. Delay
4. Bandwidth
![Page 123: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/123.jpg)
Requirements
Reliability- Reliability is concerned with the ability of a networkto carry out a desired operation according to its specifications
Jitter- Jitter is defined as a variation in the delay of received packets.
Delay- is the amount of time required to transmit packets.
Bandwidth- amount of information that can be transmitted over a network in a given amount of time
Introduction 1-124
![Page 124: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/124.jpg)
Requirements
How stringent the quality-of-service requirements are.
5-30
![Page 125: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/125.jpg)
Techniques to achieve Good QoS
Buffering
Traffic Shaping
Leaky bucket algorithm
Token bucket algorithm
Resource reservation
Admission control
Packet scheduling
Introduction 1-126
![Page 126: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/126.jpg)
Buffering
Smoothing the output stream by buffering packets.
![Page 127: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/127.jpg)
The Leaky Bucket Algorithm
(a) A leaky bucket with water. (b) a leaky bucket with packets.
![Page 128: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/128.jpg)
The Leaky Bucket Algorithm
(a) Input to a leaky bucket.
(b) Output from a leaky
bucket. Output from a token
bucket with capacities of (c)
250 KB, (d) 500 KB, (e)
750 KB, (f) Output from a
500KB token bucket feeding
a 10-MB/sec leaky bucket.
![Page 129: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/129.jpg)
The Token Bucket Algorithm
(a) Before. (b) After.
5-34
![Page 130: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/130.jpg)
Admission Control
An example of flow specification.
5-34
![Page 131: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/131.jpg)
Packet Scheduling
(a) A router with five packets queued for line O.
(b) Finishing times for the five packets.
![Page 132: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/132.jpg)
Integrated Services
Flow based QoS model
Which means used need to create a flow, a
kind of virtual circuit from source to
destination and inform all routers about
the resource requirement
This kind of reservation of resources is
done by a protocol called RSVP(Resource
Reservation Protocol)
Introduction 1-133
![Page 133: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/133.jpg)
Integrated Services
Resource reservation means reserve how much buffer, bandwidth etc is needed.
When a router receives flow specification from an application, it decides to admit or deny the service
Two classes of service is defined for Integrated serviced
1. Guaranteed Service Class(For real time application)
2. Controlled-load Service(For application require reliablility)
Introduction 1-134
![Page 134: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/134.jpg)
RSVP-The Resource ReSerVation Protocol
The Resource Reservation Protocol (RSVP) is a Transport layer protocol designed to reserve resources across a network for an Integrated service network.
RSVP operates over an IPV4 or IPV6 and provides resource reservations for multicast or unicastdata flows
RSVP can be used by either host or routerstorequest or deliver specific levels of quality of service (QoS) for application data streams or flows.
RSVP defines how applications place reservations and how they can give up the reserved resources once the need for them has ended.
Introduction 1-135
![Page 135: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/135.jpg)
RSVP-The Resource ReSerVationProtocol
(a) A network, (b) The multicast spanning tree for host 1.
(c) The multicast spanning tree for host 2.
![Page 136: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/136.jpg)
RSVP-The ReSerVation Protocol (2)
(a) Host 3 requests a channel to host 1. (b) Host 3 then requests a
second channel, to host 2. (c) Host 5 requests a channel to host 1.
![Page 137: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/137.jpg)
Problems with Integrated Services
Scalability: Each router keep information for each flow. So does not possible to scale more
Service Type Limitation: Only two types of services are provided guaranteed and control based
Introduction 1-138
![Page 138: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/138.jpg)
Differentiated Services
Handles shortcomings of Integrated Services .
In differentiated model router does not store information about flows.
No advance reservation is required
It is a Class based service model
Each packet contains a field called DS field
It has two types of models
1. Expedited forwarding
2. Assured ForwardingIntroduction 1-139
![Page 139: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/139.jpg)
Expedited Forwarding
In this model two classes of service is available: 1>Regular 2> Expedited
Expedited packets experience a traffic-free network.
![Page 140: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/140.jpg)
Assured Forwarding
There are 4 priority classes , each having 3 discard policies like low,medium and high.
Traffic controller have Classifier,Marker and Shaper/Dropper
Packet is classified according to priority, then marked according to their class .
Shaper/dropper filter these packet that may drop or delay the packet.
![Page 141: Computer Networks Unit II Transport layer (2012 pattern) · Computer Networks Unit II Transport layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg](https://reader035.vdocuments.site/reader035/viewer/2022062507/5fc92afb90861c21110fe1c4/html5/thumbnails/141.jpg)
Thank You .
Introduction 1-142