Download RTP

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Multiprotocol Label Switching wikipedia , lookup

TCP congestion control wikipedia , lookup

Net bias wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Zero-configuration networking wikipedia , lookup

RapidIO wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Lag wikipedia , lookup

Internet protocol suite wikipedia , lookup

Serial digital interface wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

IEEE 1355 wikipedia , lookup

Deep packet inspection wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Transcript
RTP- Real Time Transport
Protocol
CSCE 5580 Computer Networks– Spring 2006
Presented by:
Vandana Anand
Archana Paka
Outline












Overview
Purpose
Services
What it does not provide
Architecture
RTP data transport protocol
State machine
Event flows
Message formats
Issues
Conclusions
References
Vandana
Archana
RTP - Overview

RTP provides end-to-end network delivery
services for the transmission of real-time
media.





Audio Video Conferencing
IP telephony
Games and real time monitoring
RTP is defined in RFC 3550 (RFC 1889)
Follows a principles outlined in a paper by
Clark and Tennenhouse.


Application Level Framing
Integrated Layer Processing
RTP - Overview



It can be used over various network technologies,
IP/UDP, ATM/AAL5 and IPX.
Often used over UDP.
Two protocols make up RTP


RTP, a data transfer protocol (carries the data)
RTCP, control protocol (carries session. QoS Info)
RTP - Overview

RTP can be used over both network
services

Unicast


Separate copies of the data are sent from the
source to each destination.
Mulitcast

The data is sent from the source only once
and the network is responsible for
transmitting the data to multiple locations.
RTP - Purpose





The purpose of RTP is to facilitate,Delivery,
Monitoring, Reconstruction, Mixing and
Synchronization of data streams
It provides support for real time conferencing of
groups of any size within an Internet.
It offers quality of service feedback from receivers
to the multicast group.
It determines the order of data to be presented.
It synchronizes media stream from different
sources.
RTP - Services

Payload type identification


Time Stamping


Identifies the type of data being sent.
Time stamping is used for the proper play out of
the media and to reduce jitter.
Sequencing – using sequence number


RTP can sequence those packets which arrive
out of order at the receiving end.
The sequence number can also be used to
identify the lost packets.
What it does not provide…
RTP does not

Provide mechanism in time delivery.




This requires the support of lower layers that have
control over resources.
Provide Quality-of-Service
Guarantee delivery or prevent out-of-order
delivery
It doesn’t not assume that the underlying
network is reliable and delivers packets in
sequence.
RTP – Architecture

Application Level Framing

Recovery from lost data to be performed by the
application.



retransmission may not be appropriate. Lost data can
be due to quality of delivery
may be more useful for destination(s) to inform source
about the quality of transmission
Application provide data for retransmission
rather than the transport protocol.


Sending application may re-compute lost data before
sending
The sending application can provide revised values
rather than simply transmitting lost values.
RTP - Architecture

Integrated Layer Processing



In a typical layered protocol architecture data
units are sequentially processed by each layer
Integrated layer processing allows adjacent
layers of the protocol stack to be tightly coupled
RTP is not complete by itself it requires
application-layer and transport layer capabilities.


RTP runs on top of UDP. UDP provides the port
addressing functionality of the transport layer.
RTP also contains the transport layer function like
sequencing.
RTP – Data Transfer Protocol


RTP data transfer protocol supports
the transfer of real-time data among a
number of participants in a session .
Session is identified by



Participant IP address.
RTP port #, for media data.
RTCP port #, for control data.
RTP – Data Transfer Protocol

Each RTP data unit must include




Source identifiers
Timestamp
Payload format
It allows the use of two kind of relays
Mixers
 Translators
These are active application level devices residing
on the network

Mixers


A mixer is an RTP relay that receives streams of
RTP packets from one or more source, combines
these streams and forwards a new RTP packet
stream to one or more destinations.
Mixer can change the data format or simple perform
the mixing function.
Translators



