All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian aferrer@dit.upm.es
To: lartc@vger.kernel.org
Subject: [LARTC] Addresses in u32 filter
Date: Sat, 10 Feb 2001 12:50:23 +0000	[thread overview]
Message-ID: <marc-lartc-98373940417003@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940416972@msgid-missing>

<PRE>On Mon, 5 Feb 2001, Adrian wrote:

&gt;<i>   tc filter add dev eth2 parent 8000:0 protocol ip pref 25 \
</I>&gt;<i>      u32 match ip src 10.0.1.0/24 flowid 8000:12
</I>&gt;<i> 
</I>&gt;<i> this is ok (for the first queue), but next:
</I>&gt;<i> 
</I>&gt;<i>   tc filter add dev eth2 parent 8000:0 protocol ip pref 100 \
</I>&gt;<i>      u32 match ip src !10.0.1.0/24 flowid 8000:11
</I>&gt;<i> 
</I>&gt;<i> shows me an error (program doesn't understand the &quot;!10.0.1.0/24&quot; format).
</I>&gt;<i> How can I indicate it?
</I>&gt;<i> 
</I>
I've solved it! The solution is to use filter priorities. This is the
filter config that finally runs ok:

  tc filter add dev eth0 parent 8000:0 protocol ip pref 25 \
     u32 match ip src 10.0.1.1 flowid 8000:12

  tc filter add dev eth0 parent 8000:0 protocol ip pref 100 \
     u32 match ip src 0.0.0.0/0 flowid 8000:11

In short: first filter (with priority 25) is checked first and, if ip
packet doesn't match, the second filter (priority 100) will be checked. In
this way, packets from 10.0.1.1 will go to 8000:12 queue, and THE REST
(packets that ARE NOT FROM 10.0.1.1) will go to 8000:11.

Yes, it was very simple... But I remember that somewhere in the HowTo it's
said that &quot;lower number = lower priority&quot; (?), probably needs a fix.

Tnx

								Adrián



</PRE>

      reply	other threads:[~2001-02-10 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-05 12:24 [LARTC] Addresses in u32 filter Adrian
2001-02-10 12:50 ` Adrian [this message]

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-98373940417003@msgid-missing \
    --to=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.