Thomas Johnson wrote:

> I have a question concerning the bandwidth metering in WISP-Dist.  Is the
> speed an agregate speed or a per connection?  In other words, if I specify

Aggregate speed. However, the shaper fairly limits each connection (SFQ) when 
the total limit is reached.

> 512kbits is that what each user is allocated or is that the total throughput
> for the port?  If it is per connection, is there a way to set the bandwidth
> per IP/MAC address so different IP/MAC's have different speeds?

Yes, you can, per IP address. But you have to enter it manually in 
/etc/network/ifup.local script.

Here is an example script, which sets traffic limit on an IP address:

====
#!/bin/sh

# Function to set HTB/SFQ shaper with fixed bandwidth on an IP address
set_shaper() {
IP=$1
SPEED=$2
ID=$3

tc class add dev eth0 parent 1:1 classid 1:$ID htb rate $SPEED ceil $SPEED
tc qdisc add dev eth0 parent 1:$ID handle $ID: sfq perturb 10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst $IP/32 
flowid 1:$ID
tc class add dev netcs0 parent 1:1 classid 1:$ID htb rate $SPEED ceil $SPEED
tc qdisc add dev netcs0 parent 1:$ID handle $ID: sfq perturb 10
tc filter add dev netcs0 protocol ip parent 1:0 prio 1 u32 match ip src 
           $IP/32 flowid 1:$ID
}

# ID should be a unique value >= 100
set_shaper IP_ADDRESS_HERE 128kbit 100
set_shaper ANOTHER_IP_ADDRESS 256kbit 101
===

A more complete example script would be included in the next release.

> Thanks,
> 
> -Tom
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> ------------------------------------------------------------------------
> leaf-user mailing list: [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
> 


-- 
Best Regards,
Vladimir
Systems Engineer (RHCE)



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to