All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Soltys <nozo@ziu.info>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] using tc to drop packets based on the diffserc or tos
Date: Sun, 16 Sep 2007 20:36:33 +0000	[thread overview]
Message-ID: <46ED93D1.3090703@ziu.info> (raw)
In-Reply-To: <ED9CC011977FDA4BAB13266D271118E6102B8A449F@BTSLMAIL.bhartitelesoft.com>

Raghuvendra Kumar wrote:
> Hi all,
> 
 > [...]
> 
> [root@scotch src]#tc filter add dev eth0 protocol ip u32 match ip dsfield 8 police drop
> 
> its showing error "Illegal "match".
> 
> Can any one of you guide me , what is the correct way of doing it.
> Its imporatnt, Please post reply ASAP.
> 

For instance:

tc qdisc add dev eth0 root handle 1: hfsc default 99
# (.. remaining classes / etc. ..)

tc filter add dev eth0 parent 1:0 protocol ip  prio 1 u32 \
	match ip dsfield 0x08 0xff action drop

Remember that mask is mandatory.

Also check out doc/actions directory for info about extended actions in 
iproute tarball.


Out of curiosity - why not just:

iptables -A OUTPUT -o eth0 -p udp --sport 5060 -j DROP

... or with something like -j REJECT --reject-with icmp-port-unreachable, 
depending on your needs. Assuming it's not just for testing purposes, and 
you actually want to drop the traffic generated by your host from that 
particular port.


_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  reply	other threads:[~2007-09-16 20:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16 10:28 [LARTC] using tc to drop packets based on the diffserc or tos value Raghuvendra Kumar
2007-09-16 20:36 ` Michal Soltys [this message]
2007-09-17  4:32 ` [LARTC] using tc to drop packets based on the diffserc or tos Raghuvendra Kumar
2007-09-17  6:48 ` Raghuvendra Kumar
2007-09-18 21:26 ` Michal Soltys
2007-09-19  4:23 ` Raghuvendra Kumar

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=46ED93D1.3090703@ziu.info \
    --to=nozo@ziu.info \
    --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.