Hi, I would like to setup the following: Internet ------------ 5 --------------------------------eth0---| linuxbox |---eth1.6----\ ------------ 7 | | ----------------------- | | Cisco catalist 2924 | | --|---|---|---------|-- | | | Vlan7 \-------------------------------------------/ | Vlan6 Vlan5 eth1 has 802.1q VLAN tagging enabeled, and 3 vlan''s configured. Each vlan has it''s own interface on the linux box and an own private subnet. Now would i like to do bandwidth division, and allowing vlan''s to borrow bandwidth from each other. I have put the three vlan interfaces into the same root class. The configuration works fine exept that each vlan seems to have the whole "128K" of its own, each vlan can download at 128K at the same time. It seems to me that each interface is in a class of its own. How can i correct this ??? I use the following script to setup things. Vlan setup: ------ #!/bin/sh # add vlan''s to eth1 vlanctl add eth1 5 vlanctl add eth1 6 vlanctl add eth1 7 # set eth1 up ifconfig eth1 up # run ifconfig on vlan''s ifconfig eth1.5 192.168.15.254 netmask 255.255.255.0 ifconfig eth1.6 192.168.16.254 netmask 255.255.255.0 ifconfig eth1.7 192.168.17.254 netmask 255.255.255.0 # turn on forwarding and masquerading: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE ------------------ CBQ setup: ------ #!/bin/sh # Bandwith division # Put all interfaces in root queueing discipline: tc qdisc add dev eth1.5 root handle 10: cbq bandwidth 100Mbit avpkt 1000 tc qdisc add dev eth1.6 root handle 10: cbq bandwidth 100Mbit avpkt 1000 tc qdisc add dev eth1.7 root handle 10: cbq bandwidth 100Mbit avpkt 1000 # Genereate root classes and put all vlans in it tc class add dev eth1.5 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate 128Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 bounded tc class add dev eth1.6 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate 128Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 bounded tc class add dev eth1.7 parent 10:0 classid 10:1 cbq bandwidth 100Mbit rate 128Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 bounded # Generate a class for each vlan tc class add dev eth1.5 parent 10:1 classid 10:100 cbq bandwidth 100Mbit rate 64Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 tc class add dev eth1.6 parent 10:1 classid 10:200 cbq bandwidth 100Mbit rate 64Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 tc class add dev eth1.7 parent 10:1 classid 10:300 cbq bandwidth 100Mbit rate 64Kbit allot 1514 weight 10Mbit prio 5 maxburst 0 avpkt 1000 # Set queueing Method tc qdisc add dev eth1.5 parent 10:100 sfq quantum 1514b perturb 15 tc qdisc add dev eth1.6 parent 10:200 sfq quantum 1514b perturb 15 tc qdisc add dev eth1.7 parent 10:300 sfq quantum 1514b perturb 15 # Set filters to Apply Queueing tc filter add dev eth1.5 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.15.0/24 flowid 10:100 tc filter add dev eth1.6 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.16.0/24 flowid 10:200 tc filter add dev eth1.7 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.17.0/24 flowid 10:300 Greetings, jos -- <------------------------- De Graeve Jos --------------------------> Systeembeheer Tel: +32/9/269.04.51 XS4ALL Internet N.V. Fax: +32/9/269.00.52 <--------- Josdg@xs4all.be ---------- PGP-Key ID: 0xD3A7F2EC ------>
I would like to assign a certain amount bandwidth to a group of users. These users may borrow bandwidth of each other. It must be possible, for example, to give user A 128K ,user B 256K and user C and D together 64 K. Each user is on a separate interface (for security reasons, and for easy DHCP configuration) and i use the vlan tools from "vlan.sourceforge.net" for that. For the above to work i need to put a number of interfaces together in a class, but it seems to me that it''s doesn''t work, according to some test i did. I have set up a testing bed, with 3 users (vlan5 vlan6 and vlan7). Together they have 128K. But when they start downloading all at the same time, they can all download at full speed (all at 128Kbit). So, any suggestions ? greetings, and thanx in advance, jos -- <------------------------- De Graeve Jos --------------------------> Systeembeheer Tel: +32/9/269.04.51 XS4ALL Internet N.V. Fax: +32/9/269.00.52 <--------- Josdg@xs4all.be ---------- PGP-Key ID: 0xD3A7F2EC ------> On Wed, 27 Dec 2000, David A. Bandel wrote:> josdg@office.xs4all.be wrote: > > > > Hi, > > > > I would like to setup the following: > > > > Internet ------------ 5 > > --------------------------------eth0---| linuxbox |---eth1.6----\ > > ------------ 7 | > > | > > ----------------------- | > > | Cisco catalist 2924 | | > > --|---|---|---------|-- | > > | | Vlan7 \-------------------------------------------/ > > | Vlan6 > > Vlan5 > > > > eth1 has 802.1q VLAN tagging enabeled, and 3 vlan''s configured. > > > > Each vlan has it''s own interface on the linux box and an own private > > subnet. Now would i like to do bandwidth division, and allowing vlan''s to > > borrow bandwidth from each other. > > > > I have put the three vlan interfaces into the same root class. > > > > The configuration works fine exept that each vlan seems to have the whole > > "128K" of its own, each vlan can download at 128K at the same time. > > > > It seems to me that each interface is in a class of its own. How can i > > correct this ??? > > Not sure I understand what you want, but, if you want each lan to be > able to borrow more bandwidth from the others you should not use > "bounded". That restricts the lan to only its own bandwidth (whatever > that is).