* [LARTC] __Very__ Low Bandwidth
@ 2006-03-31 15:04 Matthew Pearson
2006-04-07 21:46 ` Andy Furniss
2006-04-10 7:52 ` Matthew Pearson
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Pearson @ 2006-03-31 15:04 UTC (permalink / raw)
To: lartc
I am using the script below to simulate a very low bandwidth connection.
I found that I could turn the bandwidth knob down to about 4kbit, but
below that I didn't get any traffic through. I've had a look at this
generally, but couldn't find an answer. It doesn't even seem like the
first reply packet gets through. I have tried it with much bigger
buffers, but this doesn't help.
I found that if I put a web proxy on the machine that is running this,
then the minimum I can turn the bandwidth down to is 12kbit and below
that the web browser doesn't get anything back.
Is this because the delay is so great that things are getting thrown
away by the kernel? Could I munge the packets to turn up the TTL or
something similar?
Many thanks for some excellent tools.
Matthew Pearson
#!/bin/bash
CLIENT1\x192.168.1.190/32
CLIENT2\x192.168.1.191/32
OPERd;
DEV=eth0
RATE=3kbit
PEAKRATE=3kbit
BUFFER1\x10kb
BUFFER2\x10kb
echo -e "Attach Egress policy..."
tc qdisc $OPER dev $DEV root handle 1:0 htb default 15
tc class $OPER dev $DEV parent 1:0 classid 1:1 htb rate 240kbit
tc class $OPER dev $DEV parent 1:1 classid 1:2 htb rate 240kbit ceil 240kbit
tc class $OPER dev $DEV parent 1:1 classid 1:3 htb rate 240kbit ceil 240kbit
tc class $OPER dev $DEV parent 1:1 classid 1:15 htb rate 240kbit ceil
240kbit
tc qdisc $OPER dev $DEV parent 1:2 handle 2:0 tbf rate $RATE burst $RATE
limit $BUFFER1 peakrate $PEAKRATE mtu 1600
tc qdisc $OPER dev $DEV parent 1:3 handle 3:0 tbf rate $RATE burst $RATE
limit $BUFFER2 peakrate $PEAKRATE mtu 1600
tc filter $OPER dev $DEV protocol ip parent 1:0 u32 match ip dst
$CLIENT1 flowid 1:2
tc filter $OPER dev $DEV protocol ip parent 1:0 u32 match ip dst
$CLIENT2 flowid 1:3
echo -e "Attach Ingress policy..."
tc qdisc $OPER dev $DEV handle ffff: ingress
tc filter $OPER dev $DEV parent ffff: protocol ip u32 match ip src
$CLIENT1 police rate $RATE buffer $BUFFER1 drop flowid :1
tc filter $OPER dev $DEV parent ffff: protocol ip u32 match ip src
$CLIENT2 police rate $RATE buffer $BUFFER2 drop flowid :2
echo -e "Status Information:\nShowing QDiscs...\n"
tc qdisc show
echo -e "Showing classes...\n"
tc class show dev $DEV
echo -e "Showing filters...\n"
tc filter show dev $DEV
echo -e "Finished.\n"
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] __Very__ Low Bandwidth
2006-03-31 15:04 [LARTC] __Very__ Low Bandwidth Matthew Pearson
@ 2006-04-07 21:46 ` Andy Furniss
2006-04-10 7:52 ` Matthew Pearson
1 sibling, 0 replies; 3+ messages in thread
From: Andy Furniss @ 2006-04-07 21:46 UTC (permalink / raw)
To: lartc
Matthew Pearson wrote:
> I am using the script below to simulate a very low bandwidth connection.
> I found that I could turn the bandwidth knob down to about 4kbit, but
> below that I didn't get any traffic through. I've had a look at this
> generally, but couldn't find an answer. It doesn't even seem like the
> first reply packet gets through. I have tried it with much bigger
> buffers, but this doesn't help.
>
> I found that if I put a web proxy on the machine that is running this,
> then the minimum I can turn the bandwidth down to is 12kbit and below
> that the web browser doesn't get anything back.
>
> Is this because the delay is so great that things are getting thrown
> away by the kernel? Could I munge the packets to turn up the TTL or
> something similar?
>
> Many thanks for some excellent tools.
>
> Matthew Pearson
>
> #!/bin/bash
>
> CLIENT1\x192.168.1.190/32
> CLIENT2\x192.168.1.191/32
> OPERd;
> DEV=eth0
> RATE=3kbit
> PEAKRATE=3kbit
> BUFFER1\x10kb
> BUFFER2\x10kb
>
> echo -e "Attach Egress policy..."
> tc qdisc $OPER dev $DEV root handle 1:0 htb default 15
> tc class $OPER dev $DEV parent 1:0 classid 1:1 htb rate 240kbit
>
> tc class $OPER dev $DEV parent 1:1 classid 1:2 htb rate 240kbit ceil
> 240kbit
> tc class $OPER dev $DEV parent 1:1 classid 1:3 htb rate 240kbit ceil
> 240kbit
> tc class $OPER dev $DEV parent 1:1 classid 1:15 htb rate 240kbit ceil
> 240kbit
>
> tc qdisc $OPER dev $DEV parent 1:2 handle 2:0 tbf rate $RATE burst $RATE
> limit $BUFFER1 peakrate $PEAKRATE mtu 1600
I don't really get using tbf under htb - but it may be OK.
The reason it fails <12kbit is because you use it for burst - which is a
buffer length so <12kbit won't pass a 1500 byte packet.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] __Very__ Low Bandwidth
2006-03-31 15:04 [LARTC] __Very__ Low Bandwidth Matthew Pearson
2006-04-07 21:46 ` Andy Furniss
@ 2006-04-10 7:52 ` Matthew Pearson
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Pearson @ 2006-04-10 7:52 UTC (permalink / raw)
To: lartc
Thank you Andy. I'll have another look at it and change the values to
get it to do what I need. Again, thank you.
Matthew Pearson
Andy Furniss wrote:
> Matthew Pearson wrote:
>> I am using the script below to simulate a very low bandwidth
>> connection. I found that I could turn the bandwidth knob down to
>> about 4kbit, but below that I didn't get any traffic through. I've had
>> a look at this generally, but couldn't find an answer. It doesn't even
>> seem like the first reply packet gets through. I have tried it with
>> much bigger buffers, but this doesn't help.
>>
>> I found that if I put a web proxy on the machine that is running this,
>> then the minimum I can turn the bandwidth down to is 12kbit and below
>> that the web browser doesn't get anything back.
>>
>> Is this because the delay is so great that things are getting thrown
>> away by the kernel? Could I munge the packets to turn up the TTL or
>> something similar?
>>
>> Many thanks for some excellent tools.
>>
>> Matthew Pearson
>>
>> #!/bin/bash
>>
>> CLIENT1\x192.168.1.190/32
>> CLIENT2\x192.168.1.191/32
>> OPERd;
>> DEV=eth0
>> RATE=3kbit
>> PEAKRATE=3kbit
>> BUFFER1\x10kb
>> BUFFER2\x10kb
>>
>> echo -e "Attach Egress policy..."
>> tc qdisc $OPER dev $DEV root handle 1:0 htb default 15
>> tc class $OPER dev $DEV parent 1:0 classid 1:1 htb rate 240kbit
>>
>> tc class $OPER dev $DEV parent 1:1 classid 1:2 htb rate 240kbit ceil
>> 240kbit
>> tc class $OPER dev $DEV parent 1:1 classid 1:3 htb rate 240kbit ceil
>> 240kbit
>> tc class $OPER dev $DEV parent 1:1 classid 1:15 htb rate 240kbit ceil
>> 240kbit
>>
>> tc qdisc $OPER dev $DEV parent 1:2 handle 2:0 tbf rate $RATE burst
>> $RATE limit $BUFFER1 peakrate $PEAKRATE mtu 1600
>
> I don't really get using tbf under htb - but it may be OK.
>
> The reason it fails <12kbit is because you use it for burst - which is a
> buffer length so <12kbit won't pass a 1500 byte packet.
>
> Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-10 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-31 15:04 [LARTC] __Very__ Low Bandwidth Matthew Pearson
2006-04-07 21:46 ` Andy Furniss
2006-04-10 7:52 ` Matthew Pearson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.