Announcements RTP RTCP I Final Exam study guide online II Signup for project demos III Teaching evaluations at end today Internet Protocols CSC ECE 573 Fall 2005 N C State University copyright 2005 Douglas S Reeves 2 Today s Lecture I RTP II RTCP RTP Real Time Protocol III Header Compression copyright 2005 Douglas S Reeves 3 RTP Info RTP RFC 3550 RTP adds a new header to each packet TCP unacceptable for voice and video why application Preferable use UDP for transport application application ICMP ARP application TCP UDP IP RTP but UDP is connectionless no in order delivery no detection of losses IGMP RTP adds Payload Type Sequence Timestamp RTP does not RARP guarantee reliable delivery of packets guarantee QoS Ethernet Driver copyright 2005 Douglas S Reeves 5 copyright 2005 Douglas S Reeves 6 1 RTP Functions Translators and Mixers 1 Payload Type identification of media stream Participants in a multimedia session may use different media formats or compression standards 2 Timestamp a translator also called a media gateway converts from one media format to another timing reconstruction for control of playback synchronization of different media types e g audio video Audio from multiple senders can be mixed into a single audio stream by a mixer media media type 3 type 1 3 Sequence packet sequencing loss detection and rate adaptation Audio Source 1 G 711 GSM Translator Audio Source 2 G 728 copyright 2005 Douglas S Reeves GSM GSM media type 2 S Reeves copyright 2005 Douglas 7 RTP Header Contents Mixer 8 RTP Ports and Profiles Appears in every data packet minimum of 12 bytes RFC 1990 specifies A V Profiles default Payload Types for common audio and video compression standards currently 24 types Byte 1 Version Padding Flag Extension Flag of Sources max of 15 Byte 2 Application Marker Flag Payload Type 7 bits Contains mapping of media encoding to payload format Bytes 3 4 Sequence Number default packet rate Bytes 5 8 Timestamp format is application specific Bytes 9 12 SSRC Synchronization Source Identifier random not IP address identifies a single media stream Allocate a port pair for RTP and RTCP e g 5004 for RTP 5005 for RTCP each media stream voice video etc normally has own RTP connection copyright 2005 Douglas S Reeves 9 copyright 2005 Douglas S Reeves 10 RTP Timestamps Initial value is random number i e absolute timing not used Timing rate or resolution is payload dependent specified as part of the A V profile RTCP Real Time Control Protocol resolution must be sampling rate of the media type e g 8KHz for compressed voice Timestamp in an RTP packet is time of the first sample in the frame copyright 2005 Douglas S Reeves 11 2 RTCP Purposes Types of RTCP Messages Partial Used for negotiation between senders and receivers 1 Source Description useful information about the source data Reports the quality of the connection between sender and receivers 2 Sender Report report current time and amount of data sent so far 3 Receiver Report feedback to sender about what has been received so far 4 Bye source is disconnecting 5 Application specific copyright 2005 Douglas S Reeves copyright 2005 Douglas S Reeves 13 1 Source Description Message 2 Receiver Report Message Contains up to 31 Source Descriptors Each Source Descriptor contains Synchronization Source ID 32 bits some number of TLV tag length value encoded fields Examples of standardized fields There is one Source Report Block for each sender about which the receiver is reporting Contents as follows 1 SSRC 32 bits 2 Fraction of blocks lost since last report out of 255 Name of originator Email address phone number Location copyright 2005 Douglas S Reeves 14 8 bits i e 13 13 255 5 lost 3 Cumulative number of packets lost 24 bits copyright 2005 Douglas S Reeves 15 Receiver Report Message con td 16 Computing Round Trip Delay 4 Highest sequence number received 32 bits sender report RTP sequence numbers wrap around after 216 1 this is extended sequence number 5 Interarrival Jitter Estimate 32 bits 6 LSR Time of last Sender Report 32 bits in NTP format just the middle 4 bytes Receiver report 7 DLSR Delay since last Sender Report 32 bits in units of 1 65536 seconds copyright 2005 Douglas S Reeves 17 copyright 2005 Douglas S Reeves 18 3 RTP Jitter Calculations RTP Jitter Calculations cont d Jitter statistical variance of the RTP data interarrival times Inputs r ts timestamp from the incoming packet Symbols for calculations arrival the current time in the same units s is the source Outputs r is the receiver s transit the transit time for the previous packet rr is receiver report s jitter the estimated jitter jitter estimate is a floating point number int transit arrival r ts rr jitter field of the receiver report is integer approximation int d transit s transit s transit transit s jitter 1 16 double d s jitter rr jitter u int32 s jitter copyright 2005 Douglas S Reeves Example transit 300 Sender Source ID SSRC NTP Timestamp d 300 0 300 s transit 300 20 Sender Report Message Initially s transit 0 s jitter 0 arrival 1000 r ts 700 copyright 2005 Douglas S Reeves 19 standard representation of time of day 8 bytes long first packet better than nanosecond resolution s jitter 0 1 16 300 0 18 75 RTP Timestamp application specific 32 bits rr jitter 18 arrival 1800 r ts 1700 Number of packets sent so far 32 bits next packet transit 100 d 200 Number of bytes sent so far 32 bits s transit 100 s jitter 18 75 1 16 200 18 75 30 01 rr jitter 30 copyright 2005 Douglas S Reeves 21 Additional RTCP Messages copyright 2005 Douglas S Reeves 22 Moderating RTCP Traffic Volume MsgType 4 Bye message RTCP traffic volume is carefully controlled to prevent excessive overhead SSRCs of sources leaving optionally reason for leaving RTCP traffic designed to be no more than 5 of the media traffic RTP MsgType 5 Application Specific message 1 25 allocated to senders and 3 75 allocated to receivers makes RTCP easily extensible as number of receivers increases frequency of response per receiver decreases Minimum packet transmission frequency is 5 seconds copyright 2005 Douglas S Reeves 23 copyright 2005 Douglas S Reeves 24 4 Header Compression RFC 2507 Every voice packet may have following overhead HEADER COMPRESSION IP 20 bytes UDP 8 bytes RTP 12 bytes 40 bytes per packet With 20 bytes of payload 66 of the packet is overhead this is particularly a problem with slow links e g access network copyright 2005 Douglas S Reeves Header Compression cont d Header Compression Principles Q Why not put
View Full Document
Unlocking...