Tag Info

Hot answers tagged

9

What you're looking for is called Traffic Shaping. The best source of information for it (that I know of) is Linux Advanced Routing and Traffic Control. It's a little bit dated, but still has a ton of good information. If you google for Linux Traffic Shaping, you can find some scripts and tools to make the traffic shaping configuration a little bit ...


7

You have created a duplex mismatch. Your port is set to 10/Full and your ISP's port is set to 10/Half. Either set your port to half-duplex (highly undesirable) or contact your ISP and ask them to set their port to 10/Full. According to Cisco's official training material for their most basic networking certification: When one device has disabled ...


6

No matter what you do you will be "wasting" CPU cycles (to determine if the referrer site (the one doing the linking) is authorized or not you must do some processing of the request data). The only thing you can do is save bandwidth while wasting a minimum of CPU cycles. There are some examples in the Apache Docs that do exactly what you want. This one: ...


6

There is a difference between running nmap as root, and as a regular user. Basically, when you run it as a regular user and the target machine blocks ICMP, nmap will do a complete three-way handshake and set up a complete TCP connection. This is more demanding than the "TCP ping" method that is used when you run it as root. For more info, read part 5 of ...


5

Yes, quite possible, though something of a learning-curve. Basically you'll be using the police and/or bandwidth commands, without knowing a lot more I can't help you with the specific command but HERE's a link to Cisco's own, pretty great, command line reference for this topic.


5

I user Netlimiter 2 for my personal stuff. http://www.netlimiter.com/ I know they've moved to 3, but I haven't. Its absolutely fantastic for my purposes. You can block/limit inbound and outbound seperately, by application, by port (although I don't think you can just do port filtering...) Its USD29.99 so will definitely break the bank (If Sam's answer is ...


5

tc, iptables etc can all do this, but just to be different: You can use Linux kernel feature cgroups and its net_cls module for limiting xapian-replicate-server. Something like this should do: mount -t cgroup -onet net /sys/fs/cgroup cd /sys/fs/cgroup mkdir xapian-replicate-server /bin/echo $$ > xapian-replicate-server/tasks /bin/echo 2048 > ...


4

No, these once-per second connection attempts themselves are not going to add up to 4GB in ten hours. Do you think you could download a 4GB file in 10 hours by getting getting a tiny packet once a second? There are 3600 seconds in an hour, so if you get a kilobyte a second for ten hours, that would be 36000 Kb, or 36 megabytes. Your bandwidth is measured ...


4

I recommend using libvirt for managing your KVM virtual machines. It makes the whole thing much easier than with just plain QEMU/KVM and provides also nice CPU, IO and network statistics. You will like tools such as virt-top and virt-manager which work on top of the libvirt framework. To collect the virtual machine interface statistics from a script, you ...


4

What kind of routers are you using? It sounds like you're just using SOHO type routers? You might want to look at getting better routers and switches with management built in and monitorable through SNMP. That said I'd also put in a proxy server that can log activity and block certain traffic. Proxying can help some of your speed woes, blocking can limit ...


3

You can do this using ALTQ, to some extent. What you can do using ALTQ is lower the bandwidth of a specific pipe after a specific time, when using HFSC. Whether this actually accomplishes what you need depends largely on the protocol. In depth information on PF and HFSC is available here and you'll be looking at option 7 for your implementation. It does not ...


3

I wrote a script to set up HFSC + SFQ for Linux (using tc); HFSC should do what you want, and SFQ on top enforces fairness between bulk streams. The result works very well for me, allowing for low latency even in the face of multiple bulk uploads or downloads. Here's the script: https://gist.github.com/939373


3

You can monitor network traffic using ntop tool in realtime. ntop clears its logs on restart, this is annoying a bit, but you still can run it for a period of time to classify your traffic. As I recall it can classify the traffic by client IPs, ports and protocols. If you know a port you will be able to find a related service using fuser command line tool.


3

A quick search gave me MasterShaper, but when I worked at a wireless ISP I used htb.init to shape my traffic. I know that DD-WRT (custom firmware for broadcom wireless routers) has a very good QOS interface (I use it to keep the torrents from slowing everything else). Take a look at both projects, I know that htb.init config is made via text files and not ...


3

Sadly, I think you're going to be chasing your own tail. The socket is owned by root... because sshd is running as root. The user is not established until AFTER the user has authenticated... but since the connection is never closed, the socket is still owned by root. Short of trying to do some sort of reverse-matching between the socket ID and the current ...


