All of lore.kernel.org
 help / color / mirror / Atom feed
From: josdg@office.xs4all.be josdg@office.xs4all.be
To: lartc@vger.kernel.org
Subject: [LARTC] CBQ and VLAN's
Date: Wed, 27 Dec 2000 10:34:07 +0000	[thread overview]
Message-ID: <marc-lartc-98373938217036@msgid-missing> (raw)

<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>

             reply	other threads:[~2000-12-27 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-27 10:34 josdg [this message]
2000-12-27 16:22 ` [LARTC] CBQ and VLAN's josdg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-98373938217036@msgid-missing \
    --to=josdg@office.xs4all.be \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.