This is a very brief look at Generic Traffic Shaping (GTS), Frame Relay Traffic Shaping (FRTS) and Class Based Traffic Shaping. Nothing more, nothing less. You won’t learn the finer points of traffic shaping from this post, but you will see configuration examples of all three so that you’ll know the difference between them when you see them in a config, or if you’re asked to configure a specific type.
No diagrams on this post. I’m not showing you how each work with examples here. What I will do is fire a link at you:
http://www.cisco.com/en/US/docs/ios-xml/ios/qos_regpkt/configuration/12-4t/qos-regpkt-trfc.html#GUID-2735E4BA-1A29-405F-A3FB-CCBE9A981C30
I want you to remember that page for two reasons. First, it has that handy little chart explaining the differences between the three types of traffic shaping. Should you be given the curiously vague traffic shaping task in your lab this handy table may just save your bacon if you don’t know offhand which type is being referred to. The second reason is right below the table is our universal Shaping and Policing equation for CIR, Bc, Be and time. With a little manipulation you can change it to whatever version you require for a given task.
For reference the full path in the DocCD to find that page is:
Products —> Cisco IOS and NX-OS Software —> Cisco IOS —> Cisco IOS Release 12.4 Family —>Cisco IOS Software Releases 12.4—> Configuration Guides —> Quality of Service Solutions Configuration Guide Library, Cisco IOS Release 12.4T —> QoS: Regulating Packet Flow Configuration Guide, Cisco IOS Release 12.4T —> Regulating Packet Flow Using Traffic Shaping
Wooo, that’s a doozy!
And that’s only valid at the time of writing for this post. Cisco likes to rearrange the DoCD, so YMMV.
Enough with the chatter, let’s see some traffic shaping!
First up, GTS. This one is about as basic as you can get.
interface FastEthernet0/0
ip address 10.0.12.1 255.255.255.0
duplex auto
speed auto
traffic-shape rate 64000 8000 8000 1000
!
!
R1#sh traffic-shape
Interface Fa0/0
Access Target Byte Sustain Excess Interval Increment Adapt
VC List Rate Limit bits/int bits/int (ms) (bytes) Active
- 64000 2000 8000 8000 125 1000 -
Simple, straightforward, and low in fat.
Next up is FRTS. This one is a little more involved, and has two different command sets that do the exact same thing. I’m including examples of both versions of the syntax here, each is its own map-class and applied to its own PVC. The verification shows that exactly the same parameters are in place on both PVC’s (and is actually the same as the parameters I used in the GTS example).
map-class frame-relay FRAME
frame-relay traffic-rate 64000 72000
map-class frame-relay ALT_FRAME
frame-relay cir 64000
frame-relay be 8000
!
interface Serial0/0/0
no ip address
encapsulation frame-relay
no keepalive
clock rate 2000000
frame-relay traffic-shaping
!
interface Serial0/0/0.1 point-to-point
ip address 10.0.23.2 255.255.255.0
frame-relay interface-dlci 23
class FRAME
!
interface Serial0/0/0.2 point-to-point
ip address 10.0.32.2 255.255.255.0
frame-relay interface-dlci 32
class ALT_FRAME
!
!
R2#show traffic-shape
Interface Se0/0/0.1
Access Target Byte Sustain Excess Interval Increment Adapt
VC List Rate Limit bits/int bits/int (ms) (bytes) Active
23 64000 2000 64000 8000 125 1000 -
Interface Se0/0/0.2
Access Target Byte Sustain Excess Interval Increment Adapt
VC List Rate Limit bits/int bits/int (ms) (bytes) Active
32 64000 2000 64000 8000 125 1000 -
R2#
Last up is Class Based Traffic Shaping. Again I’m going to give you two examples, but in this case the syntax is the same, it’s just two different “flavours” of shaping: Average and Peak. You’ll find these and other features in the context sensitive (Question Mark) help after the “shape” command inside the policy-map. I'm just using the class-default here, but naturally you can define your own class-maps and shape based on those classes as well.
policy-map SHAPE_PEAK
class class-default
shape peak 64000
policy-map SHAPE
class class-default
shape average 64000 8000 8000
!
interface FastEthernet0/0
ip address 10.0.34.3 255.255.255.0
service-policy output SHAPE
!
interface FastEthernet0/1
ip address 192.168.3.3 255.255.255.0
duplex auto
speed auto
service-policy output SHAPE_PEAK
!
!
R3#sh policy-map interface fastEthernet 0/0
FastEthernet0/0
Service-policy output: SHAPE
Class-map: class-default (match-any)
23 packets, 2280 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 23/2280
shape (average) cir 64000, bc 8000, be 8000
target shape rate 64000
R3#sh policy-map interface fastEthernet 0/1
FastEthernet0/1
Service-policy output: SHAPE_PEAK
Class-map: class-default (match-any)
24 packets, 1440 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 24/1440
shape (peak) cir 64000, bc 256, be 256
target shape rate 128000
Right, now you know what each type of traffic shaping looks like. Go forth and regulate your traffic flows!
Dude... I can beat myself crazy with this stuff and forget it the next day :) It just wont stick.
ReplyDeleteHopefully the INE "QoS" month for the lab will help more with that.
Thanks for the post!!