Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-16-2005, 05:34 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9
Rep:
|
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
|
|
|
03-17-2005, 11:20 AM
|
#2
|
Member
Registered: Jun 2003
Distribution: Slackware64 14.1 and -current
Posts: 209
Rep:
|
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.
|
|
|
03-17-2005, 11:32 AM
|
#3
|
LQ Newbie
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9
Original Poster
Rep:
|
Nope it's definately eth0 and eth0:1, They are two seperate IP addresses on the same interface.
Thank you for the reply anyway
|
|
|
03-17-2005, 11:54 AM
|
#4
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,797
|
Maybe you could iptraf and configure filters to only display traffic for the IP of eth0:1
|
|
|
03-17-2005, 06:55 PM
|
#5
|
LQ Newbie
Registered: Apr 2004
Location: UK
Distribution: Was Redhat, then Slackware, now CentOS
Posts: 9
Original Poster
Rep:
|
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 :-)
|
|
|
All times are GMT -5. The time now is 03:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|