IP Quality of Service _QoS_

Document Sample
IP Quality of Service _QoS_ Powered By Docstoc
					 IP Quality of Service (QoS)
 Muhammad Jaseemuddin
 Dept. of Electrical & Computer Engineering
 Ryerson University
 Toronto, Canada

1.   Larry L. Peterson, Bruce S. Davie, Computer Networks: A Systems
     Approach, 2nd edition, Morgan-Kaufmann, 2002.
2.   Paul P. White, RSVP and Integrated Services in the Internet: A Tutorial,
     IEEE Communications Magazine, May 1997.
3.   David Durham, Raj Yavatkar, Inside the Internet’s Resource
     Reservation Protocol, John Wiley,1999.
4.   A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental
     Concepts and Key Architectures, McGraw Hill, 2000.
5.   D. D. Clark and W. Fang, Explicit Allocation of Best-Effort Packet
     Delivery Service, IEEE/ACM Transactions on Networking, Vol. 6, No.4,
     August 1998.

MM Networking Applications
Classes of MM applications:       Fundamental characteristics:
1) Streaming stored audio         ❒ Typically delay sensitive
   and video                         ❍ end-to-end delay
                                     ❍ delay jitter
2) Streaming live audio and
                                  ❒ But loss tolerant: infrequent
                                    losses cause minor glitches
3) Real-time interactive          ❒ Antithesis of data, which are
   audio and video                  loss intolerant but delay
   Jitter is the variability
   of packet delays within
   the same packet stream

 Realtime Applications
 ❒ Require “deliver on time” assurances
    ❍ must come from inside the network

  Microphone   Sampler,                             ,
                A D                            D A

 ❒ Example application (audio)
    ❍ sample voice once every 125us
    ❍ each sample has a playback time
    ❍ packets experience variable delay in network
    ❍ add constant factor to playback time: playback point

Playback Buffer

              Sequence number

                                generation                                     Playback

                                         Network          Buffer


Example Distribution of Delays

                                                    90% 97% 98%              99%
Packets (%)



                                    50                  100              150              200
                                                Delay (milliseconds)



                         Real time                                         Elastic

            Tolerant                      Intolerant       Interactive   Interactive   Asynchronous

     Adaptive    Nonadaptive    Rate-adaptive     Nonadaptive

 Delay-      Rate-
adaptive    adaptive

Open-Loop Congestion Control
❒ It prevents congestion from happening
❒ It entails explicit resource allocation along the
❒ It is more versatile in providing different service
     ❍     Quality of Service
❒ It involves:
   ❍ Signaling to specify Resource Requirement
   ❍ Connection Admission Control (CAC)
   ❍ Policing
   ❍ Traffic Shaping
   ❍ Scheduling

    Scheduling Mechanisms
    ❒ scheduling: choose next packet to send on link
    ❒ FIFO (first in first out) scheduling: send in order of arrival to
       ❍ real-world example?
       ❍ discard policy: if packet arrives to full queue: who to discard?
          • Tail drop: drop arriving packet
          • priority: drop/remove on priority basis
              • Also called preferential dropping
          • random: drop/remove randomly

    Queuing Discipline
❒   First-In-First-Out (FIFO)
     ❍ does not discriminate between traffic sources
     ❍ Jitter of all flows are shared by all of them
❒   Fair Queuing (FQ)
     ❍ Explicitly segregates traffic based on flows
     ❍ Ensures no flow captures more than its share of
        capacity                                           Flow 1
          • it prevents a flow from hogging the queue
     ❍ Each flow is guaranteed at least C/n bps, if C is   Flow 2
        the link capacity in bps and n is the number of                             Round-robin
        flows                                                                         service
          • Equitable sharing of link bandwidth
          • View the queue as a fluid flow system          Flow 3

          • A flow can get more bandwidth if the queue
            is empty – work conserving
     ❍ Variation: weighted fair queuing (WFQ)              Flow 4

❒ Problem?
      ❍   No preemption
      ❍   Short packets may miss its deadline by large packets under transmission
      ❍   Jiiter is experienced by the flow causing burstiness – it is not shared
             •Jitter may be too high

