From: Sorin Panca <sorin.panca@gmail.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Is local originated traffic affected?
Date: Tue, 24 Jan 2006 20:16:09 +0000 [thread overview]
Message-ID: <43D68B09.3060502@gmail.com> (raw)
In-Reply-To: <43D645B9.7000901@gmail.com>
I posted earlier today and i forgot to attach the rules I used...
The problem was that when I apply them, the router gets isolated
from both the Internet and the LAN.
I'm sorry I reply to my post!
I don't know if this behaviour is normal.
Here are my rules...
leaf="sfq perturb 10"
BURST="50k"
CBURST="150k"
# Deleting old qdiscs:
$tc qdisc del dev $EXT1 root &>/dev/null
$tc qdisc del dev $INT1 root &>/dev/null
# Adding three root classes: class 1:A = LAN (100 Mbit/s) MARK = 0x2;
# class 1:B = MAN (1 Mbit/s) MARK = 0x1; class 1:C = Internet (256 kbit/s)
# Also the packets have the TOS field altered by the iptables-script so
# that they are either Minimized-Delay or Maximize-Throughput based on
# their length.
for DEV in ` echo $INT1 $EXT1 `; do
$tc qdisc add dev $DEV root handle 1: htb default FF
# Class MAN
$tc class add dev $DEV parent 1: classid 1:B htb \
rate $ROOT_MAN_RATE$kbit ceil $ROOT_MAN_CEIL$kbit \
burst $BURST cburst $CBURST
# Class Internet
$tc class add dev $DEV parent 1: classid 1:C htb \
rate $ROOT_NET_RATE$kbit ceil $ROOT_NET_CEIL$kbit \
burst $BURST cburst $CBURST
# Class default
$tc class add dev $DEV parent 1: classid 1:FF htb \
rate $BULK_NET_RATE$kbit ceil $BULK_NET_CEIL$kbit
$tc qdisc add dev $DEV parent 1:FF handle FF: $leaf
done
# Class LAN
$tc class add dev $INT1 parent 1: classid 1:A htb \
rate $LAN_RATE$Mbit ceil $LAN_RATE$Mbit \
burst $BURST cburst $CBURST
$tc qdisc add dev $INT1 parent 1:A handle A: $leaf
$tc filter add dev $INT1 parent 1: protocol ip prio 1 \
u32 match mark 0x2 0xffffffff flowid 1:A
# Reading the list of clients form a file (one client per line)
# Cutting out some detailes about reading that file $hIP is the
# last part of the client's IP written in hexa
# (the network is 192.168.0.0/24)
for CLIENT in $THATFILE; do
# Setting speeds in MAN:
for DEV in ` echo $EXT1 $INT1 `; do
$tc class add dev $DEV parent 1:B classid 1:B$hIP htb \
rate $MANRATE ceil $MANCEIL \
burst $BURST cburst $CBURST &>/dev/null
$tc qdisc add dev $DEV parent 1:B$hIP handle B$hIP: \
$leaf &>/dev/null
done
# Setting speeds in the Internet
for DEV in ` echo $EXT1 $INT1 `; do
$tc class add dev $DEV parent 1:C classid 1:C$hIP htb \
rate $NETRATE ceil $NETCEIL \
burst $BURST cburst $CBURST &>/dev/null
$tc qdisc add dev $DEV parent 1:C$hIP handle C$hIP: \
$leaf &>/dev/null
done
$tc filter add dev $INT1 parent 1: protocol ip prio 1 u32 \
match ip dst $MAXIP/32 \
match mark 0x1 0xffffffff \
flowid 1:B$hIP
$tc filter add dev $EXT1 parent 1: protocol ip prio 1 u32 \
match ip src $MAXIP/32 \
match mark 0x1 0xffffffff \
flowid 1:B$hIP
$tc filter add dev $INT1 parent 1: protocol ip prio 1 u32 \
match ip dst $MAXIP/32 \
flowid 1:C$hIP
$tc filter add dev $EXT1 parent 1: protocol ip prio 1 u32 \
match ip src $MAXIP/32 \
flowid 1:C$hIP
done
Tank you in advance!
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2006-01-24 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-24 15:20 [LARTC] Is local originated traffic affected? Sorin Panca
2006-01-24 20:16 ` Sorin Panca [this message]
2006-01-25 16:47 ` Denis Ovsienko
2006-01-26 12:43 ` Sorin Panca
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=43D68B09.3060502@gmail.com \
--to=sorin.panca@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox