cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
948
Views
6
Helpful
8
Replies

Traffic shaping for downstream and upstream traffic.

**Hamid**
Level 1
Level 1

Hi,

as far as I understood, when we apply the traffic shaping on an Interface the traffic shaping will be applied on the downstream traffic, is my understanding correct?

when I want to apply the traffic shaping for both downstream and upstream traffic, what should I have to do ?

8 Replies 8

Joseph W. Doherty
Hall of Fame
Hall of Fame

Shaping is an egress only feature.

Unclear what you consider upstream or downstream, although commonly downstream is toward the edge of a network while upstream is the opposite.  If used as just noted, shaping might be used for either upstream or downstream.

for example I have an internet connection with bandwidth of 75Mbps download and 30 Mbps upload. If I configure traffic shaping on my router as below

Router# shape average 30000000

will this be applied on egress traffic (upload) ? or both download and upload? what if i would like to have traffic shaping for download traffic too?

As @Joseph W. Doherty mentioned its only applied to the egress traffic of an interface so it would only affect your upload speed. If you want to control download speed (which you probably dont unless your interface cant handle it) is to apply a policing policy inbound.

 

-David


@**Hamid** wrote:

for example I have an internet connection with bandwidth of 75Mbps download and 30 Mbps upload. If I configure traffic shaping on my router as below

Router# shape average 30000000

will this be applied on egress traffic (upload) ? or both download and upload? what if i would like to have traffic shaping for download traffic too?


It would only be applied for egress, on your interface connecting to the Internet.

You want to do this why?  (There are good reasons, but understanding them, can be important for using shaping.)

BTW, unless you have a later IOS that can allow for L2 overhead, you want to shape about 15% slower than your nominal bandwidth.

As to shaping for ingress traffic from Internet, that might be accomplished on a LAN facing interface, or as suggested by @David Ruess, you might police (policers can be used for both ingress and egress, but its impact to traffic is "different" from a shaper).  Also, as David asks, why would you do this?

David Ruess

let me ask another question, 

if I use traffic policing (Dual rate, three-color) for limiting the egress and ingress traffic (as far as I know Dual rate, three-color Method can also buffer the traffic), do you think this method is a good method or should I Combine traffic shaping for egress with traffic policing for ingress traffic ?

Dual rate, 3 color, can be used with a policer or shaper.  Policing does not buffer any traffic.

Seldom is there a need to police ingress traffic, unless you're enforcing a bandwidth limit, as your ISP might be doing to you.

Unlikely there's any good reason for you to police ingress traffic from the Internet.  There are some extreme cases, excluding contracted bandwidth, but those often require expert QoS knowledge to understand and configure (and their effectiveness is often not nearly as good as managing the other side's egress).

Again, shaping egress has some useful reasons for doing so, but also again, do you know them?  Reason I ask, if ISP only allows 30 Mbps "up" and you shape for 30 Mbps "up" what do you expect to accomplish?  30 Mbps is still 30 Mbps, right?  (It is and it isn't, it's somewhat an advanced QoS subject.)

Anyway, I'll describe 3 good reasons to use a shaper in a case like yours.

1), it can make it easier for you to know you're exceeding your "up" bandwidth, including by how much and how often.  Otherwise, you submit traffic to ISP at 100 Mbps (correct?) and it's somewhat "invisible", to you, your ISP's treatment of overrate traffic.  (Keep in mind, ideally, with a shaper, your ISP will no longer see any overrate traffic.)

2), assuming ISP is policing the 30 Mbps, a shaper provides a chance that traffic that would be dropped by a policer will not be dropped.  If you're wondering, how so, whether using a policer or shaper, on a 100 Mbps interface, traffic is physically always sent at 100 Mbps, so how do we get a lessor "upload" speed?

Both a policer or shaper "count" volume of traffic transmitted during some time period.  So for 30 Mbps, if the transmission of 100 Mbps is for more than 30% of the measured time period, the overrate/excess traffic is subject to policer/shaper enforcement.  For a policer, overate traffic is dropped.  For a shaper, overrate traffic is queued.  Since a shaper queues excess traffic, if the shaping queue doesn't overflow, it's possible, later time periods that don't hit their maximum usage, can dequeue traffic, up to their time period's maximum.

3), since a shaper queues excess traffic, we can "manage" shaper queued traffic.  For example, we can select dequeuing and/or dropping priorities.

Of the 3 reasons, above, their benefits generally increase sequentially, too, but how beneficial they are is much dependent on the actual case.  For example, if your upload traffic never exceeds 30% measured time period utilization, none of the above would offer any benefit.  Conversely, if you want to do VoIP and/or multiplayer on-line games concurrently with a cloud backup of your PC, you likely very, very much benefit from the #3, above.

What @Joseph W. Doherty said haha. I know enough QoS to be less dangerous than others but not to that extent.


@David Ruess wrote:

What @Joseph W. Doherty said haha. I know enough QoS to be less dangerous than others but not to that extent.


Well I'll confess to knowing enough QoS to be dangerous, even very dangerous.  Laugh, at one company I was working at, the lead WAN engineer considered me to be a "mad scientist", as my QoS focus was principally focused on the WAN links, WAN covering both USA and international links.

Anyway, spent about half my time, over 10 years, "perfecting" my QoS approaches.  I learned a whole lot about effective QoS in the real-world reality school, which doesn't often too well match "book" QoS.

Just remember, when it comes to QoS, I'm a legend in my own mind.  ; )