Translator is a simple device that produces one or
more outgoing RTP packet for each incoming RTP
packet.
It converts inputs and resends in a new format
It replicates incoming packet and send it to a
number of unicast destinations.
RTP- Applications

Receiving Media Streams

Conferencing Applications :Need to be able to
receive a media stream from an RTP session and render it on
the console.

A telephone answering machine :Need to be
able to receive a media stream and store it in a file.

Application that records a conversation or
conference : Must be able to receive media stream from
an RTP session and both render it and store it in a file.

Transmitting Media Streams

RTP Server Applications: Need to transmit
captured or stored media across the network.
Outline … continued











Overview
Purpose
Services
What it does not provide
Architecture
RTP data transport protocol
State machine
Event Flows
Message Format
Issues
Conclusion
overview

RTP does not have a standard TCP or UDP port
that it communicates on.

The only standard that it obeys is that UDP communications
are done on an even port and the next higher odd port is used
for RTP Control Protocol (RTCP) communications.
Although there are no standards assigned, RTP is generally
configured to use ports 16384-32767.
RTP only carries voice/video data. Call setup and tear-down is
usually performed by the SIP protocol.
The fact that RTP uses a dynamic port range makes it difficult
for it to traverse firewalls.
In order to get around this problem, it is often necessary to set
up a STUN server.




A Typical Communication
A normal RTP procedure between the client and the server is as follows:
client->server: OPTIONS
Server->client: OK
client->server: DESCRIBE
Server->client: OK
client->server: SETUP
Server->client: OK
client->server: PLAY
Server->client: OK
client->server: PAUSE
Server->client: OK
client->server: PLAY
Server->client: OK
client->server: TEARDOWN
Server->client: OK
The Options and Describe command can be issued at any time. But SETUP must be issued before any
PLAY, PAUSE and TEARDOWN command. After the TEARDOWN command, the client disconnects to the
server.
Client Side State Machine




Init: It represents the server
state before receiving the
SETUP command from
client .
Ready: This command
triggers the state into ready
state.
Play: Here the server calls
the RTP part of the program
to encapsulate the data in
the required file and send
them via RTP to the client.
Pause: The client can send
PAUSE to the server after it
begins playing the file.
Server Side State Machine
RTP – Packet Format
RTP - Header
IP
Header
IP
Header


UDP
Header
UDP
Header
RTP
Header
RTP Video Payload
RTP
Header
RTP Audio Payload
Video and audio payloads are sent separately
Uses sequence number to synchronise audio and
video once received
RTP – Packet Details






Version(2bits):Represents the Version of the RTP
Padding(1 bit): Used to round off the bits. It means
the packet contains one or more additional padding
octets at the end which are not part of payload
Extension(1 bit): If this bit is set, then the fixed header
must be followed by the header extension
CSRC count(4 bits): The number of CSRC
(contributing sources) identifiers that follow the fixed
header.
Marker(1 bit): Allow significant events to be marked in
the packet stream.
Timestamp(32 bits): Reflects the sampling instant of
the first octet in the RTP data packet
RTP – Packet Details




Payload type(7 bits): Identifies the format of the RTP
payload and determine its interpretations by
applications
Sequence Number(16 bits): Random number which is
incremented by 1 for each RTP packet send. The
packet receiver uses it to detect packet loss and to
restore packet sequence.
SSRC,Sync source(32 bits): A random ID to identify
the sync sources. No two sync sources within an RTP
session have the same SSRC identifier.
CSRC(32 bits): The list of CSRC’s for the data
contained in this packet.
Example showing where the message
formats used…..
A videoconference in progress
using a dedicated device RTP
Mixer and Translators in RTP
Translator do not change SSRC or CSRC fields unlike mixers, go through the
RTP header structure.
Performance Issues IN RTP


RTP Scalability
RTP Multiplexing
RTP Scalabilty





