I am trying to follow the Traffic Shaping guide and do what I thought would be simple traffic shaping. I have a basic 3 interface setup and would like to allocate bandwith to the VoIP device on the network. In my scenario eth2 is connected to internet, and eth1 is connected to zone where VoIP is connected. I am getting an illegal rate error although I believe I have entered the rate using the correct syntax. Can anyone see where I have made my error? Thank You. Here is the config and error in question: shorewall version 3.2.1 Kernel 2.6.13.4 x86_64 grep TC_ENABLED /etc/shorewall/shorewall.conf TC_ENABLED=Internal grep CLEAR_TC /etc/shorewall/shorewall.conf CLEAR_TC=Yes tail /etc/shorewall/tcdevice #INTERFACE IN-BANDWITH OUT-BANDWIDTH eth2 16384kbit 1126kbits tail /etc/shorewall/tcclasses ############################################################################### #INTERFACE MARK RATE CEIL PRIORITY OPTIONS eth2 1 10kbit 50kbit 1 tcp-ack eth2 2 180kbit 360kbit 2 eth2 3 16194kbit full 3 default tail /etc/shorewall/tcrules ############################################################################### #MARK SOURCE DEST PROTO PORT(S) CLIENT USER TEST LENGTH TOS # PORT(S) 1:F 0.0.0.0/0 0.0.0.0/0 icmp echo-request 1:F 0.0.0.0/0 0.0.0.0/0 icmp echo-reply 2:F 10.0.0.100 0.0.0.0/0 all>From ''shorewall restart''Setting up TC Rules... TC Rule 1:F 0.0.0.0/0 0.0.0.0/0 icmp echo-request Added TC Rule 1:F 0.0.0.0/0 0.0.0.0/0 icmp echo-reply Added TC Rule 2:F 10.0.0.100 0.0.0.0/0 all Added Setting up Traffic Control... Illegal "rate" Usage: ... qdisc add ... htb [default N] [r2q N] default minor id of class to which unclassified packets are sent {0} r2q DRR quantums are computed as rate in Bps/r2q {10} debug string of 16 numbers each 0-3 {0} ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O] [prio P] [slot S] [pslot PS] [ceil R2] [cburst B2] [mtu MTU] [quantum Q] rate rate allocated to this class (class can still borrow) burst max bytes burst which can be accumulated during idle period {computed} mpu minimum packet size used in rate computations overhead per-packet size overhead used in rate computations ceil definite upper class rate (no borrows) {rate} cburst burst but for ceil {computed} mtu max packet size we create rate map for {1600} prio priority of leaf; lower are served first {0} quantum how much bytes to serve from leaf at once {use r2q} TC HTB version 3.3 ERROR: Command "tc class add dev eth2 parent 1: classid 1:1 htb rate 1126kbits mtu 1500" Failed Processing /etc/shorewall/stop ... IP Forwarding Enabled Processing /etc/shorewall/stopped ... /sbin/shorewall: line 775: 22085 Terminated $SHOREWALL_SHELL ${VARDIR}/.restart $debugging restart -- ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
Scott Ruckh wrote:> I am trying to follow the Traffic Shaping guide and do what I thought > would be simple traffic shaping. I have a basic 3 interface setup and > would like to allocate bandwith to the VoIP device on the network. In my > scenario eth2 is connected to internet, and eth1 is connected to zone > where VoIP is connected. > > I am getting an illegal rate error although I believe I have entered the > rate using the correct syntax. Can anyone see where I have made my error? > > Thank You. > > Here is the config and error in question: > > shorewall version > 3.2.1 > > Kernel > 2.6.13.4 x86_64 > > grep TC_ENABLED /etc/shorewall/shorewall.conf > TC_ENABLED=Internal > > grep CLEAR_TC /etc/shorewall/shorewall.conf > CLEAR_TC=Yes > > > > tail /etc/shorewall/tcdevice > #INTERFACE IN-BANDWITH OUT-BANDWIDTH > eth2 16384kbit 1126kbits---- -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
This is what you said Tom Eastep> Scott Ruckh wrote: >> I am trying to follow the Traffic Shaping guide and do what I thought >> would be simple traffic shaping. I have a basic 3 interface setup and >> would like to allocate bandwith to the VoIP device on the network. In >> my >> scenario eth2 is connected to internet, and eth1 is connected to zone >> where VoIP is connected. >> >> I am getting an illegal rate error although I believe I have entered the >> rate using the correct syntax. Can anyone see where I have made my >> error? >> >> Thank You. >> >> Here is the config and error in question: >> >> shorewall version >> 3.2.1 >> >> Kernel >> 2.6.13.4 x86_64 >> >> grep TC_ENABLED /etc/shorewall/shorewall.conf >> TC_ENABLED=Internal >> >> grep CLEAR_TC /etc/shorewall/shorewall.conf >> CLEAR_TC=Yes >> >> >> >> tail /etc/shorewall/tcdevice >> #INTERFACE IN-BANDWITH OUT-BANDWIDTH >> eth2 16384kbit 1126kbits > ---- > > -TomAh, yes a SHE (Stupid Human Error). If only I was hooked on phonics. Now on to actually making it work correctly. Thanks for showing me the trees in the forest. Scott ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
Scott Ruckh wrote:> This is what you said Tom Eastep >> Scott Ruckh wrote:>>> tail /etc/shorewall/tcdevice >>> #INTERFACE IN-BANDWITH OUT-BANDWIDTH >>> eth2 16384kbit 1126kbits >> ---- >> >> -Tom > Ah, yes a SHE (Stupid Human Error). If only I was hooked on phonics.FWIW, Shorewall-perl catches this SHE at compile-time. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
This is what you said Tom Eastep>>>> #INTERFACE IN-BANDWITH OUT-BANDWIDTH >>>> eth2 16384kbit 1126kbits >>> ---- >>> >>> -Tom >> Ah, yes a SHE (Stupid Human Error). If only I was hooked on phonics. > > FWIW, Shorewall-perl catches this SHE at compile-time. >Apparently I do not understand traffic shaping, or was not aware of the hit I would take using traffic shaping. My downstream speeds are significantly impacted when I am using traffic shaping. I went from 16Mbps to 10Mbps downstream when using traffic shaping. Here is what I eventually ended up with (see config files below). All I want to do is give VoIP the max bandwidth (180kbit) when needed. All other times I just want the traffic to flow as it did before adding traffic shaping. All of the ''MARK 4'' stuff was added just for more control, it is not really necessary. I do not understand why the downstream speed is so negatively impacted. Is the configuration grossly wrong to be causing such a decrease? Do I need to go back and read the documentation? Any help would be appreciated. Thank You. /etc/shorewall/tcdevices #INTERFACE IN-BANDWITH OUT-BANDWIDTH eth2 16097kbit 1126kbit /etc/shorewall/tcclasses #INTERFACE MARK RATE CEIL PRIORITY OPTIONS eth2 1 100kbit 180kbit 1 tos=0x68/0xfc,tos=0xb8/0xfc eth2 2 full/4 full 2 tcp-ack,tos-minimize-delay eth2 3 full/4 full 3 default eth2 4 full/8 full*8/10 4 /etc/shorewall/tcrules #MARK SOURCE DEST PROTO PORT(S) CLIENT USER TEST LENGTH TOS # PORT(S) 1 10.0.0.100 0.0.0.0/0 all 2 0.0.0.0/0 0.0.0.0/0 icmp echo-request 2 0.0.0.0/0 0.0.0.0/0 icmp echo-reply 4 0.0.0.0/0 0.0.0.0/0 tcp 36161 4 0.0.0.0/0 0.0.0.0/0 udp 36161 4 0.0.0.0/0 0.0.0.0/0 tcp 6881 4 0.0.0.0/0 0.0.0.0/0 udp 6881 4 0.0.0.0/0 0.0.0.0/0 tcp 8741 4 0.0.0.0/0 0.0.0.0/0 udp 8741 On a side note I want to report what I believe are some errors in the documentation related to traffic shapping. On this page: http://www.shorewall.net/manpages/shorewall-tcclasses.html In the Example 1: section there are two columns labeled "MARK". I believe the second one should be labeled "PRIORITY". Next, as I obviously do not have a grasp on traffic shaping, this may or may not be an error. As I see it, the tcclasses and tcrules seem to go hand-in-hand. So in the documentation, I would think that it would make sense to use examples where to two go hand-in-hand. One this Page, http://www.shorewall.net/manpages/shorewall-tcrules.html , the example reads: #MARK/ SOURCE DEST PROTO PORT(S) SOURCE USER TEST #CLASSIFY PORT(S) 1 0.0.0.0/0 0.0.0.0/0 icmp echo-request 1 0.0.0.0/0 0.0.0.0/0 icmp echo-reply RESTORE 0.0.0.0/0 0.0.0.0/0 all - - - 0 CONTINUE 0.0.0.0/0 0.0.0.0/0 all - - - !0 4 0.0.0.0/0 0.0.0.0/0 ipp2p:all SAVE 0.0.0.0/0 0.0.0.0/0 all - - - !0 and on this page, http://www.shorewall.net/manpages/shorewall-tcclasses.html, the example reads: #INTERFACE MARK RATE CEIL MARK OPTIONS ppp0 1 100kbit 180kbit 1 tos=0x68/0xfc,tos=0xb8/0xfc ppp0 2 full/4 full 2 tcp-ack,tos-minimize-delay ppp0 3 full/4 full 3 default ppp0 4 full/8 full*8/10 4 Again, if I understand any of this, these two examples do not seem to correlate. If I am correct, it would be nice to have examples that go together. Thanks. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
Scott Ruckh wrote:> Apparently I do not understand traffic shaping, or was not aware of the > hit I would take using traffic shaping. My downstream speeds are > significantly impacted when I am using traffic shaping. I went from > 16Mbps to 10Mbps downstream when using traffic shaping.Have you tuned the IN-BANDWIDTH setting as described in the documentation.> > Here is what I eventually ended up with (see config files below). All I > want to do is give VoIP the max bandwidth (180kbit) when needed. All > other times I just want the traffic to flow as it did before adding > traffic shaping. > > All of the ''MARK 4'' stuff was added just for more control, it is not > really necessary. > > I do not understand why the downstream speed is so negatively impacted. > Is the configuration grossly wrong to be causing such a decrease? Do I > need to go back and read the documentation? Any help would be > appreciated.As I write in the Warning at the top of the Shorewall Traffic Shaping documentation, you cannot expect to understand Traffic Shaping by simply reading the Shorewall documentation. Shorewall adds very little value over the raw traffic shaping configuration interface using the ''ip'' and ''tc'' utilities other than it allows you to avoid the tedious syntax. I recommend that you read the other documents linked from that warning. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/