1 / 81

Traffic Shaping and Policing

Traffic Shaping and Policing. Objectives. Upon completing this module, you will be able to: Describe and configure generic traffic shaping (GTS) Describe and configure Frame Relay traffic shaping (FRTS) Describe and configure committed access rate (CAR)

boyce
Download Presentation

Traffic Shaping and Policing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Traffic Shaping and Policing

  2. Objectives • Upon completing this module, you will be able to: • Describe and configure generic traffic shaping (GTS) • Describe and configure Frame Relay traffic shaping (FRTS) • Describe and configure committed access rate (CAR) • Name other mechanisms that support traffic shaping and policing (class-based policing and class-based shaping) Inner Mongolia University

  3. Traffic Shaping and Policing Overview

  4. Objectives • Upon completing this lesson, you will be able to: • Describe the need for implementing traffic policing and shaping mechanisms • List traffic policing and shaping mechanisms available in Cisco IOS • Describe the benefits and drawbacks of traffic shaping and policing mechanisms Inner Mongolia University

  5. Traffic shaping and policing mechanisms are used to rate-limit traffic classes. They have to be able to classify packets and meter their rate of arrival. Traffic shapingdelays excess packets so that they stay within the rate limit. Traffic policing typically drops excess traffic so that it stays within the limit; alternatively, it can remark excess traffic. Traffic Shaping and Policing Meter Classifier Marker Dropper Traffic Stream Inner Mongolia University

  6. Why Use Rate Limiting? • To handle congestion at ingress to ATM/Frame Relay network with asymmetric link bandwidths • To limit access to resources when high-speed access is used but not desired • To limit certain applications or classes • To implement a virtual TDM system Inner Mongolia University

  7. Typical Traffic Shaping or Policing Applications Low-Speed Link High-Speed Link WAN Output interface isnot congested; queuing andWRED do not work. Congestion in WAN network results innonintelligentLayer 2 drops. 256 kbps A virtual TDM or leased line is implementedover a single physical link on one side Access to resources is limited. 64 kbps FastEthernet 128 kbps Server Farm Internet Inner Mongolia University

  8. Shaping vs. Policing • Benefits of shaping: • Shaping does not drop packets. • Shaping supports interaction with Frame Relay congestion indication. • Benefits of policing: • Policing supports marking. • Buffer usage is not increased (shaping requires an additional queuing system). Inner Mongolia University

  9. Routers use the token bucket mathematical model to keep track of packet arrival rate. The token bucket model is used whenever a new packet is processed. The return value is conform or exceed. How Do Routers Measure Traffic Rate? Bandwidth Link Bandwidth Exceeding Traffic Rate Limit Conforming Traffic Time Inner Mongolia University

  10. 500 bytes Conform Action Token Bucket 700 200 500 bytes Inner Mongolia University

  11. Exceed Action 300 bytes Token Bucket (cont.) 200 300 bytes Inner Mongolia University

  12. Bc is normal burst size (specifies sustained rate) Be is excess burst size (specifies length of burst) Token Bucket Be Link BW Bc of tokens is added every Tc [ms] Tc = Bc / CIR Link Utilization Bc Bc Bc Bc Bc Bc Average BW (CIR) Time Tc 2*Tc 3*Tc 4*Tc 5*Tc Bc + Be Inner Mongolia University

  13. Traffic Shaping and Policing Mechanisms • Shaping mechanisms: • Generic traffic shaping (GTS) • Frame Relay traffic shaping (FRTS) • Class-based shaping • Policing mechanisms: • Committed access rate (CAR) • Class-based policing Inner Mongolia University

  14. Summary • Upon completing this lesson, you should be able to: • Describe the need for implementing traffic policing and shaping mechanisms • List traffic policing and shaping mechanisms available in Cisco IOS • Describe the benefits and drawbacks of traffic shaping and policing mechanisms Inner Mongolia University

  15. Lesson Review • How do shaping and policing mechanisms keep track of the traffic rate? • Which shaping mechanisms are available with Cisco IOS software? • Which policing mechanisms are available with Cisco IOS software? • What are the main differences between shaping and policing? Inner Mongolia University

  16. Generic Traffic Shaping

  17. Objectives • Upon completing this lesson, you will be able to: • Describe the GTS mechanism • Describe the benefits and drawbacks of GTS • Configure GTS on Cisco routers • Monitor and troubleshoot GTS Inner Mongolia University

  18. Can shape multiple classes (classification) Can measure traffic rate of individual classes (metering) Delays packets of exceeding classes (shaping) Generic Traffic Shaping Meter Shaper Classifier Marker Dropper Traffic Stream Inner Mongolia University

  19. GTS Building Blocks Shaping Forwarder Classifier Yes No WFQ No No Shaping Classifier Yes Yes WFQ No Yes Shaping Classifier Yes No WFQ Yes Physical Interface Queue(s) No Inner Mongolia University

  20. GTS Overview • GTS is multiprotocol. • GTS uses WFQ for the shaping queue. • GTS can be implemented in combination with any queuing mechanisms: • FIFO queuing • Priority queuing (PQ) • Custom queuing (CQ) • Weighted fair queuing (WFQ) • GTS works on output only. Inner Mongolia University

  21. The software queue may have no function if the sum of all shaping rates is less than the link bandwidth. GTS Implementation Dispatches packets at configured rate Dispatches packets at line rate Dispatches packets at line rate Shaping Queue (WFQ) Software Queue (FIFO, PQ, CQ, WFQ, ...) Hardware Queue (FIFO) Bypasses the software queue if it is empty and there is room in the hardware queue Inner Mongolia University

  22. Configuring GTS Router(config-if)# traffic-shape rate bit-rate [burst-size [excess-burst-size]] • Enables traffic shaping of all outbound (sub)interface traffic • In IOS versions prior to 11.2(19) and 12.0(4), optimum switching is disabled on all interfaces if traffic shaping is enabled on any interface Inner Mongolia University

  23. Configuring GTS (cont.) Router(config-if)# traffic-shape rate bit-rate [burst-size [excess-burst-size]] • Bit rate: average traffic rate in bps (equivalent to Frame Relay CIR) • Burst size: amount of traffic sent in a measurement interval in bits (equivalent to Frame Relay Bc) • Default value: 1/8 of bit rate Inner Mongolia University

  24. Configuring GTS (cont.) Router(config-if)# traffic-shape rate bit-rate [burst-size [excess-burst-size]] • Excess burst size: amount of excess traffic that can be sent during the first burst in bps (equivalent to Frame Relay Be) • Default value: no excess burst • Measurement interval (Tc): computed from bit rate and burst size • Tc smaller than 25 ms is rejected: Tc greater than 125 ms is reduced Inner Mongolia University

  25. Configuring GTS (cont.) Router(config-if)# traffic-shape group access-listbit-rate [burst [excess-burst]] • Traffic-shape group shapes outbound traffic matched by the specified access list. • Several traffic-shapegroupcommands can be configured on the same interface. • The traffic-shape rateand traffic-shape groupcommands cannot be mixed on the same interface. • A separate token bucket and shaping queue is maintained for each traffic-shape group command. • Traffic not matching any access list is not shaped. Inner Mongolia University

  26. GTSExample #1 • An ISP wants to sell a service in which a customer may use all of an E1 line for 30 seconds in a burst, but on a long-term average is limited to 256 kbps. • GTS parameters: • Bit rate: 256,000—output rate is 256,000 bps • Burst size—32,000 the number of bits sent in 125 ms • Excess burst size: 61,440,000 = 2,048,000 x 30 Inner Mongolia University

  27. GTSExample #1 (cont.) WAN Core Customer interface ethernet0/0 traffic-shape rate 256000 32000 61440000 ! interface serial1/0 traffic-shape rate 256000 32000 61440000 • Because the ISP wants to control the total amount of load,the configuration would be done on both the inbound and outbound interfaces. Inner Mongolia University

  28. GTSExample #2 WAN Core Customer interface ethernet 0/0 traffic-shape group 101 64000 interface serial 1/0 traffic-shape group 101 64000 ! access-list 101 permit tcp any any eq www • The customer wants to be sure that web traffic will never use more than 64 kbps. Inner Mongolia University

  29. Router#show traffic-shape access Target Byte Sustain Excess Interval Increment Adapt I/F list Rate Limit bits/int bits/int (ms) (bytes) Active Se3/3 100000 2000 8000 8000 80 1000 - Monitoring GTS Router(config)# show traffic-shape • Displays current traffic shaping configuration MAX = (Bc + Be)/8 Be Bc = Tc * CIR Do we listen to FECN/BECN? CIR Bc Tc=Bc/CIR Inner Mongolia University

  30. Router#show traffic-shape statistics Access Queue Packets BytesPackets Bytes Shaping I/F List Depth Delayed Delayed Active Se3/3 77 16091 3733112 414 96048 yes Monitoring GTS (cont.) Router(config)# show traffic-shape statistics • Displays traffic shaping statistics Number of packets/bytes sent on the interface Subset of the previous number of packets/bytes delayed via the WFQ queue Depth of the associated WFQ queue for delayed packets Inner Mongolia University

  31. router#show traffic-shape queue Traffic queued in shaping queue on Serial0 (depth/weight) 1/4096 Conversation 254, linktype: ip, length: 232 source: 1.1.1.1, destination: 1.1.2.47, id: 0x0001, ttl: 208, TOS: 0 prot: 17, source port 11111, destination port 22222 Monitoring GTS (cont.) Router(config)# show traffic-shape queue • Displays the shaping queue contents Inner Mongolia University

  32. GTS on Frame Relay Interfaces • GTS can be implemented on any type of (sub)interface. • GTS supports additional features when implemented on Frame Relay interfaces: • Adaptation to Frame Relay congestion notification • BECN-to-FECN reflection • FECN creation on congestion Inner Mongolia University

  33. Frame Relay Refresher • Frame Relay explicit congestion notification • FECN (Forward explicit congestion notification) • BECN (Backward explicit congestion notification) • CLLM (Consolidated link layer management) • Implicit congestion notification • Network discards detected by end user at higher layers • DE (discard eligibile) bit Inner Mongolia University

  34. Frame Relay FECN/BECN Congestion Control Same Virtual Circuit (VC) Switch monitors all transmit queues for congestion. Receiver Sender Frame 1FECN Frame 1 Frame Relay Switch No Congestion This Side Congestion This Side Frame 2BECN Frame 2 • Frame Relayswitch detects congestion on output queue and informs: • The receiver, by setting the FECN bit on forwarded frames • The source, by setting the BECN bit on frames going in the opposite direction Inner Mongolia University

  35. GTS Frame Relay Congestion Adaptability • On a Frame Relay (sub)interface, GTS can adapt dynamically to available Frame Relay bandwidth by integrating BECN signals: • The GTS bit rate is reduced when BECN packets are received in order to reduce the data flow through the congested Frame Relay network. • Adaptation is done on a per- (sub)interface basis. • The GTS bit rate is gradually increased when the congestion is no longer present (no BECN packets are received anymore). Inner Mongolia University

  36. GTS Frame Relay Congestion Adaptability Mechanisms • Bit-rate adaptation: • The traffic shaping bit rate is reduced when a packet with a BECN bit is received in the Tc . • The traffic shaping bit rate is increased if no BECN bits were received in the Tc . • FECN-to-BECN propagation: • A test packet with a BECN bit set is sent to the sender if a packet with an FECN bit set is received. Inner Mongolia University

  37. Inc An Example of BECN Integration BECN 9000 BECN Integration 8000 BECN 7000 6000 Inc Added Every Tc in the Token Bucket 5000 4000 traffic-shape rate 64000 8000 8000traffic-shape adaptive 32000 BECN received at Tc#1 and Tc#3 Hypothesis: no idle traffic 3000 2000 1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 Time Represented in Units of Tc Inner Mongolia University

  38. Congestion FECN-to-BECN Propagation Receiver Sender FECN Frame Relay Switch BECN in Q.922Test If there is no reverse traffic, the switch is not able to set BECN in frames going back to sender. Inner Mongolia University

  39. Configuring Bit-Rate Adaptation Router(config-if)# traffic-shape adaptive [bit-rate] • Configures traffic shaping Frame Relay bit-rate adaptation • bit-rate—lowest bit rate the traffic is shaped to in response to continuous BECN signals • Default: one-half the specified traffic shaping rate • Traffic shaping has to be enabled Inner Mongolia University

  40. Configuring FECN-to-BECN Propagation Router(config-if)# traffic-shape fecn-adapt • Configures the router to send Frame Relay TEST message with BECN bit set in response to receiving a frame with FECN bit set • Can be used without adaptive traffic shaping Router(config-if)# traffic-shape fecn-create • Sets FECN bit in all outgoing packets that have been delayed due to traffic shaping • Use for debugging/simulation only Inner Mongolia University

  41. GTS Frame Relay Adaptation Design • Conservative scenario: • Set shaping rate to CIR • Set minimum rate to MIR (or one-half CIR) • Optimistic scenario: • Set shaping rate to EIR • Set minimum rate to CIR • Realistic scenario: • Set shaping rate to EIR • Set minimum rate to MIR (or one-half CIR) Inner Mongolia University

  42. GTS Frame Relay Adaptation Example WAN Core interface serial0/0 traffic-shape rate 64000 8000 8000 traffic-shape adaptive 48000 Customer • EIR = 64 kbps • CIR = 48 kbps • Assumption:Frame Relay network is usually not congested. Inner Mongolia University

  43. Summary • Upon completing this lesson, you should be able to: • Describe the GTS mechanism • Describe the benefits and drawbacks of GTS • Configure GTS on Cisco routers • Monitor and troubleshoot GTS Inner Mongolia University

  44. Lesson Review • What software queuing mechanisms are supported in combination with GTS? • Which queuing structure does GTS use? • What features does GTS include when it is used on Frame Relay interfaces? Inner Mongolia University

  45. Committed Access Rate

  46. Objectives • Upon completing this lesson, you will be able to: • Describe the CAR mechanism • Describe the benefits and drawbacks of CAR • Describe the differences between CAR, GTS, and FRTS • Configure CAR on Cisco routers • Monitor and troubleshoot CAR Inner Mongolia University

  47. Primarily intended for rate limiting Can be used on inbound and outbound traffic Does not queue (delay) packets Can also mark packets Can be implemented for differentiated marking Committed Access Rate Meter Inbound or Outbound Classifier Marker Dropper Inner Mongolia University

  48. CAR on input is processed just before forwarding (most other QoS mechanisms are processed before CAR). CAR on output is processed immediately after forwarding (most other QoS mechanisms are processed after CAR). CAR on Input and Output Meter Dropper Classifier Marker Inbound Forwarding Outbound Meter Queuing Classifier Marker Dropper Inner Mongolia University

  49. The software queue may have no function if the sum of all CAR rates is less than the link bandwidth. CAR Implementation Dispatches packets at configured rate Dispatches packets at line rate Dispatches packets at line rate Software Queue (FIFO, PQ, CQ, WFQ, ...) Hardware Queue (FIFO) CAR Bypasses the software queue if it is empty and there is room in the hardware queue Inner Mongolia University

  50. Interface-Wide CAR Diagram drop Class 1? transmit CAR continue drop Output Queue or Forward Class 2? transmit CAR continue drop Class n? transmit CAR • CAR has three different actions: • Transmit • Continue • Drop Inner Mongolia University

More Related