LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2008, 02:52 PM   #1
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Rep: Reputation: 0
Simple tool to monitor real-time bandwidth usage of all connected hosts on LAN?


I'd like to install one on our small ADSL connected office LAN so I can pinpoint trouble spots (e.g. where some monkey has gone out to lunch but decided to download half a dozen movie trailers beforehand). Found a good list of network monitoring tools for linux here but most seemed to manage traffic to and from the host running the software.

I need to be able to track individual IP's on our subnet and the traffic they are putting through our gateway router (another network device, not running on the same machine as the monitoring tool).

Any recommendations?
 
Old 02-13-2008, 03:27 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
depends what the router is... if it supports cisco netflow, sflow, ipfix etc.. then you could make it report statistics to the monitor on a tool like ntop. standard things like snmp don't provide host specific data, just volume of data through a point. you could set up snmp on all hosts and monitor that, but that will be ALL traffic in and out of each box, not just internet traffic.
 
Old 02-13-2008, 03:27 PM   #3
xiao_haozi
LQ Newbie
 
Registered: Feb 2008
Location: Philadelphia, PA
Distribution: Slackware, Kubuntu, BackTrack, Slax, LFS
Posts: 10

Rep: Reputation: 0
Some managed switches will do this. So you might want to look into your switch and what it's capabilities are. Could also use wireshark.
 
Old 02-13-2008, 03:45 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
ntop would probably be the choice I would make..

mrtg polling your switch via snmp could show you the bandwidth per switch port, but it wouldn't break it down in any fashion where you would be able to tell if it's legitimate traffic or not. nor would it tell you who (what IP) was connected to which port..
 
Old 02-13-2008, 05:54 PM   #5
Deleriux
Member
 
Registered: Nov 2003
Posts: 89

Rep: Reputation: 17
Run iptraf.

Its a great utility to do exactly this.

Code:
iptraf -L /some/log/file.log -i all
You can view the logfile to get the statistics you need. In particular which ip's send the most traffic.

Theres a lot of nifty rules you can setup in iptables to manage connections like this, for example you can add rules to quota the amount of bandwidth provided per subnet or per IP.

If you want to go a few steps further you can setup traffic control and deliberately slow down connections from IP's on your network that hit their quota.

I.E quota = 1GB, if you go higher your packets are classified in such a way that you get a 128Kbit connection for the remainder of the day.
 
Old 02-13-2008, 11:18 PM   #6
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for your replies, I'll look into these. Thanks also for the traffic control tips Deleriux - I'm hoping to avoid having to go that far and the size of our LAN/pipe only makes this an occasional problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor bandwidth usage and attempted usage! Depressed_amphibian Linux - Networking 3 06-15-2006 07:13 AM
Bandwidth usage monitor? Zmyrgel Linux - Networking 5 06-08-2006 03:12 AM
Monitoring traffic tool/web based(non-cgi?)/non-SNMP/low CPU usage/non-real time pe2338 Linux - Networking 3 05-04-2006 01:00 PM
Graphical real-time bandwidth monitor ??? khermans Linux - Software 5 05-10-2004 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration