Course: CISC 856 TCP/IP & UPPER LAYERS

Semester: Fall 2004

Document: RTP/RTCP/RTSP homework

By: Liang Zhao (email: )

Due Date: Nov 23,2004

Part I: Answer textbook Chapter 28 questions 1-22.

Part II: Read the following RTSP examples. Select either one to give an annotation of all transactions in details as much as you can.The annotation of all variablesof RTSP (except HTTP)is required. You do not have to annotate the same variable appearing in different places if you have already annotated it. You can submit a similar annotation as what wasdone in the RTSP presentation. If you are still confused, please do not hesitate to contact with me.

RTSP example 1: Media on demand (Unicast)

Client C requests a movie from media servers A (audio.example.com)

and V (video.example.com). The media description is stored on a web

server W. The media description contains descriptions of the

presentation and all its streams, including the codecs that are

available, dynamic RTP payload types, the protocol stack, and content

information such as language or copyright restrictions. It may also

give an indication about the timeline of the movie.

In this example, the client is only interested in the last part of

the movie.

C->W: GET /twister.sdp HTTP/1.1

Host:

Accept: application/sdp

W->C: HTTP/1.0 200 OK

Content-Type: application/sdp

v=0

o=- 2890844526 2890842807 IN IP4 192.16.24.202

s=RTSP Session

m=audio 0 RTP/AVP 0

a=control:rtsp://audio.example.com/twister/audio.en

m=video 0 RTP/AVP 31

a=control:rtsp://video.example.com/twister/video

C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0

CSeq: 1

Transport: RTP/AVP/UDP;unicast;client_port=3056-3057

A->C: RTSP/1.0 200 OK

CSeq: 1

Session: 12345678

Transport: RTP/AVP/UDP;unicast;client_port=3056-3057;

server_port=5000-5001

C->V: SETUP rtsp://video.example.com/twister/video RTSP/1.0

CSeq: 1

Transport: RTP/AVP/UDP;unicast;client_port=3058-3059

V->C: RTSP/1.0 200 OK

CSeq: 1

Session: 23456789

Transport: RTP/AVP/UDP;unicast;client_port=3058-3059;

server_port=5002-5003

C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0

CSeq: 2

Session: 23456789

Range: smpte=0:10:00-

V->C: RTSP/1.0 200 OK

CSeq: 2

Session: 23456789

Range: smpte=0:10:00-0:20:00

RTP-Info: url=rtsp://video.example.com/twister/video;

seq=12312232;rtptime=78712811

C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0

CSeq: 2

Session: 12345678

Range: smpte=0:10:00-

A->C: RTSP/1.0 200 OK

CSeq: 2

Session: 12345678

Range: smpte=0:10:00-0:20:00

RTP-Info: url=rtsp://audio.example.com/twister/audio.en;

seq=876655;rtptime=1032181

C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0

CSeq: 3

Session: 12345678

A->C: RTSP/1.0 200 OK

CSeq: 3

C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0

CSeq: 3

Session: 23456789

V->C: RTSP/1.0 200 OK

CSeq: 3

RTSP example 2: Live Media Presentation (Multicast)

The media server M chooses the multicast address and port. Here, we

assume that the web server only contains a pointer to the full

description, while the media server M maintains the full description.

C->W: GET /concert.sdp HTTP/1.1

Host:

W->C: HTTP/1.1 200 OK

Content-Type: application/x-rtsl

<session>

<track src="rtsp://live.example.com/concert/audio">

</session>

C->M: DESCRIBE rtsp://live.example.com/concert/audio RTSP/1.0

CSeq: 1

M->C: RTSP/1.0 200 OK

CSeq: 1

Content-Type: application/sdp

Content-Length: 44

v=0

o=- 2890844526 2890842807 IN IP4 192.16.24.202

s=RTSP Session

m=audio 3456 RTP/AVP 0

a=control:rtsp://live.example.com/concert/audio

c=IN IP4 224.2.0.1/16

C->M: SETUP rtsp://live.example.com/concert/audio RTSP/1.0

CSeq: 2

Transport: RTP/AVP;multicast

M->C: RTSP/1.0 200 OK

CSeq: 2

Transport: RTP/AVP;multicast;destination=224.2.0.1;

port=3456-3457;ttl=16

Session: 0456804596

C->M: PLAY rtsp://live.example.com/concert/audio RTSP/1.0

CSeq: 3

Session: 0456804596

M->C: RTSP/1.0 200 OK

CSeq: 3

Session: 0456804596

Extra Credit:

There is a RTP Toolkit available freely. You can download it from

and follow the instruction to install it. Use “rtpsend” command to generate RTP packets and send to any machine where you can run “tcpdump”.Use “tcpdump” command to capture RTP packets and annotate the UDP header and RTP header in your tcpdump output. All the variables fabricated in the RTP packets are also required to be annotated.

You can follow the steps as below:

1. create a RTP packet file, such as rtp_packet.

lukifell[72] [~/TCP_IP/rtptools-1.18/]> cat rtp_packet

844525628.240592 RTP

len=176

from=131.136.234.103:46196

v=2

p=0

x=0

cc=0

m=0

pt=5 (IDVI,1,8000)

seq=28178

ts=954052737

ssrc=0x124e2b58

844525628.243123 RTCP

len=128

from=139.88.27.43:53154

(RR ssrc=0x125bd36f p=0 count=1 len=7

(ssrc=bc64b658 fraction=0.503906 lost=4291428375 last_seq=308007791

jit=17987961 lsr=2003335488 dlsr=825440558)

)

(SDES p=0 count=1 len=23

(src=0x125bd36f CNAME="" NAME="Michael Baldizzi

(NASA LeRC)" TOOL="vat-4.0a8" EMAIL="")

)

lukifell[73] [~/TCP_IP/rtptools-1.18/]>

2. run “tcpdump” on a machine (say, gigas.acad.ece.udel.edu).

gigas[32] [~/]> tcpdump port 12340

3. go to the directory you installed the RTP toolkit, and run “rtpsend”.

lukifell[74] [~/TCP_IP/rtptools-1.18/]> ./rtpsend -f rtp_packet gigas/12340

Please note:

The “tcpdump” command existing on ACAD machines is a modified version, no data fields are output. If you could install a full version of tcpdump, please do it to get full extra credit. Otherwise, only partial extra credit could be offered. Sorry for the inconvenience of installation of RTP toolkit and full-version tcpdump.