07-05-2017 05:56 AM
Hi Guys,
Just a quick question about my VoiP config and a Cisco 881. I am assigning a 500kbps priority queue for voip traffic which is 5mbps. I'm applying it outbound onthe WAN interface and also using a parent traffic shaper to limit the default class traffic (everything other than voip) to 5mbps - since its a 10 mbps internet connection but the interface is hardcoded 100mbps. Im using the traffic shaper as i don't see how the router works out how much bandwidth is left after its given the Voip class 5mbps
Does this work as intended or will the traffic shaper limit all traffic (default class and voip) to 5mbps?
class-map match-any voip-class
match protocol sip
match protocol rtp
match protocol rtcp
!
policy-map PMAP_LLQ
class voip-class
priority 500
set dscp ef
class class-default
fair-queue
policy-map Shape-5Mb-parent
class class-default
shape average 5000000
service-policy PMAP_LLQ
int f0 <wan
service-policy output Shape-9Mb-parent
Solved! Go to Solution.
07-05-2017 07:54 AM
Hi
Let recap your official value because there're not matching your QoS config.
Your ISP line is 10m. You want to assign 5m to your voice traffic and then all the rest to your default class. Is that right?
If yes, you have 2 simple ways to do that:
Option 1: Using percent
policy-map PMAP_LLQ
class voip-class
priority percent 50
set dscp ef
class class-default
fair-queue
policy-map Shape-10Mb-parent
class class-default
shape average 10000000
service-policy PMAP_LLQInterface f0
service-policy output Shape-10Mb-parent
Output of this config:
sh policy-map interface e0/1
Ethernet0/1Service-policy output: Shape-10Mb-parent
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 10000000, bc 40000, be 40000
target shape rate 10000000Service-policy : PMAP_LLQ
queue stats for all priority classes:
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0Class-map: voip-class (match-all)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: protocol rtp
Match: protocol sip
Match: protocol rtcp
Priority: 50% (5000 kbps), burst bytes 125000, b/w exceed drops: 0
QoS Set
dscp ef
Packets marked 0Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops/flowdrops) 0/0/0/0
(pkts output/bytes output) 0/0
Fair-queue: per-flow queue limit 16 packets
Option 2: Using values
policy-map PMAP_LLQ
class voip-class
priority 5000
set dscp ef
class class-default
fair-queue
policy-map Shape-10Mb-parent
class class-default
shape average 10000000
service-policy PMAP_LLQInterface f0
service-policy output Shape-10Mb-parent
Output of this config:
sh policy-map interface e0/1
Ethernet0/1Service-policy output: Shape-10Mb-parent
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 10000000, bc 40000, be 40000
target shape rate 10000000Service-policy : PMAP_LLQ
queue stats for all priority classes:
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0Class-map: voip-class (match-all)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: protocol rtp
Match: protocol sip
Match: protocol rtcp
QoS Set
dscp ef
Packets marked 0
Priority: 5000 kbps, burst bytes 125000, b/w exceed drops: 0Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops/flowdrops) 0/0/0/0
(pkts output/bytes output) 0/0
Fair-queue: per-flow queue limit 16 packets
Your class-map is using nbar and that's fine if your device support it.
However, if you want to take all UDP traffic regarding voice/video if it's not recognized with the match protocol, you can add an acl and add this acl into your class-map: (for simplicity, I used any any but you can also filter with your subnets if you want)
ip access-list extended voip
permit udp any any range 16384 32767!
class-map match-all voip-class
match protocol rtp
match protocol sip
match protocol rtcp
match access-group name voip
Hope that clarify and answer your question
Thanks
PS: Please don't forget to rate and mark as correct answer if this answered your question
07-05-2017 07:54 AM
Hi
Let recap your official value because there're not matching your QoS config.
Your ISP line is 10m. You want to assign 5m to your voice traffic and then all the rest to your default class. Is that right?
If yes, you have 2 simple ways to do that:
Option 1: Using percent
policy-map PMAP_LLQ
class voip-class
priority percent 50
set dscp ef
class class-default
fair-queue
policy-map Shape-10Mb-parent
class class-default
shape average 10000000
service-policy PMAP_LLQInterface f0
service-policy output Shape-10Mb-parent
Output of this config:
sh policy-map interface e0/1
Ethernet0/1Service-policy output: Shape-10Mb-parent
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 10000000, bc 40000, be 40000
target shape rate 10000000Service-policy : PMAP_LLQ
queue stats for all priority classes:
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0Class-map: voip-class (match-all)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: protocol rtp
Match: protocol sip
Match: protocol rtcp
Priority: 50% (5000 kbps), burst bytes 125000, b/w exceed drops: 0
QoS Set
dscp ef
Packets marked 0Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops/flowdrops) 0/0/0/0
(pkts output/bytes output) 0/0
Fair-queue: per-flow queue limit 16 packets
Option 2: Using values
policy-map PMAP_LLQ
class voip-class
priority 5000
set dscp ef
class class-default
fair-queue
policy-map Shape-10Mb-parent
class class-default
shape average 10000000
service-policy PMAP_LLQInterface f0
service-policy output Shape-10Mb-parent
Output of this config:
sh policy-map interface e0/1
Ethernet0/1Service-policy output: Shape-10Mb-parent
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 10000000, bc 40000, be 40000
target shape rate 10000000Service-policy : PMAP_LLQ
queue stats for all priority classes:
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0Class-map: voip-class (match-all)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: protocol rtp
Match: protocol sip
Match: protocol rtcp
QoS Set
dscp ef
Packets marked 0
Priority: 5000 kbps, burst bytes 125000, b/w exceed drops: 0Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops/flowdrops) 0/0/0/0
(pkts output/bytes output) 0/0
Fair-queue: per-flow queue limit 16 packets
Your class-map is using nbar and that's fine if your device support it.
However, if you want to take all UDP traffic regarding voice/video if it's not recognized with the match protocol, you can add an acl and add this acl into your class-map: (for simplicity, I used any any but you can also filter with your subnets if you want)
ip access-list extended voip
permit udp any any range 16384 32767!
class-map match-all voip-class
match protocol rtp
match protocol sip
match protocol rtcp
match access-group name voip
Hope that clarify and answer your question
Thanks
PS: Please don't forget to rate and mark as correct answer if this answered your question
07-05-2017 08:29 AM
Hi Francesco,
Thanks for that. Yes it should be 10mbps ISP CIR connection but its a 100mbps port. Also yes confirmed i wanted to have 5mbps for voip priority queue and the other 5mbps for everything else.
Just looking at your examples isn't 5000 kbps 5MB's which is 40mbps ?
I have just watched CBT nuggets QoS series Jeremy did a while ago (very good) and noted that he did a very similar example to what im trying to do but he did it slightly different. Basically i created a new class map which contained both the voip class and default class and applied the traffic shaper to this new class map rather than just the default-class as before.
class-map match-any voip-class
match protocol sip
match protocol rtp
match protocol rtcp
class-map match-all ALL_TRAFFIC
match class-map voip-class
match class-map class-default
!
policy-map PMAP_LLQ
class voip-class
priority 500
set dscp ef
class class-default
fair-queue
policy-map Shape-9Mb-parent
class ALL_TRAFFIC
shape average 9000000
service-policy PMAP_LLQ
!
int f0 <wan
service-policy output Shape-9Mb-parent
not sure there is a whole lot of difference?
07-05-2017 08:48 AM
Hi,
Mbps is megabits per second
MBps is megabytes per second
On IOS, when configuring priority or shape the value is in bits per second:
(config-pmap-c)#shape average ?
<1000-154400000> Target Bit Rate (bits/sec). (postfix k, m, g optional;
(config-pmap-c)#priority ?
<1-2000000> Kilo Bits per second
If you say (and I guess that's the value) you have a 10 Mbps then it's 10000 Kbps or 10000000 bps.
Then 5Mbps is 5000 Kbps.
Is that clarify a bit your question?
The new config you wrote on your latest post (from CBT nuggets), says exactly the same thing as your class-map called on your parent policy refers to your personalized class and class-default.
In your example, doesn't matter which one you use, the result is the same.
Thanks
PS: Please don't forget to rate and mark as correct answer if this answered your question
07-05-2017 09:41 AM
Hey,
Yes you are indeed correct 5000 kbps is right - thankyou been a long day!
Just one last thing because this QOS it outbound and there is no inbound QOS upstream via the ISP, it does not protect from a saturated link say somebody downloads a huge file?
Would you look at applying the same shaping policy outbound (policy-map Shape-9Mb-parent) on the LAN interface to balance the upload/download?
07-05-2017 10:11 AM
Hi
You can apply the same policy-map inbound if you want.
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide