QoS – Limiting Link Utilization on Cisco Router

qos

I´ve the following setup:

ISP-ROUTER+——-+ My-ROUTER +——-+ …

The available bandwidth between ISP-Router and MY-ROUTER is 50Mbps.
The Physical link is 1000Mpbs. All above 50Mbps result in additional costs.

The plan is to limit the traffic.
With the following config the upload traffic is shaped and limited to 50Mbps.

policy-map QOS_TO_ISP
class class-default
shape average 50000000
!
interface GigabitEthernet0/0
[...]
service-policy output QOS_TO_ISP
!

I tested it and it worked. But how i can limit the download traffic?
Sure, i could police the traffic in input direction so all traffic above the limit will be dropped from MY-ROUTER, but nevertheless this will not prevent the ISP Router to sent traffic above 50Mbps which will result in additional cost, is this correct?

Best Answer

Most of Internet traffic is TCP.

TCP has a mechanism to prevent congestion, the sliding window.

So if you drop exceeding inbound traffic on the router, the receiving host in your network will tell the emitter to reduce it's sending rate and the effective incoming bandwidth usage will be reduced.

This is off course not true for non-TCP traffic (mostly UDP).

In such cases, there's usually a percentile rule.

In my company, we do have the same setup, with 10Gbs physical links and we pay for only 1Gbs, with a 95% percentile rule.

I.E. we can burst traffic to 10Gbs, it it happens less than 5% of the time we don't pay for this traffic.
The additional fee only occur if we use more than 1gbs for more than 5% of the time.

Additionally if you shape the traffic to something a little bit smaller than 50Mbps you leave more room for incoming UDP traffic.

In my case, with the traffic shaping put in place on our routers, we never had additional fee in 3 years, but admittedly, it is far easier to go over 50Mbs second than 1gbs, so this is much more likely to happen in your case.

You need to verify with your ISP if you have such a percentile rule in place. If not, you need to ask them to shape the traffic their side.