LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-16-2005, 05:35 PM   #1
dogsbody
LQ Newbie
 
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9

Rep: Reputation: 0
Seperate bandwidth for eth0 & eth0:1


Hi,

I am in the process of changing my IP address over and at the moment I have two IP addresses maped to an interface (eth0 & eth0:1).

I am pretty sure that I have moved everything over to the new IP address now but I would like to double check and so I would like to see how much data is being sent through each IP address.

Unfortunately ifconfig and /proc/net/dev both lump the IP addresses together and just report on eth0 as a whole :-/ Is there anything I can use to see this data seperately?

Thank you in advance.

Dan
 
Old 03-17-2005, 04:38 PM   #2
alanfullmer
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
iptraf will do what you want.
 
Old 03-17-2005, 06:53 PM   #3
dogsbody
LQ Newbie
 
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you, I haven't seen iptraf before, looks interesting!

For the archives I have actually just found another way by using ipchains but it actually works rather well! If you set a separate ipchains rule for each IP address then you can see how much data matches each rule.

E.g. If you have three IP addresses on one interface (12.12.12.12 , 45.45.45.45 & 78.78.78.78 all on eth0) you can add the following rules to ipchains...

/sbin/ipchains -A input -d 12.12.12.12
/sbin/ipchains -A input -d 45.45.45.45
/sbin/ipchains -A input -d 78.78.78.78
/sbin/ipchains -A output -s 12.12.12.12
/sbin/ipchains -A output -s 45.45.45.45
/sbin/ipchains -A output -s 78.78.78.78

... these rules don't block traffic but you can now use the commands...

/sbin/ipchains -vxnL input
/sbin/ipchains -vxnL output

... which shows the bytes (second column) that match those rules. You can even grep this output into mrtg to graph the usage of each IP :-)
 
  


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
simple CLI tool for agregated total received on eth0 (simpler than bandwidth) Emmanuel_uk Linux - Newbie 3 08-17-2005 03:29 PM
Seperate bandwidth for eth0 & eth0:1 dogsbody Slackware 4 03-17-2005 06:55 PM
Firewall WAN eth0 LAN eth1 self-bridges, eth0 does all routeing. Nichole_knc Linux - Networking 5 07-29-2004 02:33 PM
howto delete existing static ip of ethernet(eth0)& reconf multiple ips on eth0 viveku Linux - Networking 2 02-02-2004 01:30 AM
howto delete static ip configured on eth0 & reconf multiple ip on one eth0(redhat8 viveku Linux - Networking 0 01-31-2004 10:40 AM

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

All times are GMT -5. The time now is 02:19 AM.

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