TCP Ip Multimedia

Embed Size (px)

Citation preview

  • 8/11/2019 TCP Ip Multimedia

    1/87

    TCP/IP Protocol Suite 1Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    Chapter 25

    Multimedia

  • 8/11/2019 TCP Ip Multimedia

    2/87

    TCP/IP Protocol Suite 2

    OBJECTIVES: To show how audio/video files can be downloaded for future use

    or broadcast to clients over the Internet. The Internet can also be

    used for live audio/video interaction. Audio and video need to be

    digitized before being sent over the Internet.

    To discuss how audio and video files are compressed for

    transmission through the Internet.

    To discuss the phenomenon called Jitter that can be created on a

    packet-switched network when transmitting real-time data.

    To introduce the Real-Time Transport Protocol (RTP) and Real-

    Time Transport Control Protocol (RTCP) used in multimediaapplications.

    To discuss voice over IP as a real-time interactive audio/video

    application.

  • 8/11/2019 TCP Ip Multimedia

    3/87

    TCP/IP Protocol Suite 3

    OBJECTIVES (continued): To introduce the Session Initiation Protocol (SIP) as an

    application layer protocol that establishes, manages, andterminates multimedia sessions.

    To introduce quality of service (QoS) and how it can be

    improved using scheduling techniques and traffic shaping

    techniques. To discuss Integrated Services and Differential Services and how

    they can be implemented.

    To introduce Resource Reservation Protocol (RSVP) as a

    signaling protocol that helps IP create a flow and makes a

    resource reservation.

  • 8/11/2019 TCP Ip Multimedia

    4/87

    TCP/IP Protocol Suite 4

    Chapter

    Outline

    25.1 Introduction

    25.2 Digitizing Audio and Video

    25.3 Audio/Video Compression

    25.4 Streaming Stored

    Audio/Video

    25.5 Streaming Live

    Audio/Video

    25.6 Real Time Interactive

    Audio/Video

    25.7 RTP

    25.8 RTCP

  • 8/11/2019 TCP Ip Multimedia

    5/87

    TCP/IP Protocol Suite 5

    Chapter

    Outline

    (cont inued)

    25.9 Voice Over IP

    25.10 Quality of Service

    25.11 Integrated Services

    25.12 Differentiated Services

  • 8/11/2019 TCP Ip Multimedia

    6/87

    TCP/IP Protocol Suite 6

    25-1 INTRODUCTION

    We can divide audio and video services into three

    broad categories: streaming stored audio/video,

    streaming live audio/video, and interactive

    audio/video, as shown in Figure 25.1. Streaming

    means a user can listen or watch) the file after the

    downloading has started.

  • 8/11/2019 TCP Ip Multimedia

    7/87

    TCP/IP Protocol Suite 7

    Figure 25.1 I nternet audio/video

  • 8/11/2019 TCP Ip Multimedia

    8/87

    TCP/IP Protocol Suite 8

    Stream ing sto red aud io/v ideo refers to

    on -demand requests for compressed

    aud io /vid eo fi les.

    Note

  • 8/11/2019 TCP Ip Multimedia

    9/87

    TCP/IP Protocol Suite 9

    Streaming l ive aud io/video refers to

    the broadcast ing of radio and TV

    programs through the Internet.

    Note

  • 8/11/2019 TCP Ip Multimedia

    10/87

    TCP/IP Protocol Suite 10

    Interact ive aud io/video refers to the use

    of the In ternet for in teract ive

    aud io/video app l icat ions.

    Note

  • 8/11/2019 TCP Ip Multimedia

    11/87

    TCP/IP Protocol Suite 11

    25-2 DIGITIZING AUDIO AND VIDEO

    Before audio or video signals can be sent on the

    Internet, they need to be digitized. We discuss audio

    and video separately.

  • 8/11/2019 TCP Ip Multimedia

    12/87

    TCP/IP Protocol Suite 12

    Topics Discussed in the Section

    Digitizing Audio

    Digitizing Video

  • 8/11/2019 TCP Ip Multimedia

    13/87

    TCP/IP Protocol Suite 13

    Compression is needed to send v ideo

    over the In ternet.

    Note

  • 8/11/2019 TCP Ip Multimedia

    14/87

    TCP/IP Protocol Suite 14

    25-3 AUDIO AND VIDEO COMPRESSION

    To send audio or video over the Internet requires

    compression. In this section, we first discuss audio

    compression and then video compression.

  • 8/11/2019 TCP Ip Multimedia

    15/87

    TCP/IP Protocol Suite 15

    Topics Discussed in the Section

    Audio Compression

    Video Compression

  • 8/11/2019 TCP Ip Multimedia

    16/87

    TCP/IP Protocol Suite 16

    Figure 25.2 JPEG gray scale

  • 8/11/2019 TCP Ip Multimedia

    17/87

    TCP/IP Protocol Suite 17

    Figure 25.3 JPEG process

  • 8/11/2019 TCP Ip Multimedia

    18/87

    TCP/IP Protocol Suite 18

    Figure 25.4 Case 1: uniform gray scale

  • 8/11/2019 TCP Ip Multimedia

    19/87

    TCP/IP Protocol Suite 19

    Figure 25.5 Case2: two secti ons

  • 8/11/2019 TCP Ip Multimedia

    20/87

    TCP/IP Protocol Suite 20

    Figure 25.6 Case 3 : gradient gray scale

  • 8/11/2019 TCP Ip Multimedia

    21/87

  • 8/11/2019 TCP Ip Multimedia

    22/87

    TCP/IP Protocol Suite 22

    Figure 25.8 MPEG frames

  • 8/11/2019 TCP Ip Multimedia

    23/87

    TCP/IP Protocol Suite 23

    Figure 25.9 MPEG frame construction

  • 8/11/2019 TCP Ip Multimedia

    24/87

    TCP/IP Protocol Suite 24

    25-4 STREAMING STORED

    AUDIO/VIDEO

    Now that we have discussed digitizing and

    compressing audio/video, we turn our attention to

    specific applications. The first is streaming stored

    audio and video. Downloading these types of files

    from a Web server can be different from

    downloading other types of files. To understand the

    concept, let us discuss three approaches, each with

    a different complexity.

  • 8/11/2019 TCP Ip Multimedia

    25/87

    TCP/IP Protocol Suite 25

    Topics Discussed in the Section

    First Approach: Using a Web Server

    Second Approach: Using a Web Server with MetafileThird Approach: Using a Media Server

    Fourth Approach: Using a Media Server and RTSP

  • 8/11/2019 TCP Ip Multimedia

    26/87

    TCP/IP Protocol Suite 26

    Figure 25.10 Using a Web server

    GET: audio/video file1

    RESPONSE 2

    Audio/videofile

    3

    Fi 25 11 f

  • 8/11/2019 TCP Ip Multimedia

    27/87

    TCP/IP Protocol Suite 27

    Figure 25.11 Using a Web server with a metafi le

    GET: metafile1

    RESPONSE 2

    Metafile

    3

    GET: audio/video file4

    RESPONSE5

    Fi 25 12 U i di

  • 8/11/2019 TCP Ip Multimedia

    28/87

    TCP/IP Protocol Suite 28

    Figure 25.12 Using a media server

    GET: metafile1

    RESPONSE 2

    Metafile

    3

    GET: audio/video file4

    RESPONSE5

    Fi 25 13 U i di d RSTP

  • 8/11/2019 TCP Ip Multimedia

    29/87

    TCP/IP Protocol Suite 29

    Figure 25.13 Using a media server and RSTP

    GET: metafile1

    RESPONSE2

    Metafile

    3

    SETUP4

    RESPONSE5

    PLAY6

    RESPONSE7

    Audio/videoStream

    TEARDOWN8

    RESPONSE9

  • 8/11/2019 TCP Ip Multimedia

    30/87

    TCP/IP Protocol Suite 30

    25-5 STREAMING LIVE AUDIO/VIDEO

    Streaming live audio/video is similar to the

    broadcasting of audio and video by radio and TV

    stations. Instead of broadcasting to the air, the

    stations broadcast through the Internet. There are

    several similarities between streaming stored

    audio/video and streaming live audio/video. They are

    both sensitive to delay; neither can accept

    retransmission. However, there is a difference. In the

    first application, the communication is unicast and

    on-demand. In the second, the communication is

    multicast and live.

  • 8/11/2019 TCP Ip Multimedia

    31/87

    TCP/IP Protocol Suite 31

    25-6 REAL-TIME INTERACTIVE

    AUDIO/VIDEO

    In real-time interactive audio/video, people

    communicate with one another in real time. The

    Internet phone or voice over IP is an example of this

    type of application. Video conferencing is another

    example that allows people to communicate visually

    and orally.

  • 8/11/2019 TCP Ip Multimedia

    32/87

    TCP/IP Protocol Suite 32

    Topics Discussed in the Section

    Characteristics

    Figure 25 14 Time relationship

  • 8/11/2019 TCP Ip Multimedia

    33/87

    TCP/IP Protocol Suite 33

    Figure 25.14 Time relationship

  • 8/11/2019 TCP Ip Multimedia

    34/87

    TCP/IP Protocol Suite 34

    Ji t ter is introduced in real-t ime data by

    the delay between packets.

    Note

    Figure 25 15 Jitter

  • 8/11/2019 TCP Ip Multimedia

    35/87

    TCP/IP Protocol Suite 35

    Figure 25.15 Jitter

  • 8/11/2019 TCP Ip Multimedia

    36/87

  • 8/11/2019 TCP Ip Multimedia

    37/87

    TCP/IP Protocol Suite 37

    To prevent j i t ter, we can timestamp the

    packets and separate the arr ival t ime

    from the playback t ime.

    Note

    Figure 25 17 Playback buffer

  • 8/11/2019 TCP Ip Multimedia

    38/87

    TCP/IP Protocol Suite 38

    Figure 25.17 Playback buffer

  • 8/11/2019 TCP Ip Multimedia

    39/87

    TCP/IP Protocol Suite 39

    A playback buffer is requ ired fo r

    real-t im e traff ic.

    Note

  • 8/11/2019 TCP Ip Multimedia

    40/87

    TCP/IP Protocol Suite 40

    A sequence number on each packet is

    requ ired fo r real-t ime traff ic.

    Note

  • 8/11/2019 TCP Ip Multimedia

    41/87

    TCP/IP Protocol Suite 41

    Real-t ime traff ic needs the suppo rt of

    mult icast ing.

    Note

  • 8/11/2019 TCP Ip Multimedia

    42/87

  • 8/11/2019 TCP Ip Multimedia

    43/87

    TCP/IP Protocol Suite 43

    Mixing means combining several

    streams of traf fic in to one stream .

    Note

  • 8/11/2019 TCP Ip Multimedia

    44/87

  • 8/11/2019 TCP Ip Multimedia

    45/87

    TCP/IP Protocol Suite 45

    UDP is more su itab le than TCP for

    in teractiv e traff ic. However, we needthe serv ices o f RTP, ano ther

    transpo rt layer pro tocol , to make

    up fo r the deficienc ies of UDP.

    Note

  • 8/11/2019 TCP Ip Multimedia

    46/87

    TCP/IP Protocol Suite 46

    25-7 RTP

    Real-time Transport Protocol RTP) is the protocol

    designed to handle real-time traffic on the Internet.

    RTP does not have a delivery mechanism

    multicasting, port numbers, and so on); it must be

    used with UDP. RTP stands between UDP and the

    application program. The main contributions of RTP

    are timestamping, sequencing, and mixing facilities.

    T i Di d i th S ti

  • 8/11/2019 TCP Ip Multimedia

    47/87

    TCP/IP Protocol Suite 47

    Topics Discussed in the Section

    RTP Packet Format

    UDP Port

  • 8/11/2019 TCP Ip Multimedia

    48/87

    Figure 25.19 RTP packet header format

  • 8/11/2019 TCP Ip Multimedia

    49/87

    TCP/IP Protocol Suite 49

    g

  • 8/11/2019 TCP Ip Multimedia

    50/87

    TCP/IP Protocol Suite 50

  • 8/11/2019 TCP Ip Multimedia

    51/87

  • 8/11/2019 TCP Ip Multimedia

    52/87

    TCP/IP Protocol Suite 52

    25-8 RTCP

    RTP allows only one type of message, one that

    carries data from the source to the destination. In

    many cases, there is a need for other messages in a

    session. These messages control the flow and

    quality of data and allow the recipient to send

    feedback to the source or sources. Real-Time

    Transport Control Protocol RTCP) is a protocol

    designed for this purpose.

    Topics Discussed in the Section

  • 8/11/2019 TCP Ip Multimedia

    53/87

    TCP/IP Protocol Suite 53

    Topics Discussed in the Section

    Sender Report

    Receiver ReportSource Description Message

    Bye Message

    Application-Specific Message

    UDP Port

    Figure 25.20 RTCP message types

  • 8/11/2019 TCP Ip Multimedia

    54/87

    TCP/IP Protocol Suite 54

  • 8/11/2019 TCP Ip Multimedia

    55/87

    TCP/IP Protocol Suite 55

    RTCP uses an odd-numbered UDP port

    number that fo llows the po r t numberselected fo r RTP.

    Note

  • 8/11/2019 TCP Ip Multimedia

    56/87

    TCP/IP Protocol Suite 56

    25-9 VOICE OVER IP

    Let us concentrate on one real-time interactive

    audio/video application: voice over IP, or Internet

    telephony. The idea is to use the Internet as a

    telephone network with some additional capabilities.

    Instead of communicating over a circuit-switched

    network, this application allows communication

    between two parties over the packet-switched

    Internet. Two protocols have been designed to

    handle this type of communication: SIP and H.323.

    We briefly discuss both.

    Topics Discussed in the Section

  • 8/11/2019 TCP Ip Multimedia

    57/87

    TCP/IP Protocol Suite 57

    Topics Discussed in the Section

    SIP

    H.323

    Figure 25.21 SIP messages

  • 8/11/2019 TCP Ip Multimedia

    58/87

    TCP/IP Protocol Suite 58

    Figure 25.22 SIP formats

  • 8/11/2019 TCP Ip Multimedia

    59/87

    TCP/IP Protocol Suite 59

    Figure 25.23 SIP simple session

  • 8/11/2019 TCP Ip Multimedia

    60/87

    TCP/IP Protocol Suite 60

    INVITE: address, options

    OK: address

    ACK

    Establishing

    Communicating Exchanging audio

    BYETerminating

    Figure 25.24 Tracking the callee

  • 8/11/2019 TCP Ip Multimedia

    61/87

    TCP/IP Protocol Suite 61

    INVITE

    Lookup

    Reply

    INVITE

    OKOK

    ACK

    ACK

    Exchanging audio

    BYE

    Figure 25.25 H.323 archi tecture

  • 8/11/2019 TCP Ip Multimedia

    62/87

    TCP/IP Protocol Suite 62

    Figure 25.26 H.323 protocols

  • 8/11/2019 TCP Ip Multimedia

    63/87

    TCP/IP Protocol Suite 63

    Figure 25.27 H.323 example

  • 8/11/2019 TCP Ip Multimedia

    64/87

    TCP/IP Protocol Suite 64

    F i n d I P a d d r e s sof gatekeeper

    Q.931 messagef o r s e t u p

    RTP for audio exchange

    RTCP for management

    Q.931 messagefor termination

    2 10 Q A O S C

  • 8/11/2019 TCP Ip Multimedia

    65/87

    TCP/IP Protocol Suite 65

    25-10 QUALITY OF SERVICE

    Quality of service QoS) is an internetworking issue

    that has been discussed more than defined. We can

    informally define quality of service as something a

    flow of data seeks to attain. Although QoS can be

    applied to both textual data and multimedia, it is

    more an issue when we are dealing with multimedia.

    Topics Discussed in the Section

  • 8/11/2019 TCP Ip Multimedia

    66/87

    TCP/IP Protocol Suite 66

    Topics Discussed in the Section

    Flow Characteristics

    Flow ClassesTechniques to Improve QoS

    Resource Reservation

    Admission Control

    Figure 25.28 F low character istics

  • 8/11/2019 TCP Ip Multimedia

    67/87

    TCP/IP Protocol Suite 67

    Figure 25.29 FIFO queues

  • 8/11/2019 TCP Ip Multimedia

    68/87

    TCP/IP Protocol Suite 68

    Figure 25.30 Priori ty queues

  • 8/11/2019 TCP Ip Multimedia

    69/87

    TCP/IP Protocol Suite 69

    Figure 25.31 Weighted fair queuing

  • 8/11/2019 TCP Ip Multimedia

    70/87

    TCP/IP Protocol Suite 70

  • 8/11/2019 TCP Ip Multimedia

    71/87

    Figure 25.33 Leaky bucket implementation

  • 8/11/2019 TCP Ip Multimedia

    72/87

    TCP/IP Protocol Suite 72

  • 8/11/2019 TCP Ip Multimedia

    73/87

    TCP/IP Protocol Suite 73

    A leaky bucket algor i thm shapes bu rsty

    traff ic into f ixed-rate traff ic byaverag ing the data rate.

    It may d rop the packets i f thebucket is fu l l .

    Note

    Figure 25.34 Token bucket

  • 8/11/2019 TCP Ip Multimedia

    74/87

    TCP/IP Protocol Suite 74

  • 8/11/2019 TCP Ip Multimedia

    75/87

    TCP/IP Protocol Suite 75

    The token bucket al lows burs ty traf fic at

    a regu lated maxim um rate.

    Note

  • 8/11/2019 TCP Ip Multimedia

    76/87

    Topics Discussed in the Section

  • 8/11/2019 TCP Ip Multimedia

    77/87

    TCP/IP Protocol Suite 77

    p

    Signaling

    Flow SpecificationAdmission

    Service Classes

    RSVP

    Problems with Integrated Services

  • 8/11/2019 TCP Ip Multimedia

    78/87

    TCP/IP Protocol Suite 78

    Integrated Services is a f low -based QoS

    model designed fo r IP.

    Note

    Figure 25.35 Path messages

  • 8/11/2019 TCP Ip Multimedia

    79/87

    TCP/IP Protocol Suite 79

    Figure 25.36 Resv messages

  • 8/11/2019 TCP Ip Multimedia

    80/87

    TCP/IP Protocol Suite 80

    Figure 25.37 Reservation merging

  • 8/11/2019 TCP Ip Multimedia

    81/87

    TCP/IP Protocol Suite 81

  • 8/11/2019 TCP Ip Multimedia

    82/87

    25 12 DIFFERENTIATED SERVICES

  • 8/11/2019 TCP Ip Multimedia

    83/87

    TCP/IP Protocol Suite 83

    25-12 DIFFERENTIATED SERVICES

    Differentiated Services DS or Diffserv) was

    introduced by the IETF Internet Engineering Task

    Force) to handle the shortcomings of Integrated

    Services.

  • 8/11/2019 TCP Ip Multimedia

    84/87

  • 8/11/2019 TCP Ip Multimedia

    85/87

    TCP/IP Protocol Suite 85

    Differentiated Serv ices is a class -based

    QoS model designed fo r IP.

    Note

    Figure 25.39 DS field

  • 8/11/2019 TCP Ip Multimedia

    86/87

    TCP/IP Protocol Suite 86

    Figure 25.40 Traff ic conditi oner

  • 8/11/2019 TCP Ip Multimedia

    87/87