download peak control



Hello,

does anybody where network issues are regulated in Linux? I have the following problem:
I have a router which was very cheap and so is the quality of this gadget. Sometimes, or I'd better say often, when I have download peaks which appear very quickly, my network connection cuts off. These download peaks appear when I download any file from a webpage or when I get an e-mail with an attachment.
I had an idea. When it is possible to continiously request the download speed of my modem with any script or program, it could be able to regulate the downloadspeed down to weaken the download peak.
I thought about writing such a tool, but I'm not sure where the basic approach is. kernel level? Or is it even possible with any linux tools?

Regards,
Markus
.