Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

QOS base on IP or VLAN


I'm currently researching QOS for a user who currently has 2M WAN link and would like to allocate 1M of the bandwidth sharing between 2x VLAN/IP and the remaining 1M sharing between the rest of the 20x other VLANs.

Im new with QOS and found that MQC may provide the solution.

Please confirm.

Thanks again.


Re: QOS base on IP or VLAN


Thats right! You can use QMC to provide the required solution.

For the concepts of bandwidth reservations, refer :

You will have to use the config like following:

class-map vlan2

match vlan 2

Policy-map test

class vlan 2

bandwidth 1000000

Apply the policymap on the interface in outpit direction.



Re: QOS base on IP or VLAN


you can refer the below config to start with.

access-list 100 permit ip x.x.x.0 any

access-list 100 permit ip y.y.y.0 any

access-list 101 permit ip z.z.z.0 any


class-map data1

match access-group 100

class-map data2

match access-group 101


policy-map qos-policy

class data1

bandwidth percent 50

class data2

bandwidth percent 50


interface Serial 0/0

service-policy output qos-policy


x.x.x0/y.y.y.0/z.z.z.0 - represents the subnet being used in your Vlan.


New Member

Re: QOS base on IP or VLAN


Many thanks for both replies, I will set up the config soon this afternoon and test.

I've also read somewhere in this forum that this type of policy will only apply itself when the WAN is congested and then the QOS starts to apply the policy during this period. Is this correct?



Re: QOS base on IP or VLAN


To be more specific, queuing will be applied to the traffic only when the interface is congested. If the interface has enough bandwidth to send the traffic, there is no point in queuing; is it? But any policying marking/classification will take place irrespective whether the interface is congested or not.

In your case, the parent policy will shape the Traffic to 2M. Now, if the total traffic for that interface is not exceeding 2M, there is no point in queueing. So if 1.5M of vlan2X traffic is coming and only .3M of other vlans, all traffic will be sent through, as there is no congestion and so no necessity to drop traffic.

So traffic from one class can use the bandwidth of other class if it is available. But if traffic from both classes is coming exceeding the bandwidth reservations of the class, then the mun. b/w comes into the picture. So the bandwidth specified in the class, is actually the min. bandwidth guaranteed for the class, which can be exceeded if unused bandwidth is available in other class.

So if you want to restrict your vlan2X traffic only to 1M, so that it never exceeds 1M even if bandwidth is available in outher class, you would have to police the traffic to 1M in addition to giving the bandwidth statement which will guarantee the bandwidth for the class.

Hope this makes things clear.



(Please rate helpful posts)

New Member

Re: QOS base on IP or VLAN

Thanks everyone for the advise.

You guys are tops and all this makes sense now. I love this forum...