Packet-by-Packet Fair Queuing
 Queue 1                                                       Fluid-flow system:
 @ t=0                                                         both packets served
                                                               at rate 1/2
    Queue 2                   1
    @ t=0                                                      Both packets
                                                               complete service
                                                               at t=2
                                  0         1         2

Packet from
                                          Packet-by-packet system:
queue 2 waiting
                                          queue 1 served first at rate 1;
                                          then queue 2 served at rate 1.
                                          Packet from queue 2
 Packet from                              being served
 queue 1 being                        t
 served           0     1         2

FQ Algorithm
❒ Suppose clock ticks each time a bit is transmitted
      ❍  Suppose each queue is served one bit in a round
      ❍  A round consists of number of clock ticks to serve one
         bit from all n queues (flows)
❒    Let Pi denote the length of packet i
❒    Let Si denote the time when start to transmit packet i
❒    Let Fi denote the time when finish transmitting packet i
❒    Fi = Si + Pi
❒    When does router start transmitting packet i?
      ❍ if before router finished packet i - 1 from this flow, then
         immediately after last bit of i - 1 (Fi-1)
      ❍ if no current packets for this flow, then start
         transmitting when arrives (call this Ai)
❒    Thus: Fi = MAX (Fi - 1, Ai) + Pi

Packet-by-Packet Fair Queuing
                                          2                                    Fluid-flow system:
  Queue 1                                                                      both packets served
  @ t=0                                                                        at rate 1/2
  Queue 2                                                                       Packet from queue
  @ t=0                                                                         s served at rate 1

                                              0       2      3

 Packet from                                              Packet-by-packet fair queuing:
 queue 2 waiting                                          queue 2 served at rate 1

  Packet from
  queue 1 being
  served at rate 1                                t
                              0   1   2       3

FQ Algorithm - Example
❒ For multiple flows
   ❍ calculate Fi for each packet that arrives on
     each flow
   ❍ treat all Fi’s as timestamps
   ❍ next packet to transmit is one with lowest
❒ Not perfect: can’t preempt current packet
❒ Example
                                                           Flow 1             Flow 2
      Flow 1            Flow 2        Output              (arriving)      (transmitting)   Output

F=8            F = 10                                                  F = 10
F=5                                               F=2

                            (a)                                                  (b)

 Weighted Fair Queuing (WFQ)
 ❒ Since different users have different
      ❍   Non-equitable fair sharing
      ❍   Giving each flow certain proportion of the bandwidth
 ❒ Each flow is assigned a weight that determines its
   relative share of the bandwidth
 ❒ Fi = MAX (Fi - 1, Ai) + Pi /wi
      ❍   Pi/wi shows the depletion of flow i queue at a rate
          proportional to its bandwidth share determined by its
 ❒ WFQ ensures that a flow                                 i with weight wi will get
     at least (wi/W)C bandwidth
      ❍   W = ∑ wi
      ❍   C is the link capacity in Mbps

 Packet-by-Packet WFQ
       Queue 1
       @ t=0                                                                    Fluid-flow system:
                                                                                packet from queue 1
          Queue 2                                                               served at rate 1/4;
          @ t=0                               1
                                                                                Packet from queue 1
                                                                                served at rate 1
                        Packet from queue 2
                        served at rate 3/4                                       t
                                                      0           1         2
                                                      Packet-by-packet weighted fair queuing:
Packet from                                           Flow 1 will receive 1 bit/round (w1=1) and
queue 1 waiting                                       Flow 2 will receive 3 bits/round (w2=3)
                                                      queue 2 served first at rate 1
              1                                         F(2,1) = 0 + 1/3 = 1/3
                                                      then queue 1 served at rate 1
 Packet from                                            F(1,1) = 0 + 1/1 = 1
 queue 2 being
 served                                           t
                    0                                     Packet from queue 1 being served
                               1        2

Connection Admission Control (CAC)
• Flow is an abstraction of connection in IP network
• At connection setup time (or before launching
   • application expresses to the network:
      • flow traffic characteristics using traffic
          • e.g. peak rate, average rate, max. burst
            size etc
      • flow QoS requirements using QoS
          • e.g. max. bandwidth, max. delay, delay
            variance, loss probability etc
   • network applies Connection Admission Control
     (CAC) to either accept or reject the connection
     setup request

• Once a connection is accepted by CAC, the network can
  provide QoS as long as the traffic obeys the characteristics
  specified in the traffic descriptors
   • traffic descriptor and QoS parameters are contractual
      binding that both parties – application and network, must
• Policing: Network monitors the traffic to ascertain that it
  follows the characteristics specified in the traffic
   • traffic that violates the descriptor is dealt
       • discarded
       • tagged as low priority: at congestion point more
          vulnerable to drop
       • shaped to conform to the descriptor
   • metering
       • measure the real time traffic characteristics
   • marking
       • weigh against the traffic descriptor
         and tag or discard

   Token Bucket Traffic Shaper
•Token Bucket Traffic Shaper is designed to allow variation in the
transmission rate
     • it employs a buffer to absorb the burst
     • it controls the output rate using a token bucket (counter)
• Algorithm:
     • the token is generated at a constant rate and stored in the
     token bucket; if the bucket is full, arriving tokens are discarded        Tokens arrive
     • a packet from the buffer is transmitted only if the tokens can           periodically
     be drawn from the bucket
     • if no token is available, the packet is backlogged in the buffer
     • when the bucket is empty, then backlogged packets are
     transmitted at the rate at which token arrives in the buffer
     • when the bucket is not empty, then the packets are drawn
     from the buffer as soon as they arrive                                       Size K
           • the traffic burstiness is preserved
     • however if burstiness continues the bucket is exhausted and
     the packets are backlogged                                                      Token
     • the bucket size limits the burstiness
                                                                      Packet          Shaped
                                                       Size N                         traffic
                                      Incoming traffic

    Integrated Services
    ❒   Service Classes
         ❍ Guaranteed (RFC 2212)
         ❍ Assured level of bandwidth
         ❍ Maximal end-to-end delay bound
              • It does not control minimal and average delays
         ❍ No queuing loss for conforming packets
         ❍ It is for playback applications with strict delay bound requirement
              • The application must be capable of storing packets that arrive early
         ❍ Each router reserves bandwidth R and buffer space B
    ❒   controlled-load (RFC 2211)
              • provide the same level of service as unloaded best-effort      it
                 controls delay and losses under load condition
              • For adaptive real-time applications that can tolerate certain losses
                 and delays
    ❒   Mechanisms
         ❍ signaling protocol
         ❍ admission control
         ❍ policing
         ❍ packet scheduling

       Admission Control
      Arriving session must :
      ❒ declare its QOS requirement
         ❍ R-spec: defines the QOS being requested
      ❒ characterize traffic it will send into network
         ❍ T-spec: defines traffic characteristics
      ❒ signaling protocol: needed to carry R-spec and T-
        spec to routers (where reservation is required)
         ❍ RSVP

        Per-Router Mechanisms
                         RSVP Process
RSVP                                                          Policy                RSVP
Signaling                                                     Control               Signaling


              Admission                                                             Data
              Control                                                               Flow
                              Packet                 Packet                         out
                              Classifier             Scheduler

  ❒    Admission Control
        ❍ decide if a new flow can be supported
        ❍ answer depends on service class
        ❍ not the same as policing
  ❒    Packet Processing
        ❍ classification: associate each packet with the appropriate reservation
        ❍ scheduling: manage queues so each packet receives the requested service

Reservation Protocol
❒   Proposed Internet standard: RSVP
❒   Consistent with robustness of today’s connectionless model
❒   Uses soft state (refresh periodically)
❒   Designed to support multicast
❒   Receiver-oriented
❒   Two messages: PATH and RESV
❒   Source transmits PATH messages every 30 seconds
❒   Destination responds with RESV message

RSVP – Messages
❒   Path Setup
     ❍ PATH Message is generated by the source(sender) and traverse along
        the route to the destination (receiver)
     ❍ It causes all the RSVP capable router to install path state – path setup
     ❍ It contains filter specification to identify the traffic and sender Tspec
     ❍ It is intercepted by every RSVP capable router along the path
          • If the router finds any error, it sends PathErr message back to the
❒   Receiver sends Resv Message upstream to the sender
     ❍ It is sent hop by hop to the address a RSVP node learns from
       the Phop object
     ❍ It contains Flow spec
         • Rspec
         • Tspec
              – Typically set to sender Tspec
         • Optionally a reservation confirmation object, ResvConf,
           containing the IP address of the receiver. The router at
           which the reservation ends up the distribution tree if finds
           ResvConf sends ResvConf message to the receiver indicating
           that there is a high probability that the reservation

 RSVP Example

                    Sender 1

         Sender 2               R

                               (merged)    R

                                                        R        Receiver A

                                               R   RESV

                                                    Receiver B

Diffserv Architecture
❒ Problem with IntServ: scalability
❒ Idea: support two classes of packets                          r marking
    ❍   premium
Edge router:
- per-flow traffic management
- marks packets as in-profile
and out-profile
Core router:
- per class traffic management                                            .
- buffering and scheduling                                                .
based on marking at edge
- preference given to in-profile
- Preferential Dropping

Framework Implementation
• Service Allocation Profile
     • Traffic Specification
          • what exactly is provided? (e.g. 5 Mbps average throughput)
     • Geographic Scope
          • To where the service is provided? (e.g. a group of destinations, or all in a
          particular network, or every where etc)
     • Probability of Assurance
          • With what level of assurance the service is provided? (level of performance
          uncertainty the user is expected to tolerate)
• Profile Meter
     • meters the traffic and test it for conformance to the service allocation profile
     • marks the conformant packets in (in-profile) and the packets exceeding the profile
     as out (out-profile)
• Preferential Dropping Scheme
     • Every router must be capable of preferentially dropping tagged (marked) packets

Classification and Conditioning

❒ Packet is marked in the Type of Service
  (TOS) in IPv4, and Traffic Class in IPv6
❒ 6 bits used for Differentiated Service
  Code Point (DSCP) and determine PHB that
  the packet will receive
❒ 2 bits are currently unused

Classification and Conditioning

may be desirable to limit traffic injection
  rate of some class:
❒ user declares traffic profile (eg, rate,
  burst size)
❒ traffic metered, shaped if non-conforming


• Using ns-2                           1                      11
• Ten TCP connections via a single                            12
• All connections share a common       3                      13
link with BW 33 Mbps
                                       4                      14
• The connections have different
RTTs from 20 to 100 ms                 5        33 Mbps       15
• Their target rates RT are either 1        A             A
                                       6         5 ms         16
Mbps or 5 Mbps
• All TCP connections run for 20 s     7                      17

                                       8                      18

                                       9                      19

                                       10                     20

Result – TCP + CBR connections
 Connection          RTT       Today’s Internet RT       With RIO
 #                   (ms)      (Mbps)           (Mbps)   (Mbps)

 1                   20        7.04873         1         1.44003
 2                   20        5.36329         5         5.21102
 3                   40        1.98478         1         1.07188
 4                   40        2.56938         5         5.01237
 5                   50        2.443           1         1.23827
 6                   50        2.54567         5         4.76236
 7                   70        1.28912         1         1.0332
 8                   70        1.53377         5         4.47648
 9                   100       1.1074          1         0.817773
 10                  100       1.50127         5         4.3094
 CBR*                50        5.85338         0         2.61297

 Total                         31.59858                  31.9857

* CBR sending rate is 6 Mbps

Forwarding Behavior (PHB)
Per Hop Behaviors (PHBs) are developed:
❒ Expedited Forwarding: pkt departure rate of a
  class equals or exceeds specified rate
   ❍ logical link with a minimum guaranteed rate
❒ Assured Forwarding: 4 classes of traffic
   ❍ each guaranteed minimum amount of bandwidth
   ❍ each with three drop preference partitions