All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Problem with htb and fwmark
@ 2003-06-06 13:47 Morten Isaksen
  2003-09-17  7:16 ` Steen Suder, privat
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Morten Isaksen @ 2003-06-06 13:47 UTC (permalink / raw)
  To: lartc

Hi!

I am trying to prioritize udp traffic to satisfy our gamers.

The setup is

800 users

                 / 8 Mbit fiber (eth3)
LAN (eth0) - FW -
                 \ 6 Mbit FWA (eth2)

The 8 Mbit is the default gw and the FWA is currently only used by our proxy
server


I am using this script:

$IP rule add fwmark 1 table 100 pref 1000
$IP route add table 200 scope global nexthop via 213.173.228.1 dev eth2

tc filter del dev eth0 prio 3
tc qdisc del dev eth0 root handle 1:
tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:1 htb rate 10Mbit ceil 14Mbit
burst 2k

# Class for UDP, ICMP, ssh traffic
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1MBit ceil 4Mbit
burst 2k prio 0

# Class for all traffic to our servers
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 3Mbit ceil 10Mbit
burst 2k prio 1

# All other traffic
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 6Mbit ceil 8Mbit
burst 2k prio 3

tc qdisc add dev eth0 parent 1:10 handle 20: sfq perturb 10
tc qdisc add dev eth0 parent 1:11 handle 30: sfq perturb 10
tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10

tc filter add dev eth0 parent 1: protocol ip prio 3 handle 4 fw flowid 1:10
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 5 fw flowid 1:11

iptables -t mangle -A PREROUTING -i eth0 -p udp -j MARK --set-mark 4

iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 22 -j MARK
--set-mark 4
iptables -t mangle -A PREROUTING -s 10.10.10.3 -i eth0 -j MARK --set-mark 5
iptables -t mangle -A PREROUTING -s 10.10.10.4 -i eth0 -j MARK --set-mark 5
iptables -t mangle -A PREROUTING -s 10.10.10.5 -i eth0 -j MARK --set-mark 5
iptables -t mangle -A PREROUTING -s 10.10.10.12 -j MARK --set-mark 2

The problem is that the all the traffic is going to the default class no
matter what I do.

I can see that the counters in "iptables -t mangle -L -v -n" is counting up,
but the counters in "tc -s class ls dev eth0" is not.

I have also tried not to use fwmark but added the rules directly with "tc
filter...", but with same results...

Have I forgotten something, or what is the problem?


--
Morten Isaksen
misak@aub.dk - http://www.aub.dk/~misak
 


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2003-09-17 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 13:47 [LARTC] Problem with htb and fwmark Morten Isaksen
2003-09-17  7:16 ` Steen Suder, privat
2003-09-17  7:20 ` Catalin BOIE
2003-09-17  7:33 ` Steen Suder, privat
2003-09-17 16:24 ` Steen Suder, privat

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.