3

It uses bandwidth based on how large the page size is. If you are getting a lot of requests then yes it could certainly generate a noticable amount. Check what your error page looks like - is it a plain and basic error or is it something similar to what a CMS like WordPress may generate where it's got a lot of content on it. Slimming it down is step #1. ...


2

If there is no Apache-internal solution and we are talking about Linux here there may be an option to do this with traffic shaping. All you need is a possibility to (quickly) communicate outside Apache that the respective process belongs to a certain user. Perhaps you can rewrite the URLs of your files so that Apache calls a PHP script instead. The script ...


2

It looks like mod_cband is probably your best bet. The CBandRemoteSpeed directive specifically limits number of connections, connections per second, and connection speed per client IP. It doesn't appear to have a "per file-type" option. According to the documentation it's set per <VirtualHost> so if you only wanted to throttle .flv and .mp4 files ...


2

While I haven't personally tried it, someone else I know has recommended NetPeeker to me previously. Its payware, but at $25 USD, it shouldn't break the bank. And it lets you throttle by application or port (so its doesn't just slow the whole machine down).


2

In all likelihood, this isn't a configuration issue with your server, but rather a configuration on an upstream router, switch, firewall, proxy, or packet shaper that is between your workstation and the server. If you're able to (i.e. the server isn't in production) take a small unmanaged switch and configure a laptop to be on the same subnet as the server. ...


2

Utilize a network/resource monitoring solution like Observium or Munin or Cacti... That will provide graphical historical and summary information about your traffic patterns. Run it directly on the server. For a command line option, collectl is nice.


2

Assuming you want a bit of long term visibility to diagnose who is using a lot of bandwidth over time, DD-WRT has this cool feature called rFlow which can send data to a remote server that collects it. The server choice is up to you, but I'm personnally a big fan of nTop. This blog post raves about the amount of visibility this can give you. Let me know if ...


2

The problem here is not well documented but I've experienced it before. On 64 bit systems, the value you echo is not represented as a 16bit integer but a 32bit integer. Try replacing: echo 0x1001 > A/net_cls.classid # 10:1 echo 0x1002 > B/net_cls.classid # 10:2 With echo 0x00100001 > A/net_cls.classid # 10:1 echo 0x00100002 > ...


2

When you say ntop is no use -is that because you had problems using ntop, or that it didn't give you sufficient info? You could install the pfflowd package which is a netflow emitter - I only played around with it a little and found some netflow collectors didn't seem to like it as it didn't totally conform to standards. This thread ...


2

Your understanding of the problem is generally correct, but the kind of solution you propose is VERY complicated to implement. The questions of "What is a client?" and "What is a connection?" come up, and can be difficult to answer well. The more typical bandwidth-limiting strategy is something like this: Define the limit of the upstream bandwidth (say ...


2

Netflow is the end all, be all for this type of monitoring. While there are netflow tools for Windows, my favorite toolset is nfdump+nfsen on Linux/Unix for collection and web-based report generation respectively. I have found this toolset does everything I want, and they're free. As for collecting flows for later analysis with one of these tools, your ...


2

Those numbers seem sane, if (as people have commented) your numbers of users/talkers are relatively constant throughout the day -- or at least, average out at the figures you've started from. http://goo.gl/fdp3P certainly gives a similar final answer, just under 1 TB per month. I think the useful way to look at it is actually in reverse: in a month, you can ...


2

Transmit load-balancing is quite simple, you just enable it on the NIC and it should send traffic out through both ports. However receive load-balancing is a bit more involved. In short: Configure both connected ports on the switch for etherchannel Team the NICs and set the load balancing policy to 802.3ad Dynamic with Fault Tolerance Ensure your traffic ...


2

Does your FTP server enable throttling for the whole process itself? That seems like what you really want to do; It would automatically adjust the bandwidth per-user to stay within the total limit. The only time it wouldn't be fairly close to even is if one user isn't able to achieve that much throughput anyway.


2

You could set up shaping with rules something like this: tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: htb default 1 r2q 160 tc class add dev eth0 parent 1: classid 1:1 htb rate 2000kbit burst 1k tc class add dev eth0 parent 1:1 classid 1:2 htb rate 2000kbit ceil 2000kbit burst 1k tc class add dev eth0 parent 1:1 classid 1:3 htb rate ...



Only top voted, non community-wiki answers of a minimum length are eligible