Skip to main content

Traffic Policing and Shaping Configuration


Traffic Policing and Shaping Configuration

Both the Traffic policing and Class-based traffic shaping features are implemented using the MQC. The MQC is used to classify traffic by defining a traffic class, set traffic policy by defining a traffic policy (where policing and shaping is implemented) and is assigned to a specific interface.
Setting Up Traffic Classification

The first step involves traffic classification setup; traffic that is matched to a specific class can have a number of different actions taken against it. For the purposes of this article, the action to be taken will be to police or shape the matched traffic. 

Setting Up a Traffic Policy

The second step involves traffic policy setup; the traffic policy is where specific actions can be configured. As stated before, in the context of this article, this is where the traffic policing and shaping are configured.
Setting Up Assignment of the Configured Traffic Policy onto a Specific Interface

The third step involves assigning the configured traffic policy onto a specific interface. In the context of this article, the interface that is assigned will implement the traffic policing or shaping feature configuration.
Traffic Policing Configuration

The Traffic policing feature uses the police command to implement a specific policing policy. The command is used within the configuration of a traffic policy as stated earlier. The following commands are used to create a traffic policy and implement the Traffic policing feature:

router#configure terminal

router(config)#policy-map policy-map-name

router(config-pmap)#class {class-name | class-default}

router(config-pmap-c)#police bps [burst-normal] [burst-max] conform-action action exceed-action action [violate-action action]

The bps parameter configures the allowed traffic rate and is specified in bits per second; if the traffic is within this allowed traffic rate, then the conform action is taken, if not the exceed action is taken. The Traffic policing feature enables the use of a single or dual token bucket implementation. When implementing a dual token bucket implementation, the violate action is specified. The violate action is taken when traffic violates not only the traffic rate and the normal burst, but also violates the configured maximum burst. There are a number of different actions that can be configured, the most common ones include transmit and drop.
Traffic Shaping Configuration

The Class-based traffic shaping feature uses the shape command to implement a specific shaping policy. While it is possible to use other queuing mechanisms, by default the weighted fair queuing (WFQ) mechanism is used. As stated before, the main difference between traffic policing and shaping is that when shaping, non-conforming traffic is placed into a queue and is allowed to be transmitted based on the status of that queue.

As with traffic policing above, class-based traffic shaping is implemented using MQC and is implemented using a traffic policy in the same way. The following commands are used to create a traffic policy and implement class-based traffic shaping:

router#configure terminal

router(config)#policy-map policy-map-name

router(config-pmap)#class {class-name | class-default}

router(config-pmap-c)#shape {average | peak} mean-rate [burst-size] [excess-burst-size]

There are two different mechanisms that can be used by the class-based traffic feature that affect how traffic is transmitted: average rate shaping and peak rate shaping; these will be explained shortly. The mean-rate parameter configures the allowed traffic rate and is specified in bits per second. The burst-size parameter is used to configure the optional committed burst size and is specified in bits. The excess-burst-size parameter is used to configure the optional excess burst size and is specified in bits.

To explain the different shaping mechanisms, using average rate shaping, traffic is transmitted based on the configured mean-rate and is limited to this rate on average. Peak rate shaping allows traffic to be passed at a higher rate based on the following calculation:

peak rate = mean rate(1 + Be (excess-burst) / Bc (burst)

While peak rate allows higher burst and rate capability, it also has a higher likelihood of being dropped by other elements in the network which are not expecting this traffic rate.

Popular posts from this blog

HOW TO EDIT THE BCD REGISTRY FILE

The BCD registry file controls which operating system installation starts and how long the boot manager waits before starting Windows. Basically, it’s like the Boot.ini file in earlier versions of Windows. If you need to edit it, the easiest way is to use the Startup And Recovery tool from within Vista. Just follow these steps: 1. Click Start. Right-click Computer, and then click Properties. 2. Click Advanced System Settings. 3. On the Advanced tab, under Startup and Recovery, click Settings. 4. Click the Default Operating System list, and edit other startup settings. Then, click OK. Same as Windows XP, right? But you’re probably not here because you couldn’t find that dialog box. You’re probably here because Windows Vista won’t start. In that case, you shouldn’t even worry about editing the BCD. Just run Startup Repair, and let the tool do what it’s supposed to. If you’re an advanced user, like an IT guy, you might want to edit the BCD file yourself. You can do this

DNS Scavenging.

                        DNS Scavenging is a great answer to a problem that has been nagging everyone since RFC 2136 came out way back in 1997.  Despite many clever methods of ensuring that clients and DHCP servers that perform dynamic updates clean up after themselves sometimes DNS can get messy.  Remember that old test server that you built two years ago that caught fire before it could be used?  Probably not.  DNS still remembers it though.  There are two big issues with DNS scavenging that seem to come up a lot: "I'm hitting this 'scavenge now' button like a snare drum and nothing is happening.  Why?" or "I woke up this morning, my DNS zones are nearly empty and Active Directory is sitting in a corner rocking back and forth crying.  What happened?" This post should help us figure out when the first issue will happen and completely avoid the second.  We'll go through how scavenging is setup then I'll give you my best practices.  Scavenging s

AD LDS – Syncronizing AD LDS with Active Directory

First, we will install the AD LDS Instance: 1. Create and AD LDS instance by clicking Start -> Administrative Tools -> Active Directory Lightweight Directory Services Setup Wizard. The Setup Wizard appears. 2. Click Next . The Setup Options dialog box appears. For the sake of this guide, a unique instance will be the primary focus. I will have a separate post regarding AD LDS replication at some point in the near future. 3. Select A unique instance . 4. Click Next and the Instance Name dialog box appears. The instance name will help you identify and differentiate it from other instances that you may have installed on the same end point. The instance name will be listed in the data directory for the instance as well as in the Add or Remove Programs snap-in. 5. Enter a unique instance name, for example IDG. 6. Click Next to display the Ports configuration dialog box. 7. Leave ports at their default values unless you have conflicts with the default values. 8. Click N