Re: How do I slow down my network?

From: Sam (samhunt90_at_hotmail.com)
Date: 06/14/04


Date: 14 Jun 2004 11:35:48 -0700

Chris Berg <spam.spam.eggs@nd.spam> wrote in message news:<hv6pc090iai8c2kfj21ha97aaqnqhst53p@4ax.com>...
> This may be a bit off-topic, but still:
>
> I'm working with a Java client/server app.
> In my test setup the client and server are connected via the 100 MBit
> LAN, so bandwidth is virtually unlimited.
>
> I want to test it in a more realistic setup, where the bandwidth is
> only, say, 56 kbit/sec.
>
> Is there a simple way to temporarily limit the bandwidth for test
> purposes?
>
> I have thought of putting a delay between every IP packet, on the
> trasmitting or the receiving side, but in Java I don't have access to
> individual packets, so I can't figure out where to insert the delay.
>
> Maybe the solution should be made on a lower layer, like the ethernet.
>
> Chris

There is a freeware app on Linux called "nistnet". It lets you specify
the bandwidth of the link. Now for the tricky part - it has to be on
an intermediary router.

Another option that might work would be to set up a firewall which
blocks incoming packets. Then, use a package like the excellent JPCap
(see sourcefourge), which can take packets off the wire even if they
are firewalled (as long as the firewall operates at a higher level
than the link layer). Then just rewrite the packets to the local host
and socket that you're receiving on.

Of course other options mentioned would probably be simpler, like
setting the TCP window size (if using tcp), or most simply write your
outgoing packets to the local host, and have a Java app listen for it
and write the packets out on a more liesurely basis.

Sam90



Relevant Pages

  • Re: ActiveX.exe more problems
    ... it's not a Streaming device. ... Jungo assumes this too ... App doesn't see an Abort or Stop flag it starts interrogating the USB device ... Packets are received ...
    (microsoft.public.vb.general.discussion)
  • Many Output Drops in a serial line
    ... configure it to have 70% of bandwidth for this traffics. ... I suppose the Citrix traffics will have at least 70% of bandwidth. ... Router#show policy-map interface s0/1 ... 67471882 packets, 10015898781 bytes ...
    (comp.dcom.sys.cisco)
  • Re: How to start Ethereal capture at network usage threshold?
    ... To monitor bandwidth you must capture ALL packets on the network. ... If you want to monitor between certain times you may need to use Windows Task ...
    (microsoft.public.windows.server.networking)
  • Re: Confused About Net Neutrality
    ... Don't websites pay based on the amount of bandwidth they need ... transmitting those packets both way through their ... BordersBooks look like a more responsive site) because BordersBooks ...
    (comp.dcom.telecom)
  • Re: Firing Events from Modile containing a Threads code
    ... > Ive been advised to use events in my app. ... listens for UDP packets. ... hence the event gets fired twice, ... first procedure to finish executing and then call the method again in ...
    (microsoft.public.dotnet.framework.compactframework)