From: "Scott Kaplan" <scott@libritas.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Marks are ignored by classes
Date: Thu, 17 Jan 2002 23:19:50 +0000 [thread overview]
Message-ID: <marc-lartc-101130987716587@msgid-missing> (raw)
Here is how I'm setting up my PRIO:
# iptables -A PREROUTING -i eth0 -t mangle -p tcp --dport 22 -j
MARK --set-mark 1
# iptables -A PREROUTING -i eth0 -t mangle -p tcp --sport 22 -j
MARK --set-mark 1
# iptables -A PREROUTING -i eth0 -t mangle -p tcp '!' --dport 22
-j MARK --set-mark 2
# iptables -A PREROUTING -i eth0 -t mangle -p tcp '!' --sport 22
-j MARK --set-mark 2
# tc qdisc del dev eth0 root handle 1:
# tc qdisc add dev eth0 root handle 1: prio bands 4 priomap 0 1
2 3 3 3 3 3 3 3 3 3 3 3 3 3
# tc qdisc add dev eth0 parent 1:1 handle 10: sfq
# tc qdisc add dev eth0 parent 1:2 handle 20: sfq
# tc qdisc add dev eth0 parent 1:3 handle 30: sfq
# tc qdisc add dev eth0 parent 1:4 handle 40: sfq
# tc filter add dev eth0 parent 1: protocol ip prio 3 handle 4
fw classid 1:4
# tc filter add dev eth0 parent 1: protocol ip prio 3 handle 3
fw classid 1:3
# tc filter add dev eth0 parent 1: protocol ip prio 3 handle 2
fw classid 1:2
# tc filter add dev eth0 parent 1: protocol ip prio 3 handle 1
fw classid 1:1
Then I send a few SSH packets. The packets are marked in PREROUTING.
But why is everything winding up in 1:4? Also, if anyone knows why I am
marking 4 packets, but only 3 packets wind up in the qdisc, that would
be appreciated:
[root@boss root]# ./qos status
LAN Queues:
qdisc sfq 40: quantum 1514b
Sent 246 bytes 3 pkts (dropped 0, overlimits 0)
qdisc sfq 30: quantum 1514b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc sfq 20: quantum 1514b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc sfq 10: quantum 1514b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc prio 1: bands 4 priomap 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3
Sent 246 bytes 3 pkts (dropped 0, overlimits 0)
IPTables:
Chain PREROUTING (policy ACCEPT 1050K packets, 257M bytes)
pkts bytes target prot opt in out source
destination
0 0 MARK tcp -- eth0 * 0.0.0.0/0
0.0.0.0/0 tcp dpt:22 MARK set 0x1
2 216 MARK tcp -- eth0 * 0.0.0.0/0
0.0.0.0/0 tcp spt:22 MARK set 0x1
2 216 MARK tcp -- eth0 * 0.0.0.0/0
0.0.0.0/0 tcp dpt:!22 MARK set 0x2
0 0 MARK tcp -- eth0 * 0.0.0.0/0
0.0.0.0/0 tcp spt:!22 MARK set 0x2
Chain OUTPUT (policy ACCEPT 50963 packets, 9269K bytes)
pkts bytes target prot opt in out source
destination
Scott Kaplan
Libritas
Suite 1300
180 Grand Avenue
Oakland, CA 94612
(510) 740-7701
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
next reply other threads:[~2002-01-17 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-17 23:19 Scott Kaplan [this message]
2002-01-21 5:53 ` [LARTC] Marks are ignored by classes Arindam Haldar
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-101130987716587@msgid-missing \
--to=scott@libritas.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 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.