LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-21-2019, 09:55 AM   #1
stoorky
LQ Newbie
 
Registered: Sep 2015
Posts: 27

Rep: Reputation: Disabled
is it possible to filter data going through nload, in order to measure bandwidth consumption of a gateway?


Hello everyone,

I have a LinuxBox that has two functions : an internet gateway and a mail server.

With nload I can monitor the traffic on the internet (WAN) interface, but that shows me both the gateway consumption and the mail server consumption. How can I isolate the gateway consumption ?

When packets coming from LAN reach the WAN interface, they are already s-natted, so nload has probably no way of knowing if they come from the kernel (mail) or from the LAN (gateway).

My idea would be :
  • Set up a virtual (tap) interface (or maybe even two, to distinguish incoming from outgoing traffic)
  • Duplicate (with netfilter's TEE target) packets coming from or destined to the LAN (the gateway trafic) to this tap interface
  • Launch nload on this tap interface
Do you think this is the way to do it ? Or is there an easier way to achieve my goal ? (maybe a tool I haven't heard of ?)

Thanks
 
Old 08-22-2019, 04:55 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth( I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,852
Blog Entries: 2

Rep: Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312Reputation: 1312
Have you checked out Wireshark?
https://sectools.org/search/?q=Wireshark
 
Old 08-23-2019, 01:31 AM   #3
stoorky
LQ Newbie
 
Registered: Sep 2015
Posts: 27

Original Poster
Rep: Reputation: Disabled
didn't think of wireshark (or tshark, because the server doesn't have a desktop) to measure network speed, but you're right, could be the right tool for this after all
less user friendly though than a dedicated tool like nload

duplicating the targeted traffic to a tap interface and measuring that traffic with nload would require a little more setup work, but would be easier to use in the long run

i'l try both and let you know...
 
Old 08-24-2019, 07:58 AM   #4
stoorky
LQ Newbie
 
Registered: Sep 2015
Posts: 27

Original Poster
Rep: Reputation: Disabled
Wireshark doesn't do the trick, like nload a capture on the wan interface only sees the gateway's IP, all packets are already snatted. So there's no way to separate the kernel's traffic from the LAN's snatted traffic
 
  


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
How can I limit bandwidth and also measure my bandwidth available superbit Linux - Networking 1 07-05-2018 03:47 AM
LXer: nload Monitor Network Traffic And Bandwidth Usage In Real Time LXer Syndicated Linux News 0 09-01-2017 09:00 AM
LXer: Monitoring Network Load With nload: Part 2 LXer Syndicated Linux News 0 11-23-2016 02:04 PM
LXer: Monitoring Network Load With nload: Part 1 LXer Syndicated Linux News 0 11-17-2016 12:12 AM
How to measure a program's peak memory consumption? hae Linux - Software 2 06-23-2005 08:39 AM

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

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