Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

lug-bg: tc and iptables mark problem


  • Subject: lug-bg: tc and iptables mark problem
  • From: lug@email.domain.hidden (Dragomir Zhelev)
  • Date: Mon, 14 Apr 2003 20:39:32 +0300 (EEST)


zdraweite

problema e sledniq imam nqkolko pc-ta koito routvam i iskam da shape dw-a na vsqko
ot tqh with tc and cbq kato markiram packetite s iptables

hemata mi e slednata:

eth0 <my real ip>
eth1 192.168.0.1
zad eth1 masquerade 192.168.0.0/24

<p>                |
                |internet
                |
        --------------
               eth0
        --------------
                eth1
        --------------
                |
                |------192.168.0.0/24

led dylgi i bezsyni noshti stignah do slednite redove :

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 2: cbq bandwidth 10Mbit avpkt 1000 cell 8

iptables -F -t mangle
iptables -X -t mangle

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: cbq bandwidth 10Mbit avpkt 1000 cell 8

tc class add dev eth1 parent 1:0 classid 1:01 cbq bandwidth 10Mbps rate 10Kbit weight 1Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
tc qdisc add dev eth1 parent  1:01 tbf rate 10Kbit buffer 20Kb/8 limit 12Kb mtu 1500
tc filter add dev eth1 protocol ip parent 1:0 prio 8 handle 1 fw flowid 1:01
iptables -A PREROUTING -i eth0 -d 192.168.0.2 -t mangle -j MARK --set-mark 1

tc class add dev eth1 parent 1:0 classid 1:02 cbq bandwidth 10Mbps rate 10Kbit weight 1Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
tc qdisc add dev eth1 parent  1:02 tbf rate 10Kbit buffer 20Kb/8 limit 12Kb mtu 1500
tc filter add dev eth1 protocol ip parent 1:0 prio 8 handle 2 fw flowid 1:02
iptables -A PREROUTING -i eth0 -d 192.168.0.3 -t mangle -j MARK --set-mark 2

tc class add dev eth1 parent 1:0 classid 1:03 cbq bandwidth 10Mbps rate 10Kbit weight 1Kbit allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
tc qdisc add dev eth1 parent  1:03 tbf rate 10Kbit buffer 20Kb/8 limit 12Kb mtu 1500
tc filter add dev eth1 protocol ip parent 1:0 prio 8 handle 3 fw flowid 1:03
iptables -A PREROUTING -i eth0 -d 192.168.0.4 -t mangle -j MARK --set-mark 3

ima i oshte no ne iskam da zasipvam listata
tova nesheto spored vsichki docs koito prochetoh trqbva da raboti no uvi
ne e taka ... shte vi byda mnogo blagodaren ako mojete da mi kajete kade
mi e greshkata i kak da q opravq zashtoto veche ne znam kakvo da pravq
sled kato prochetoh kup documentacii i FAQs

za oshte informacia shte kaja che smenih kernel-a ot 2.4.20 na 2.4.21-pre7
probvah da sloja mangaling v netfilter kato modul kakto i v kernela efect
nikakyv

kogato markiram packetite sys u32 shapera si bachka ot kadeto sydq i che
tc-to i cbq-to si bachkat

poglednah vyv /var/log/syslog i kogato izpylnq tezi redove gore se
poqvqvat slednite redove :

Apr 14 20:36:47 fanatici kernel: CBQ: class 00010001 has bad quantum==0, repaired.
Apr 14 20:36:47 fanatici kernel: CBQ: class 00010001 has bad quantum==0, repaired.
Apr 14 20:36:47 fanatici kernel: CBQ: class 00010002 has bad quantum==0, repaired.
Apr 14 20:36:47 fanatici kernel: CBQ: class 00010001 has bad quantum==0, repaired.
Apr 14 20:36:47 fanatici kernel: CBQ: class 00010002 has bad quantum==0, repaired.
Apr 14 20:36:47 fanatici kernel: CBQ: class 00010003 has bad quantum==0, repaired.

distribuciqta mi e slackware 9.0 makari che ne mislq che tova ima nqkakvo
znachenie

tova e :)
blagodarq vi predvaritelno

D
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.