Michael McNamara https://blog.michaelfmcnamara.com technology, networking, virtualization and IP telephony Sat, 23 Jul 2016 12:30:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 Quality of Service and Traffic Shaping on Cisco Routers https://blog.michaelfmcnamara.com/2016/07/quality-of-service-and-traffic-shaping-on-cisco-routers/ Sat, 23 Jul 2016 12:30:46 +0000 https://blog.michaelfmcnamara.com/?p=5807 You have 1Gbps access with 100Mbps port on our WAN link… are you sure you have your router configured properly?

A year ago I was asked to investigate why VoIP calls were experiencing poor audio quality across an AT&T AVPN (Ethernet to MPLS) WAN link. After some research and examining the router configuration and logs I realized that the router had never been configured properly to support the 1Gbps access and 100Mbps port. While the router was physically connecting to the AT&T Cisco ONS via 1Gbps, AT&T was only allowing 100Mbps worth of traffic to pass through that connection. In this specific case traffic shaping wasn’t setup to properly limit the amount of traffic through the interface. I also found some occasions in the router logs where the BGP session was flapping due to BFD packets being lost between our router and AT&T’s router, again because QoS and traffic shaping hadn’t been setup properly on the Cisco router and the traffic was bursting well past the 100Mbps allocated from AT&T and that traffic was being dropped by AT&T.

The solution was to chain multiple policies together, first the traffic shaping policy and then the QoS policy. Here’s an example configuration I use on an AT&T AVPN 1Gbps Access with 100Mbps Port with 4 CoS queues assigned at 20% RT, 60/30/10. You need to shape the traffic to 100Mbps and then apply the QoS policies once you’ve shaped the traffic.

class-map match-any COS1
  description REAL-TIME VOICE
  match precedence 5
class-map match-any COS2
  description STREAMING VIDEO
  match precedence 4 6 7
class-map match-any COS3
  description CALL SIGNALLING
  match precedence 2 3
class-map match-any COS4
  description BEST EFFORT
  match precedence 0 1

policy-map QOSPOLICY
  description ATT Profile 113 20%RT/60/30/10
  class COS1
    priority 20000
  class COS2
    bandwidth remaining percent 60
  class COS3
    bandwidth remaining percent 30
  class class-default
    fair-queue

policy-map SHAPEPOLICY
  class class-default
    shape average 100000000
    service-policy QOSPOLICY

interface GigabitEthernet0/1
  bandwidth 100000
  ip address 10.x.x.x 255.255.255.252
  service-policy output SHAPEPOLICY

With this configuration in place the BFD keepalives stopped tripping false positives on the BGP session and VoIP packets were no longer getting starved for the bandwidth they needed.

Cheers!

]]>