You are on page 1of 27

Computer Networks

Transport Layer
Internet Transport
Protocols
two main protocols in the transport layer :

• connection-less protocol :
User Datagram Protocol (UDP)

• connection-oriented protocol :
Transmission Control Protocol
(TCP)
23.03.2020 16:58 225
Computer Networks
Transport Layer
Internet Transport Protocols : UDP
• connection-less (no setup /

release), unreliable, but …….


• is simple with minimum overheads
• described in RFC 768
• is basically IP with an added short header
• provides a method for applications

to send encapsulated datagrams


• transmits segments consisting of

an 8-byte header followed by


23.03.2020 16:58 226
payload
Computer Networks
Transport Layer
Internet Transport Protocols :
UDP

of the user
datagram optional

23.03.2020 16:58 227


Computer Networks
Transport Layer
Internet Transport Protocols :
UDP
Port Protocol Description
Well-known Ports used by UDP
Echoes a received datagram back to the sender
7 Echo

9 Discard Discards any datagram that is received


11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
53 Nameserver Domain Name Service
67 Bootps Server port to download bootstrap information
68 Bootpc Client port to download bootstrap information
69 TFTP Trivial File Transfer Protocol
111 RPC Remote Procedure Call
123 NTP Network Time Protocol
161 SNMP Simple Network Management Protocol
162 SNMP Simple Network Management Protocol (trap)
23.03.2020 16:58 228
Computer Networks
Transport Layer
Internet Transport Protocols :
UDP UDP header

not computed, if computed=0,


set to 0 set to all 1s
of header + data

the two ports (SP & DP) identify end


points when a UDP packet arrives, its
payload is handed over to the process
attached to the destination port
23.03.2020 16:58 229
Computer Networks
Transport Layer
Internet Transport Protocols : UDP
UDP (over IP) is used to add source
port and destination port to enable the
transport layer deliver segments to the
correct process
UDP does not participate in flow
control, error control or retransmission

the user
23.03.2020 16:58
process must handle these 230
Computer Networks
Transport Layer
Internet Transport Protocols : UDP
Uses of UDP :
convenient transport layer protocol for
applications that provide flow and error control
simple request-response communication

RPC, RTP, RTCP, DNS, TFTP ( but not FTP )

route updating protocols like RIP


23.03.2020 16:58 231
Computer Networks
Transport Layer
Internet Transport Protocols :
RPC Remote Procedure Call
(RPC)
“request-reply” like interactions
between two (remote) hosts on a
network can be handled similar to
procedure calls… easier to program and
more familiar calling procedure is
known as client called procedure is
known as server RPC makes a remote
23.03.2020 16:58 232
procedure call look almost like a local
Computer Networks
Transport Layer
Internet Transport Protocols :
RPC RPC
to call a remote procedure, client program
is bound with a library procedure called
client stub
similarly, the server is bound with
a procedure called server stub
packing the parameters into a message is
called marshalling
23.03.2020 16:58 233
Computer Networks
Transport Layer
Internet Transport Protocols :
RPC RPC

The stubs hide the fact that the procedure


call from the client to server is not local
23.03.2020 16:58 Steps in making an RPC 234
Computer Networks
Transport Layer
Internet Transport Protocols :
RPC RPC : steps in a making a call
1. Client calls the client stub - a local
procedure call; parameters are pushed
on to the stack
2. Client stub marshals the
parameters and makes a system
call to send message
3. Kernel sends the message from
client machine to server machine
23.03.2020 16:58 235
Computer Networks
Transport Layer
Internet Transport Protocols : RPC
RPC : steps in a making a call
4. Kernel on server machine passes
the incoming packet to the server
stub
5. Server stub calls the server procedure
with the unmarshalled parameters
reply traces the same path in the
reverse
23.03.2020 16:58 direction 236
Computer Networks
Transport Layer
Internet Transport Protocols :
RPC RPC : issues

1. Passing of pointers not possible


since client and server are in
different address spaces
2. Workaround can only handle
simple data structures
3. Use of global variables not possible
23.03.2020 16:58 237
Computer Networks
Transport Layer
Internet Transport Protocols : RTP
RTP : Real-time Transport Protocol (RFC
1889)

designed to handle real-time


multimedia traffic on the Internet like :
Internet radio, Internet telephony, music-
on-demand, videoconferencing,
video-on- demand
sequencing, mixing RTP does not have a delivery
main contributions
23.03.2020 16:58
: timestamping,
mechanism
RTP must be used with UDP 238
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP : position in the protocol
stack

23.03.2020 16:58 240


Computer Networks
Transport Layer
Internet Transport Protocols : RTP
RTP : position in the protocol stack
multimedia application streams are fed into
the RTP library, which is in user space

Position of RTP
in protocol stack
23.03.2020 16:58 Packet nesting 241
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
library multiplexes the streams, encodes
them into RTP packets and stuffs them
into sockets
at the other end of socket in the OS
kernel, UDP packets are generated
and embedded in IP packets
IP packets are put in Ethernet frames
for transmission
23.03.2020 16:58 242
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
basic function : time-stamping, sequencing
and multiplexing several real-time data
streams onto a single stream of UDP
packets
UDP stream can be sent by unicasting
/ multicasting
a transport protocol implemented in
the application
23.03.2020 16:58 layer ! 243
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
sequence number : each packet sent in an
RTP stream is given a number 1 higher
than its predecessor (first number chosen
randomly) to identify missing packets …..
which are interpolated at the
destination… because retransmission is
not practical payload may contain
multiple samples, encoded; header field is
23.03.2020 16:58
available to specify encoding type 244
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
time stamping :
first sample (random number) in each packet
relative time stamping
destination does buffering,
replaying reduces jitter
enables synchronization of multiple
streams (e.g. 1 video + 2 audio streams)
23.03.2020 16:58 245
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP : header 3 x 32-bits

23.03.2020 16:58 246


Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
Ver : version field, 2
P bit : when set, indicates that packet
has been padded to a multiple of 4 bytes
X bit : when set, indicates that
an extension header is present
CC: (contributor count) field indicates
number of contributing sources (0 -
15) M bit : application-specific marker
23.03.2020 16:58
start of video frame , start of a word in an audio channel 247
bit
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
Payload type field : indicates algorithm
used - e.g. MP3, 8-bit PCM samples, etc
Sequence number : up counter of packets,
used to detect lost packets
Time stamp : …..
Synchronization source identifier :
indicates which stream the packet belongs to
used for muxing and demuxing
23.03.2020 16:58 248
Computer Networks
Transport Layer
Internet Transport Protocols :
RTP RTP
Payload types :

23.03.2020 16:58 249


Computer Networks
Transport Layer
Internet Transport Protocols : RTP

RTP

Contributing source identifiers :


optional : used when mixers are
present in the audio
contains lists of streams being mixed

23.03.2020 16:58 250


Computer Networks
Transport Layer
Internet Transport Protocols : RTCP
Real-time Transport Control Protocol
handles feedback, synchronization,
user interface
used to provide feedback on jitter, delay,
bandwidth, congestion and other
network properties to sources
feedback info is used by encoding process
to provide adaptive data rate, quality
23.03.2020 16:58 251
Computer Networks
Transport Layer
Internet Transport Protocols :
RTCP RTCP
payload type field : indicates to the
receiver the algorithm used --- helps
in varying the algorithm on demand
handles inter-stream sync : streams
using different clocks / granularities /
drift rates provides a way for naming
sources :
in ASCII text
23.03.2020 16:58 252

You might also like