LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-16-2005, 05:34 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, 11:20 AM   #2
sovietpower
Member
 
Registered: Jun 2003
Distribution: Slackware64 14.1 and -current
Posts: 209

Rep: Reputation: 30
ifconfig eth0 or ifconfig eth1 should show you the configuration just by themselves. ***EDIT*** Oops sorry I didn't see the eth0:1 are you sure you don't mean eth1?

Last edited by sovietpower; 03-17-2005 at 11:23 AM.
 
Old 03-17-2005, 11:32 AM   #3
dogsbody
LQ Newbie
 
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9

Original Poster
Rep: Reputation: 0
Nope it's definately eth0 and eth0:1, They are two seperate IP addresses on the same interface.

Thank you for the reply anyway
 
Old 03-17-2005, 11:54 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Maybe you could iptraf and configure filters to only display traffic for the IP of eth0:1
 
Old 03-17-2005, 06:55 PM   #5
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Linux - Networking 2 03-17-2005 06:53 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 - Distributions > Slackware

All times are GMT -5. The time now is 06:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration