Re: Usage Monitoring and Bandwidth Allowance

2010-11-02 Thread Marc Herbert
>> The second idea I imagine is a little bit harder, but I hope you can see
>> where I am going with it. Applications could be given percentage shares
>> of the current network bandwidth, and/or minimum allowances. This would
>> allow users to download at the same time as surfing as the download
>> could be configured to just use the spare bandwidth. 
> 
> Yes, this is getting more into iptables though.  At this point i
> honestly don't know much about bandwidth prioritization and iptables, so
> if somebody wants to pick this up and run with it, that would be great.

This is actually not a job for iptables but for tc. It's all explained
there:

  http://lartc.org/howto/lartc.qdisc.html

Note that you can only shape the traffic you send; you cannot prevent
people from sending you packets at the IP level. On the other hand
shaping incoming traffic is trivial at the TCP level, which is why all
peer to peer and other bandwidth-hungry applications have traffic
shaping already implemented.

Traffic shaping is definitely not specific to NetworkManager; if a
high-level, OS-wide user interface was to be designed then it should
be as independent from NetworkManager as possible. The fact that such
a user interface does not exist tells something: it is sooo much easier
to implement traffic shaping inside every application rather than
across the whole operating system. And it is good enough. You can find
this a pity but it is because of the fundamentally stateless way IP is
designed.

Cheers,

Marc


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Usage Monitoring and Bandwidth Allowance

2010-11-02 Thread Ma Begaj
2010/11/2 Dan Williams :
> On Sun, 2010-10-31 at 09:13 +, Chris Baines wrote:
>> Hi,
>>
>> I have been using the Network Manager applet for a while now, but I feel
>> that it is missing some critical features. Firstly it has no way of
>> recording usage and secondly it has no way of distributing bandwidth.
>
> Correct, usage recording is something we've wanted to do for a while but
> not had enough time.  NM knows what interface the modem is using for
> data, so we can track usage on it.  NM already tracks per-session PPP
> data usage, but does not save it anywhere.  We'd also want to track
> Ethernet data usage because some devices use ethernet interfaces for
> data.
>
> In the end, I figured that the best thing to do would just be to track
> data for all connections.  We can get it through netlink signals, or
> through polling the interface with various ioctls or
> scraping /proc/net/dev (the ugly way).
>
> Once this is done, my thought had been to have NM save this information
> on a per-connection basis to an sqlite database
> in /var/lib/NetworkManager, and then expose that data via the D-Bus
> interface.  There's a bug on bugzilla.gnome.org that has more thoughts
> on this, anybody want to look into it?
>


it would be great to be able to set the "bandwidth warning limit" (in
MB) which would
show a notification (or even stop/pause connection) if a person
reaches this limit
in a current month (or since specified date) on this specific interface.

this would be very useful for 3G modem which pretty often have limits.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Usage Monitoring and Bandwidth Allowance

2010-11-01 Thread Dan Williams
On Sun, 2010-10-31 at 09:13 +, Chris Baines wrote:
> Hi,
> 
> I have been using the Network Manager applet for a while now, but I feel
> that it is missing some critical features. Firstly it has no way of
> recording usage and secondly it has no way of distributing bandwidth. 

Correct, usage recording is something we've wanted to do for a while but
not had enough time.  NM knows what interface the modem is using for
data, so we can track usage on it.  NM already tracks per-session PPP
data usage, but does not save it anywhere.  We'd also want to track
Ethernet data usage because some devices use ethernet interfaces for
data.

In the end, I figured that the best thing to do would just be to track
data for all connections.  We can get it through netlink signals, or
through polling the interface with various ioctls or
scraping /proc/net/dev (the ugly way).

Once this is done, my thought had been to have NM save this information
on a per-connection basis to an sqlite database
in /var/lib/NetworkManager, and then expose that data via the D-Bus
interface.  There's a bug on bugzilla.gnome.org that has more thoughts
on this, anybody want to look into it?

> The first one is similar to the functionality provided by the vnstat
> tool I use currently, but it would be good it either integrate similar
> functionality in to the Network Manager or make it a integrated gui for
> vnstat. 
> 
> The second idea I imagine is a little bit harder, but I hope you can see
> where I am going with it. Applications could be given percentage shares
> of the current network bandwidth, and/or minimum allowances. This would
> allow users to download at the same time as surfing as the download
> could be configured to just use the spare bandwidth. 

Yes, this is getting more into iptables though.  At this point i
honestly don't know much about bandwidth prioritization and iptables, so
if somebody wants to pick this up and run with it, that would be great.

Dan


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list