| View previous topic :: View next topic |
| Author |
Message |
Mephi Super User

Joined: 12 Feb 2009 Posts: 253
|
Posted: Fri Feb 27, 2009 6:03 am Post subject: Setting up outgoing QoS |
|
|
Hi Guys,
I'm running VC5 as a home router and I'm trying to setup QoS on my uplink
I'm hosting a local game server that runs on port 27015 which I want to give priority to, and also an SSH server that I want to guarantee a minimum service to.
So the interface code I've got is:
| Code: | vyatta@vyatta# show interfaces ethernet eth0
address dhcp
firewall {
local {
name DirectToRouter
}
}
hw-id 00:19:bb:d4:0b:30
qos-policy {
out OutgoingLink
} |
and the Qos Policy is:
| Code: | vyatta@vyatta# show qos-policy traffic-shaper OutgoingLink
bandwidth 750kbit
class 10 {
bandwidth 80%
description "L4D Server"
match Server_Port_27015 {
ip {
source {
port 27015
}
}
}
}
class 20 {
bandwidth 10%
match Server_Port_22 {
ip {
source {
port 22
}
}
}
}
default {
bandwidth 10%
} |
The problem is that while I'm setting this on the outgoing link it seems to throttle downloads. This I assume is due to the uplink throttling the TCP ACKs.
I've shown this by downloading a large file from within my ISP's network and enabling/disabling the traffic shaper command. With it enabled I get a download of 400KB/s with it disabled I get a download of 1800KB/s.
I was under the impression that the traffic shaping only affects packets when the link is utilised by the defined traffic streams, so when the game server isn't sending packets the bandwidth can be used by other services.
If that should be the case, what is wrong with my configuration?
Cheers,
Matt |
|
| Back to top |
|
 |
shemminger Vyatta Employee

Joined: 10 Mar 2008 Posts: 305
|
Posted: Fri Feb 27, 2009 10:42 am Post subject: Trafficshaper is for outgoing traffic |
|
|
The QoS rules you are using are for outgoing traffic only.
Also, the % values are based on link speed. So unless you have a full speed Ethernet
upstream link (100mbit or gigabit)? you probably want to use actual numbers.
One trick to avoid huge upstream ISP queues is to put in a traffic limiter rule
on incoming traffic that is slightly less than the incoming speed. So if you had
a 10mbit connection, put a traffic limiter rule to 9.5 mbit. |
|
| Back to top |
|
 |
Mephi Super User

Joined: 12 Feb 2009 Posts: 253
|
Posted: Fri Feb 27, 2009 11:31 am Post subject: |
|
|
Hi, shemminger. Thanks for your comments.
I understand that the QoS rule is for outgoing packets, but when it is place my download speed is heavily reduced. I can make the download speed bounce up and down by adding and deleting the QoS policy on the interface.
Can you explain why this would be happening as I'm stumped?
Also, what does the following line do?
bandwidth 750kbit
I had assumed this told it what line speed to make it a percentage of.
Cheers,
Matt |
|
| Back to top |
|
 |
shemminger Vyatta Employee

Joined: 10 Mar 2008 Posts: 305
|
Posted: Fri Feb 27, 2009 12:31 pm Post subject: |
|
|
Sorry missed the 750kbit at the top level
Reading your setup, that 10% ie 75kbit/sec of upstream default traffic. You can
look at statistics to see where your packets are being throttled.
By default, QoS is strict and limits to the maximum bandwidth (per class)
You probably want to add "ceiling" values so that any extra bandwidth can
be used. |
|
| Back to top |
|
 |
Mephi Super User

Joined: 12 Feb 2009 Posts: 253
|
Posted: Fri Feb 27, 2009 2:26 pm Post subject: |
|
|
That seems to have fixed it.
I've moved over to kbit instead of percentages and added the celing command and now it works. It was the celing command that did it, I tested after changing to Kbit and it made no difference.
That's a bit odd though, the documentation (Vyatta_PolicyQoSRef_VC5_v02.pdf page 214) says that the default celing value is 100%
For reference (if anyone else has the same problem) I've posted my config below.
Thanks for your help.
Matt
| Code: | vyatta@vyatta# show qos-policy traffic-shaper OutgoingLink
bandwidth 750kbit
class 10 {
bandwidth 600kbit
description "L4D Server"
match Server_Port_27015 {
ip {
source {
port 27015
}
}
}
}
class 20 {
bandwidth 75kbit
match Server_Port_22 {
ip {
source {
port 22
}
}
}
}
default {
bandwidth 75kbit
ceiling 750Kbit
}
[edit]
vyatta@vyatta# show interfaces ethernet eth0
address dhcp
firewall {
local {
name DirectToRouter
}
}
hw-id 00:19:bb:d4:0b:30
qos-policy {
out OutgoingLink
} |
|
|
| Back to top |
|
 |
discsox Forum Newbie

Joined: 14 Mar 2009 Posts: 5
|
Posted: Sat Mar 14, 2009 8:42 pm Post subject: |
|
|
Hi Matt,
Thank you very much for post. This helped me a great deal!!!
I had very similar issues. I enabled QoS for VoIP and as soon as I enabled the traffic-shaper, my regular download speed went from 7Mb/s to 1.5Mb/s which made no sense at all. As soon as I set a ceiling value for the "default" everything started working as expected.
Thanks again. _________________ Cheers,
Marcello |
|
| Back to top |
|
 |
|