← Back to team overview

launchpad-dev team mailing list archive

Re: Venutian development.

 

2009/12/3 Karl Fogel <karl.fogel@xxxxxxxxxxxxx>:
> Maris Fogels <maris.fogels@xxxxxxxxxxxxx> writes:
>> Here is the full text:
>
> Thank you, Maris!
>
> So there's no way to do it for just *.launchpad.net?  (Hmm, makes me
> want to write a browser plugin... :-) )

Yes, there is, or more precisely you can do it for the ip addresses of
the lpnet web servers.  The following script is not quite what you
want, but it is close - just change it to filter by ip not port.

google 'lartc' for some documentation.

It would be great to put this up onto dev.l.n.  Once you've debugged it. ;-)

You win a beverage of choice if you convince Mark to run this on his laptop :)
-- 
Martin <http://launchpad.net/~mbp/>



#! /bin/sh -ex

# run this with sudo to slow down (only) connections to the localhost 4155/tcp,
# the bzr-over-tcp server port
#
# The result of this is: only the localhost interface is affected; the root
# qdisc is set to prio, which is work-conserving (ie does not slow down
# traffic).  There are two filters attached to the root, which pick out packets
# going to or from the bzr server, and send them down into flow 1:3, which
# simulates a 500ms delay, network.
#
# There is no specific bandwidth limit, but tcp windowing effects will impose a
# fairly high cap.  The net effect is supposed to be similar to using a fast
# ADSL connection across a long intercontinental link.
#
# -- mbp 2008-11-26

tc qdisc add dev lo root handle 1: prio
tc qdisc add dev lo parent 1:3 handle 30: netem delay 500ms
tc qdisc add dev lo parent 30:1 handle 40: prio
tc filter add dev lo protocol ip parent 1:0 prio 3 u32 match ip dport
4155 0xffff flowid 1:3 handle 800::800
tc filter add dev lo protocol ip parent 1:0 prio 3 u32 match ip sport
4155 0xffff flowid 1:3 handle 800::801



References