[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Simple 2 VLL problem, 5 little questions
Hi,
Suppose I want to connect two LANs to the internet via Linux box and router
trough a 33kbps link, like this:
/-----------\
-----eth1-| Linux |
| 2.2.14 | /------\
-----eth2-| +diffserv |-eth0------|router|--modem 33kbps---internet
\-----------/ \------/
Now I want to implement two Virtual Leased Lines (VLL) one for eth1 with
20kbps and other to eth2 with 10kps.
I used ipchains to mark packets from eth1 (mark=1) and eth2 (mark=2), and
all interfaces are 10Mbit ethernet cards.
Q1: Is the following setup correct, or am I missusing
borrow/bounded/isolated ?
tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000
mpu 64
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
20Kbit \
cell 8 avpkt 1000 mpu 64 bounded weight 2Kbit
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10Mbit rate
10Kbit \
cell 8 avpkt 1000 mpu 64 bounded weight 1Kbit
tc filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1:1
tc filter add dev eth0 parent 1:0 protocol ip handle 2 fw flowid 1:2
Q2: Should class 1:0 be changed to rate 30Kbit ? (I have tried values from
10Kbit to 10Mbit and transfer rates vary from the desired rate)
Q3: How can I change this to allow eth1 to borrow unused bandwidth from eth2
slot and vice-versa, but when both are using the full link they be limited
to the ratio 20kbps/10kpbs
Q4: Should I have used TBF insted of CBQ for this particular setup ?
Q5: Is there any sample script to use on this setup (single linux machine)
to allow DS marking of telnet/ftp/http/mail/news traffic and AF+EF+BE
processing of that traffic. Its not the same thing but I have started
working in a TOS ipchains marking followed by an DSMARK+CBQ in order to
implement 3 classes for each "type of service" minimum delay,
max.throughput, best efford. Any ideas on how to do that ?
Best regards and thanks in advance for any help,
Pedro Carvalho