Hi! I am using DSL with 786Kbit downstream and 128Kbit upstream. When someone fetches a file from my ftp server, my upstream is completely blocked and download speeds from the internet of internal clients behind the router slow down from ~90KB/s to 20-30KB/s. So I decided to limit upstream bandwidth for access to the ftp-data port. Now I have two questions: 1.) As you can see below, I allowed 56Kbit for ftp-data transfers. This results in about 12KB/s. When I enter 64Kbit, full speed is consumed. Am I doing something wrong here? I thought 96Kbit should result in 12K/s and 128Kbit were full speed. 2.) How can I allow ftp-data transfers to get files at 128KBit speed, when there is no other traffic on the line? I want to have ftp transfers at a sufficient low priority, so that upstream and downstream from and to internal hosts are not affected by my ftp-servers traffic. This is the script I wrote: ---------------------------------------> ALLOT="1492" AVPKT="1000" DEV="ppp0" MAXBURST="20" MAXRATE="128Kbit" PERTURB="15" tc qdisc del dev ${DEV} root handle 10: tc qdisc add dev ${DEV} root handle 10: cbq bandwidth ${MAXRATE} avpkt ${AVPKT} tc class add dev ${DEV} parent 10:0 classid 10:1 cbq bandwidth ${MAXRATE} \ rate ${MAXRATE} allot ${ALLOT} prio 8 maxburst ${MAXBURST} avpkt ${AVPKT} tc class add dev ${DEV} parent 10:1 classid 10:200 cbq bandwidth ${MAXRATE} \ rate 56Kbit allot ${ALLOT} prio 5 maxburst ${MAXBURST} avpkt ${AVPKT} \ bounded tc qdisc add dev ${DEV} parent 10:200 sfq quantum ${ALLOT}b perturb ${PERTURB} tc filter add dev ${DEV} parent 10:0 protocol ip prio 25 \ u32 match ip sport 20 0xFFFF flowid 10:200 <--------------------------------------- Thanks in advance, Andreas
Hello,> 1.) As you can see below, I allowed 56Kbit for ftp-data transfers. This > results in about 12KB/s. When I enter 64Kbit, full speed is consumed. Am > I doing something wrong here? I thought 96Kbit should result in 12K/s > and 128Kbit were full speed.Hmm... same setup seems to work for me quite fine at 64Kbps, 65607 bits in one second.> > 2.) How can I allow ftp-data transfers to get files at 128KBit speed, > when there is no other traffic on the line? I want to have ftp transfers > at a sufficient low priority, so that upstream and downstream from and > to internal hosts are not affected by my ftp-servers traffic.Removing the "bounded" on your class 10:200 will allow the class to borrow bandwidth from other classes when they aren''t using it. This is addressed on the bandwidth limiting example, under "What to do with excess bandwidth". By the way, how can I stop Netscape from opening a second port on the ftp server instead of using port 20 for data transfer? Testing with ftp downloads under netscape results un full bandwidth as this connection is used for data instead of source port 20: (output from netstat -na) tcp 0 0 192.168.144.99:44212 192.168.144.99:1064 ESTABLISHED Cheers, Rodrigo Goya
On Fri, Oct 27, 2000 at 07:58:48PM +0200, Andreas Oberritter wrote:> This is the script I wrote: > ---------------------------------------> > ALLOT="1492" > AVPKT="1000" > DEV="ppp0" > MAXBURST="20" > MAXRATE="128Kbit" > PERTURB="15" > > tc qdisc del dev ${DEV} root handle 10: > tc qdisc add dev ${DEV} root handle 10: cbq bandwidth ${MAXRATE} avpkt > ${AVPKTCan you specify the ''weight'' of your connection as well, one tenth of 128kbit would seem in order. Regards, bert hubert -- PowerDNS Versatile DNS Services Trilab The Technology People ''SYN! .. SYN|ACK! .. ACK!'' - the mating call of the internet