From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Dautremont Date: Tue, 24 Jul 2007 01:36:27 +0000 Subject: [LARTC] about default filter command Message-Id: <5C822E76-E686-499C-B408-90EF00C1494C@ulb.ac.be> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1862423836==" List-Id: To: lartc@vger.kernel.org --===============1862423836== Content-Type: multipart/alternative; boundary=Apple-Mail-3-775357565 --Apple-Mail-3-775357565 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi, here I have another newcomer question :-) in the section 9.6.1 of this how too http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.qdisc.filters.html we can read commands about filters : ------------------------------------------ # tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \ ip dport 22 0xffff flowid 10:1 # tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \ ip sport 80 0xffff flowid 10:1 # tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2 What does this say? It says: attach to eth0, node 10: a priority 1 u32 filter that matches on IP destination port 22 *exactly* and send it to band 10:1. And it then repeats the same for source port 80. The last command says that anything unmatched so far should go to band 10:2, the next-highest priority. ------------------------------------------ i try to do this at home as i want my ssh traffic prioritary to other traffic but the problem is with the last command ! it simply don't work. The last command that says default trafic goes to prio 2 doesn't work # tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2 just give me the error: "Unknown filter flowid, hence option 1:2 is unparsable" So I don't get what do I must do in order to say that the default trafic goes on priority 2 of the prio filter is this how too always valid with the current version of tc ? did i do something wrong ? Thank you for your help. Vincent. --Apple-Mail-3-775357565 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi,
here I have another newcomer question :-)
in the = section 9.6.1 of this how too=A0
= http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.qdisc.filters.html
=
we can read commands about filters = :
------------------------------------------

# tc filter add dev eth0 protocol ip parent 10: prio 1 = u32 match \=A0
=A0 ip dport 22 0xffff flowid = 10:1
# tc filter add dev eth0 protocol ip = parent 10: prio 1 u32 match \
=A0 ip sport = 80 0xffff flowid 10:1
# tc filter = add dev eth0 protocol ip parent 10: prio 2 flowid 10:2
=

What = does this say? It says: attach to eth0, node 10: a priority 1 u32 filter = that matches on IP destination port 22 *exactly* and send it to band = 10:1. And it then repeats the same for source port 80. The last command = says that anything unmatched so far should go to band 10:2, the = next-highest priority.

------------------------------------------

i try to do this at home as i want my ssh traffic prioritary to = other traffic but the problem is with the last command ! it simply don't = work. The last command that says default trafic goes to prio 2 doesn't = work

# tc filter add dev eth0 protocol ip parent 10: prio = 2 flowid 10:2

just give me the error: "Unknown filter flowid, hence option 1:2 = is unparsable"

So I = don't get what do I must do in order to say that the default trafic goes = on priority 2 of the prio filter

is this how too always valid with the current version of = tc ? did i do something wrong ?

Thank you for your help.


Vincent.

=
= --Apple-Mail-3-775357565-- --===============1862423836== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1862423836==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georgi Alexandrov Date: Thu, 26 Jul 2007 11:55:12 +0000 Subject: Re: [LARTC] about default filter command Message-Id: <46A88BA0.8040503@gmail.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1025630819==" List-Id: References: <5C822E76-E686-499C-B408-90EF00C1494C@ulb.ac.be> In-Reply-To: <5C822E76-E686-499C-B408-90EF00C1494C@ulb.ac.be> To: lartc@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1025630819== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC446943499A41B781505C979" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC446943499A41B781505C979 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Vincent Dautremont wrote: > Hi, > here I have another newcomer question :-) > in the section 9.6.1 of this how too=20 > http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.qdisc.filters.html > we can read commands about filters : > ------------------------------------------ >=20 > # tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \=20 > ip dport 22 0xffff flowid 10:1 > # tc filter add dev eth0 protocol ip parent 10: prio 1 u32 match \ > ip sport 80 0xffff flowid 10:1 > # tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2 >=20 > What does this say? It says: attach to eth0, node 10: a priority 1 u32 > filter that matches on IP destination port 22 *exactly* and send it to > band 10:1. And it then repeats the same for source port 80. The last > command says that anything unmatched so far should go to band 10:2, the= > next-highest priority. >=20 > ------------------------------------------ >=20 > i try to do this at home as i want my ssh traffic prioritary to other > traffic but the problem is with the last command ! it simply don't work= =2E > The last command that says default trafic goes to prio 2 doesn't work >=20 > # tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2 >=20 > just give me the error: "Unknown filter flowid, hence option 1:2 is > unparsable" >=20 > So I don't get what do I must do in order to say that the default trafi= c > goes on priority 2 of the prio filter >=20 > is this how too always valid with the current version of tc ? did i do > something wrong ? >=20 > Thank you for your help. You should have posted *all* your tc rules. --=20 regards, Georgi Alexandrov key server - pgp.mit.edu :: key id - 0x37B4B3EE Key fingerprint =3D E429 BF93 FA67 44E9 B7D4 F89E F990 01C1 37B4 B3EE --------------enigC446943499A41B781505C979 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGqIug+ZABwTe0s+4RAlguAJ4nRFM6hE0VhCLHnkt8uJIDPUEHPgCggjjR dgzAZqc0b9ADeXO0IElURYU= =ZS/H -----END PGP SIGNATURE----- --------------enigC446943499A41B781505C979-- --===============1025630819== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1025630819==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Fri, 27 Jul 2007 10:30:13 +0000 Subject: Re: [LARTC] about default filter command Message-Id: <46A9C935.8020602@andyfurniss.entadsl.com> List-Id: References: <5C822E76-E686-499C-B408-90EF00C1494C@ulb.ac.be> In-Reply-To: <5C822E76-E686-499C-B408-90EF00C1494C@ulb.ac.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Vincent Dautremont wrote: > # tc filter add dev eth0 protocol ip parent 10: prio 2 flowid 10:2 > > just give me the error: "Unknown filter flowid, hence option 1:2 is > unparsable" I am not sure if that ever worked or not - I use tc filter add dev eth0 protocol ip parent 10: prio 2 u32 match u32 0 0 flowid 10:2 which should catch all unclassified ip traffic. When you put prio on root there is often a further buffer that has to fill before anything happens. Also arp goes to 1:2 unless you filter it elsewhere. Andy. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc