Chapter 24. Congestion Control and Quality of Service part 2 23.5 23.6 23.7 23.8 Quality of Service Techniques to Improve QoS Integrated Services Differentiated Services 24-1 Quality of Service (QoS) Flow Characteristics: • Reliability: – • needed by flow, Lack of reliability means losing a packet or acknowledgment, which entails retransmission. Delay: – applications can tolerate delay in different degrees. • Jitter: – the variation in delay for packets belonging to the same flow – High jitter means the difference between delays is large; low jitter means the variation is small. • Bandwidth: – Different applications need different bandwidths. • Flow Classes: Based on the characteristics, we can classify flows into groups, with each group having similar levels of characteristics 24-2 QoS Techniques four common techniques that can be used to improve the quality of service : – Scheduling: A good scheduling technique treats the different flows in a fair and appropriate manner. – Traffic shaping: Leaky bucket, token bucket – Resource reservation – Admission control: accept or reject a flow based on predefined parameters called flow specification 24-3 1. Scheduling FIFO queuing: • packets wait in a buffer (queue) until the (router or switch) is ready to process them. • If the average arrival rate is higher than the average processing rate, the queue will fill up and new packets will be discarded. Priority Queuing: • • • Packets are first assigned to priority class. Each priority class has its own queue The packets in the highest-priority queue are processed first Starvation may occurs 24-4 1. Scheduling (cont..) Weighted Fair Queuing • • The queues are weighted based on the priority of the queues The system processes packets in each queue in a round-robin fashion with the number of packets selected from each queue based on the weight 24-5 2. Traffic Shaping Traffic shaping is a mechanism to control the amount and the rate of the traffic sent to the network. Two techniques can shape traffic: leaky bucket and token bucket. First technique :Leaky Bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data rate. It may drop the packets if the bucket is full. 24-6 2. Traffic Shaping (cont) simple Leaky Bucket Implementation: • A FIFO queue holds the packets. • If the traffic consists of fixed-size packets the process removes a fixed number of packets from the queue at each tick of the clock. • If the traffic consists of variable-length packets, the fixed output rate must be based on the number of bytes or bits. – Algorithm for variable-length packets: 1) Initialize a counter to n at the tick of the clock 24-7 2. Traffic Shaping (cont) Second technique: Token Bucket • The token bucket allows bursty traffic at a regulated maximum rate. • The bucket holds tokens. • To transmit a packet, we “use” one token. • Allows the output rate to vary. • Generate a token every r time units • For an arriving packet enqueue • While buffer not empty and there are tokens send a packet and discard a token 24-8 2. Traffic Shaping (cont) arrival queue Token bucket sent p1 (5) - 0 - p2 (2) p1 3 - p3 (1) p2 6-5=1 p1 4-2-1=1 p3,p2 Token bucket example: parameters: • MaxTokens=6 • (3 token/time) 4 6 Combining Token Bucket and Leaky Bucket: •The two techniques can be combined to credit an idle host and at the same time regulate the traffic. •The leaky bucket is applied after the token bucket • the rate of the leaky bucket needs to be higher than the rate of tokens dropped in the bucket. 24-9 Integrated Services (IntServ) • • Integrated Services is a flow-based QoS model designed for IP Signaling: – implement a flow-based model over a connectionless protocol – Resource Reservation Protocol (RSVP) • Flow specification: – Rspec (resource specification) defines the resource that the flow needs to reserve (buffer, bandwidth, etc.) – Tspec (traffic specification) defines the traffic characterization of the flow • Admission: – a router decides to admit or deny the flow specification based on the previous commitments of the router and the current availability of the resource. • Service classes: guaranteed service and controlled-load service – Guaranteed service class: guaranteed minimum end-to-end delay – Controlled-load service class: accept some delays, but is sensitive to an overloaded network and to the danger of losing packets 24-10 RSVP • • • • • In IntServ, the resource reservation is for a flow, a kind of virtual circuit network out of the IP RSVP is a signaling protocol to help IP create a flow and consequently make a resource reservation RSVP is a signaling system designed for multicasting Receiver-based reservation RSVP message several types of messages : Path and Resv 24-11 RSVP Messages Path message: from sender to all receivers. Recall that the receivers in a flow make the reservation in RSVP. Resv Messages : Make a resource reservation from each receiver to sender 24-12 Reservation Merging • the resources are not reserved for each receiver in a flow; the reservation is merged. • Rc3 requests a 2-Mbps bandwidth and Rc2 24-13 Reservation Styles • • When there is more than one flow the router needs to make a reservation to accommodate all of them. RSVP defines three types of reservation styles – Wild card filter style: a single reservation for all senders – Fixed filter style: a distinct reservation for each flow – Shared explicit style: a single reservation which can be shared by a set of flow Reservation information (state): • soft state Reservation information stored in every node for a flow needs to be refreshed periodically. •hard state used in other virtual-circuit protocols such as ATM or Frame Relay, where the information about the flow is maintained until it is erased. •Default interval for refreshing is currently 30 s. 24-14 Problems with Integrated Services 1. Scalability • The Integrated Services model requires that each router keep information for each flow, the Internet is growing every day, this is a serious problem. 2. Service-Type Limitation • The Integrated Services model provides only two types of services 24-15 Differentiated Service (Diffserv) • • Differentiated Services is a class-based QoS model designed for IP. Diffserv handles the shortcomings of IntServ 1. The main processing was moved from the core of the network to the edge of the network. This solves the scalability problem, where routers do not have to store information about flows applications, or hosts, define the type of service need by each send a packet. • 2. The per-flow service is changed to per-class service. The router routes the packet based on the class of service defined in the packet, not the flow. This solves the service-type limitation problem. 24-16 Differentiated Service (Diffserv) • • • • • In Diffserv, each packet contains a field called the DS field. The value of DS field is set at the boundary of the network by the host or the first router designated as the boundary router. Ds filed replace the existing TOS (type of service) field in IPv4 or the class field in IPv6 DS field contains two subfields: – DSCP (DS Code Point) is a 6-bit field that define per-hop behavior (PHB) – CU (currently unused) is 2-bit • The Diffserv capable node (router) uses the DSCP 6 bits as an index to table defining the packet-handling 24-17 Per-hop Behavior (PHB) • Diffserv defines three PHBs • DE PHB (default PHB) is the same as best-effort delivery • EF PHB (expedited forwarding PHB) provides the following services: – Low loss, low latency, ensured bandwidth • AF PHB (assured forwarding PHB) delivers the packet with a high assurance as long as the class traffic does not exceed the traffic profile of the node 24-18 Traffic Conditioner • • • • Meter checks to see if the incoming flow matches the negotiated traffic profile Marker can re-mark a packet with best-effort delivery or down-mark a packet based on the meter information; no up-mark Shaper use the meter information to reshape the traffic if not compliant with the negotiated profile. Dropper, like a shaper with no buffer, discard packets if the flow severely violates the profile 24-19