All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] CBQ and VLAN's
@ 2000-12-27 10:34 josdg
  2000-12-27 16:22 ` josdg
  0 siblings, 1 reply; 2+ messages in thread
From: josdg @ 2000-12-27 10:34 UTC (permalink / raw)
  To: lartc

<PRE>Hi,

I would like to setup the following:

        Internet                       ------------        5
--------------------------------eth0---| linuxbox |---eth1.6----\
                                       ------------        7     |
                                                                 |
-----------------------                                          |
|<i> Cisco catalist 2924 |                                          |
</I>--|---|---|---------|--                                          |
  |   | 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
&quot;128K&quot; 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 &gt; /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

-- 
&lt;------------------------- De Graeve Jos --------------------------&gt;
Systeembeheer                                Tel:    +32/9/269.04.51 
XS4ALL Internet N.V.                         Fax:    +32/9/269.00.52
&lt;--------- <A HREF="mailto:Josdg@xs4all.be">Josdg@xs4all.be</A> ---------- PGP-Key ID: 0xD3A7F2EC ------&gt;





</PRE>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [LARTC] CBQ and VLAN's
  2000-12-27 10:34 [LARTC] CBQ and VLAN's josdg
@ 2000-12-27 16:22 ` josdg
  0 siblings, 0 replies; 2+ messages in thread
From: josdg @ 2000-12-27 16:22 UTC (permalink / raw)
  To: lartc

<PRE>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 &quot;vlan.sourceforge.net&quot;
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

-- 
&lt;------------------------- De Graeve Jos --------------------------&gt;
Systeembeheer                                Tel:    +32/9/269.04.51 
XS4ALL Internet N.V.                         Fax:    +32/9/269.00.52
&lt;--------- <A HREF="mailto:Josdg@xs4all.be">Josdg@xs4all.be</A> ---------- PGP-Key ID: 0xD3A7F2EC ------&gt;

On Wed, 27 Dec 2000, David A. Bandel wrote:

&gt;<i> <A HREF="mailto:josdg@office.xs4all.be">josdg@office.xs4all.be</A> wrote:
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; Hi,
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; I would like to setup the following:
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt;         Internet                       ------------        5
</I>&gt;<i> &gt; --------------------------------eth0---| linuxbox |---eth1.6----\
</I>&gt;<i> &gt;                                        ------------        7     |
</I>&gt;<i> &gt;                                                                  |
</I>&gt;<i> &gt; -----------------------                                          |
</I>&gt;<i> &gt; | Cisco catalist 2924 |                                          |
</I>&gt;<i> &gt; --|---|---|---------|--                                          |
</I>&gt;<i> &gt;   |   | Vlan7       \-------------------------------------------/
</I>&gt;<i> &gt;   | Vlan6
</I>&gt;<i> &gt; Vlan5
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; eth1 has 802.1q VLAN tagging enabeled, and 3 vlan's configured.
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; Each vlan has it's own interface on the linux box and an own private
</I>&gt;<i> &gt; subnet.  Now would i like to do bandwidth division, and allowing vlan's to
</I>&gt;<i> &gt; borrow bandwidth from each other.
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; I have put the three vlan interfaces into the same root class.
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; The configuration works fine exept that each vlan seems to have the whole
</I>&gt;<i> &gt; &quot;128K&quot; of its own, each vlan can download at 128K at the same time.
</I>&gt;<i> &gt; 
</I>&gt;<i> &gt; It seems to me that each interface is in a class of its own. How can i
</I>&gt;<i> &gt; correct this ???
</I>&gt;<i> 
</I>&gt;<i> Not sure I understand what you want, but, if you want each lan to be
</I>&gt;<i> able to borrow more bandwidth from the others you should not use
</I>&gt;<i> &quot;bounded&quot;.  That restricts the lan to only its own bandwidth (whatever
</I>&gt;<i> that is).
</I>





</PRE>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-12-27 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-27 10:34 [LARTC] CBQ and VLAN's josdg
2000-12-27 16:22 ` josdg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.