[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1123] Re: Equal bandwidth distribution among hosts in asubnet using ALTQ
Syazwan Hisyam bin Mohamed Ridzwan wrote:
> First of all, sorry if this quetion is quite silly. I would appreciate if
> anyone can help me regarding the subject I stated above. I would like to
> shape the traffic in the campus so that no single user can monopolize the
> internet connection (e.g: by opening multiple connections).
>
> By using dummynet, I can set this limitation for example by:-
>
> /sbin/ipfw add pipe 1 ip from 10.10.17.0/24 to any
> /sbin/ipfw add pipe 2 ip from any to 10.10.17.0/24
> /sbin/ipfw pipe 1 config mask src-ip 0x000000ff bw 64000bit/s queue 20
> /sbin/ipfw pipe 2 config mask dst-ip 0x000000ff bw 64000bit/s queue 20
>
> and not even a single user in the subnet can get bandwidth more than 64Kbps.
> However, it is not a good idea to use Dummynet since that some extra
> available bandwidth will not be utilized.
>
> I would like to use ALTQ to fully utilize the bandwidth but at the same time
> avoid any single user from monopolizing it.
>
> I've tried cbq, created some child classes and used filter for the subnets.
> For example:-
>
> class cbq fxp0 hostel def_class borrow pbandwidth 30
> filter fxp0 hostel 10.10.17.0 netmask 0xffffff00 0 0 0 0
> filter fxp0 hostel 0 0 10.10.17.0 netmask 0xffffff00 0 0
>
> But I don't think this can avoid a user from monopolizing the link. I do
> think of setting different classes for each host in the network but this is
> quite tedious.
>
> Is there any easier way I can handle this with ALTQ?
Try WFQ. By default, WFQ tries to provide equal share to flows with
different destination addresses.
-Kenjiro