Congestion. This is due to the small access bandwidths of the user as compared
to the network bandwidth and particularly occurs when a large number of users join
a multicast RTP session at roughly the same time.
State Storage. In order to estimate the group size, hosts must listen to the
multicast group and count the number of distinct end systems which sends
packets,its unique identifier (SSRC) must be stored.
Delay. As the group sizes grow, the time may become very large. This interval
may easily exceed the duration of group membership. This means that timely
reporting of QoS problems from a specific user will not occur, and the value of the
actual reports is lost.
BYE Floods. Just as users may simultaneously join a group, we can expect users
may simultaneously leave a group.
Premature Timeouts. The timeout value is set to five times the current
transmission period. As group membership decreases (due to BYE's), the timeout
value decreases with it. However, there is a delay between decreases in group
membership and transmission of packets with the decreased interval. This delay
makes it possible for a user to prematurely timeout because of a sudden drop in
group membership.
RTP Multiplexing



The principle mechanism by which new functionality is added to RTP is by the definition of
payload formats. Payload formats specify an application specific sub-layer just above RTP.
these formats provide additional functions needed for just that application. However, all of
these formats describe how RTP is to be used for carrying a single media session between
two endpoints.
There are scenarios, however, where it is more desirable to multiplex many voice
connections into the same transport level connection, and into the same packet. Consider
the scenario where two standard telephone users wish to communicate, but the long
distance portion of the call is to be carried over the Internet. This will require the use of
VoIP Gateways which act as an application level bridge. Since gateways typically
terminate large numbers of telephone calls, there is likely to be multiple voice calls
between any pair of gateways. Currently, gateways place each voice call in a separate
transport connection, and thus the data from each user goes in separate packets. Due to
compression techniques, the payload sizes are typically quite small, and IP-related
overhead is substantial, resulting in a large packet overhead.
One proposed solution is to multiplex many voice calls into the same connection
(assuming they are destined to the same remote gateway), and into the same packet. This
drastically reduces overhead. Protocol structures for carrying multiple voice payloads in an
RTP packet are being developed and the minimization of the overhead per user is being
sought.
Security Issues in RTP

1.
2.
3.
Desired Security Features
Confidentiality
Integrity
Performance considerations of security
features
Security Issues in RTP

1.
2.
3.
Security Features Provided by RTP
Confidentiality
Authenticity and Integrity
Key Management
Showing the Security Keys
Some Security Features
CONCLUSIONS

RTP provides powerful instruments for adaptive
Video Transmission.

RTP can be considered user-space transport
entities, but does not run as stand-alone process.

Mixers and translators are stand-alone processes.
They terminate TCP or UDP connections.


Can accomplish complex control features.
Complexity of the protocol/algorithm is not so bad, because
there is little hard guarantee (It relies on TCP or application
for hard guarantees).
References




http://www.ietf.org/rfc/rfc3550.txt
William Stallings, “Computer Networking
with Internet Protocols and Technology”,
Prentice Hall (2004).
Colin Perkins , “RTP – Audio and Video For
The Internet”, Addison Wesley (2003).
http://www.cs.columbia.edu/~hgs/rtp
Questions

What are the roles of the RTP timestamp
and sequence numbers?

The timestamp is used to place the incoming
audio and video packets in the correct timing
order (playout delay compensation). The
sequence number is mainly used to detect
losses. Sequence numbers increase by one for
each RTP packet transmitted, timestamps
increase by the time "covered" by a packet.
Questions

Is RTP a transport protocol or a kind of
application protocol?

RTP has important properties of a transport
protocol: it runs on end systems, it provides
demultiplexing. It differs from transport protocols
like TCP in that it (currently) does not offer any
form of reliability or a protocol-defined
flow/congestion control. However, it provides the
necessary hooks for adding reliability, where
appropriate, and flow/congestion control.
Questions

Why does RTP rely on the applications to
provide security measures?

Targeted communication is high-speed
(Audio/Visual and Multicast) making recognition
of an attack without specific application
knowledge difficult.